From d7bf8c17eca8f8c89898a7794462c773c449e983 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 25 Feb 2018 22:55:05 -0500 Subject: Yocto 2.4 Move OpenBMC to Yocto 2.4(rocko) Tested: Built and verified Witherspoon and Palmetto images Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67 Signed-off-by: Brad Bishop --- .../meta/recipes-devtools/apt/apt-native_1.2.12.bb | 4 - .../meta/recipes-devtools/apt/apt-native_1.2.24.bb | 7 + .../yocto-poky/meta/recipes-devtools/apt/apt.inc | 8 +- ...ys-run-dpkg-configure-a-at-the-end-of-our.patch | 24 +- .../apt/apt/0001-apt-1.2.12-Fix-musl-build.patch | 2 +- ...d-changing-the-global-LC_TIME-for-Release.patch | 80 + ...de-localed-std-put_time-instead-rolling-o.patch | 46 + ...kg-contrib-strutl.cc-Include-array-header.patch | 33 + .../meta/recipes-devtools/apt/apt_1.2.12.bb | 20 - .../meta/recipes-devtools/apt/apt_1.2.24.bb | 20 + .../autoconf-archive_2016.09.16.bb | 14 + .../meta/recipes-devtools/autoconf/autoconf.inc | 2 +- .../autogen/autogen-native_5.18.12.bb | 40 - ...pts.m4-regenerate-it-from-config-libopts..patch | 39 - ...2-autoopts-mk-tpl-config.sh-fix-perl-path.patch | 32 - .../fix-script-err-when-processing-libguile.patch | 37 - .../autogen/autogen/increase-timeout-limit.patch | 30 - ...ig.sh-force-exit-value-to-be-0-in-subproc.patch | 30 - ...utomake-Add-default-libtool_tag-to-cppasm.patch | 27 + ...0001-automake-port-to-Perl-5.22-and-later.patch | 32 - .../recipes-devtools/automake/automake_1.15.1.bb | 43 + .../recipes-devtools/automake/automake_1.15.bb | 43 - .../recipes-devtools/binutils/binutils-2.28.inc | 85 - .../recipes-devtools/binutils/binutils-2.29.1.inc | 43 + .../binutils/binutils-cross-canadian_2.28.bb | 3 - .../binutils/binutils-cross-canadian_2.29.1.bb | 3 + .../binutils/binutils-cross_2.28.bb | 3 - .../binutils/binutils-cross_2.29.1.bb | 3 + .../binutils/binutils-crosssdk_2.28.bb | 13 - .../binutils/binutils-crosssdk_2.29.1.bb | 13 + ...nutils-crosssdk-Generate-relocatable-SDKs.patch | 6 +- ...oss-Do-not-generate-linker-script-directo.patch | 4 +- ...ure-widen-the-regexp-for-SH-architectures.patch | 47 + ...003-gprof-add-uclibc-support-to-configure.patch | 31 - .../0004-Point-scripts-location-to-libdir.patch | 10 +- ...te-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | 20 +- .../0006-Explicitly-link-with-libm-on-uclibc.patch | 52 - .../binutils/binutils/0006-Use-libtool-2.4.patch | 21157 +++++++++++++++++++ ...7-Add-the-armv5e-architecture-to-binutils.patch | 35 + .../binutils/binutils/0007-Use-libtool-2.4.patch | 21137 ------------------ ...8-Add-the-armv5e-architecture-to-binutils.patch | 35 - ...he-distro-compiler-point-to-the-wrong-ins.patch | 35 + ...he-distro-compiler-point-to-the-wrong-ins.patch | 35 - ...es-of-system-directories-when-cross-linki.patch | 273 + ...-rpath-in-libtool-when-sysroot-is-enabled.patch | 52 + ...es-of-system-directories-when-cross-linki.patch | 273 - ...Change-default-emulation-for-mips64-linux.patch | 59 + ...-rpath-in-libtool-when-sysroot-is-enabled.patch | 52 - .../0012-Add-support-for-Netlogic-XLP.patch | 393 + ...Change-default-emulation-for-mips64-linux.patch | 59 - .../0013-Add-support-for-Netlogic-XLP.patch | 399 - ...ncorrect-assembling-for-ppc-wait-mnemonic.patch | 36 + .../binutils/0014-Detect-64-bit-MIPS-targets.patch | 50 + ...ncorrect-assembling-for-ppc-wait-mnemonic.patch | 36 - .../0015-sync-with-OE-libtool-changes.patch | 4 +- .../binutils/0016-Detect-64-bit-MIPS-targets.patch | 50 - ...-lookup-of-file-line-information-for-erro.patch | 75 - ...segfault-in-_bfd_dwarf2_find_nearest_line.patch | 33 - .../binutils/binutils/CVE-2017-6965.patch | 124 - .../binutils/binutils/CVE-2017-6966.patch | 241 - .../binutils/binutils/CVE-2017-6969.patch | 57 - .../binutils/binutils/CVE-2017-6969_2.patch | 122 - .../binutils/binutils/CVE-2017-7209.patch | 62 - .../binutils/binutils/CVE-2017-7210.patch | 71 - .../binutils/binutils/CVE-2017-7223.patch | 52 - .../binutils/binutils/CVE-2017-7614.patch | 103 - .../binutils/binutils/CVE-2017-8393.patch | 205 - .../binutils/binutils/CVE-2017-8394.patch | 118 - .../binutils/binutils/CVE-2017-8395.patch | 72 - .../binutils/binutils/CVE-2017-8396_8397.patch | 102 - .../binutils/binutils/CVE-2017-8398.patch | 147 - .../binutils/binutils/CVE-2017-8421.patch | 52 - .../binutils/binutils/CVE-2017-9038_9044.patch | 51 - .../binutils/binutils/CVE-2017-9039.patch | 61 - .../binutils/binutils/CVE-2017-9040_9042.patch | 57 - .../binutils/binutils/CVE-2017-9742.patch | 45 - .../binutils/binutils/CVE-2017-9744.patch | 46 - .../binutils/binutils/CVE-2017-9745.patch | 35 - .../binutils/binutils/CVE-2017-9746.patch | 91 - .../binutils/binutils/CVE-2017-9747.patch | 43 - .../binutils/binutils/CVE-2017-9748.patch | 46 - .../binutils/binutils/CVE-2017-9749.patch | 77 - .../binutils/binutils/CVE-2017-9750.patch | 247 - .../binutils/binutils/CVE-2017-9751.patch | 3748 ---- .../binutils/binutils/CVE-2017-9752.patch | 208 - .../binutils/binutils/CVE-2017-9753.patch | 79 - .../binutils/binutils/CVE-2017-9755.patch | 63 - .../binutils/binutils/CVE-2017-9756.patch | 50 - .../binutils/binutils/CVE-2017-9954.patch | 58 - .../binutils/binutils/CVE-2017-9955_1.patch | 168 - .../binutils/binutils/CVE-2017-9955_2.patch | 122 - .../binutils/binutils/CVE-2017-9955_3.patch | 48 - .../binutils/binutils/CVE-2017-9955_4.patch | 51 - .../binutils/binutils/CVE-2017-9955_5.patch | 89 - .../binutils/binutils/CVE-2017-9955_6.patch | 56 - .../binutils/binutils/CVE-2017-9955_7.patch | 80 - .../binutils/binutils/CVE-2017-9955_8.patch | 187 - .../binutils/binutils/CVE-2017-9955_9.patch | 361 - .../recipes-devtools/binutils/binutils_2.28.bb | 45 - .../recipes-devtools/binutils/binutils_2.29.1.bb | 49 + .../0001-src-local.mk-fix-parallel-issue.patch | 9 +- .../meta/recipes-devtools/bison/bison_3.0.4.bb | 1 - .../bootchart2/bootchart2_0.14.8.bb | 2 +- ...-Makefile-build-mktables-using-native-gcc.patch | 30 + .../btrfs-tools/btrfs-tools_4.12.bb | 35 + .../btrfs-tools/btrfs-tools_4.9.1.bb | 33 - .../build-compare/build-compare_git.bb | 1 + .../chrpath/chrpath/standarddoc.patch | 25 +- .../recipes-devtools/cmake/cmake-native_3.7.2.bb | 37 - .../recipes-devtools/cmake/cmake-native_3.8.2.bb | 38 + .../meta/recipes-devtools/cmake/cmake.inc | 9 +- ...e-find_program-if-find_host_program-is-no.patch | 40 + ...L-tests-Remove-format-security-from-flags.patch | 33 - .../cmake/cmake/OEToolchainConfig.cmake | 2 +- ...void-gcc-warnings-with-Wstrict-prototypes.patch | 42 - .../meta/recipes-devtools/cmake/cmake_3.7.2.bb | 49 - .../meta/recipes-devtools/cmake/cmake_3.8.2.bb | 50 + ...0001-Correctly-install-the-shared-library.patch | 2 +- .../cve-check-tool/cve-check-tool_5.6.4.bb | 3 +- ...01-Fix-freeing-memory-allocated-by-sqlite.patch | 50 + ...ogress-in-percent-when-downloading-CVE-db.patch | 2 +- .../recipes-devtools/diffstat/diffstat_1.61.bb | 9 +- .../meta/recipes-devtools/distcc/distcc_3.2.bb | 1 + .../recipes-devtools/dmidecode/dmidecode_3.0.bb | 23 - .../recipes-devtools/dmidecode/dmidecode_3.1.bb | 23 + ...eck-conf.releasever-instead-of-releasever.patch | 31 + .../dnf/0030-Run-python-scripts-using-env.patch | 13 +- .../meta/recipes-devtools/dnf/dnf_2.6.3.bb | 52 + .../meta/recipes-devtools/dnf/dnf_git.bb | 49 - .../dpkg/0001-dpkg-Support-muslx32-build.patch | 41 + ...nux-wrs-kernel-version-which-has-characte.patch | 12 +- ...0006-add-musleabi-to-known-target-tripets.patch | 57 +- ...uild.c-Remove-usage-of-clamp-mtime-in-tar.patch | 21 +- .../dpkg/dpkg/add_armeb_triplet_entry.patch | 30 +- .../meta/recipes-devtools/dpkg/dpkg/arch_pm.patch | 19 +- .../dpkg/dpkg/dpkg-configure.service | 2 +- .../meta/recipes-devtools/dpkg/dpkg/noman.patch | 18 +- .../meta/recipes-devtools/dpkg/dpkg_1.18.10.bb | 20 - .../meta/recipes-devtools/dpkg/dpkg_1.18.24.bb | 21 + ...-with-exit-status-0-if-no-errors-were-fix.patch | 255 - ...c-create_inode.c-set-dir-s-mode-correctly.patch | 41 + .../e2fsprogs/e2fsprogs-1.43-sysmacros.patch | 130 - .../e2fsprogs/e2fsprogs/ptest.patch | 2 + .../e2fsprogs/e2fsprogs/reproducible-doc.patch | 21 + .../recipes-devtools/e2fsprogs/e2fsprogs/run-ptest | 15 +- .../recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb | 112 - .../recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | 117 + ...de-alternatives-for-glibc-assumptions-hel.patch | 1051 - ...m-Silence-Werror-maybe-uninitialized-fals.patch | 35 - .../0001-fix-a-stack-usage-warning.patch | 28 - .../0001-remove-the-unneed-checking.patch | 38 - .../elfutils-0.168/Fix_one_GCC7_warning.patch | 44 - .../elfutils/elfutils-0.168/aarch64_uio.patch | 47 - ...ferences-between-mips-machine-identifiers.patch | 35 - ...-support-for-mips64-abis-in-mips_retval.c.patch | 171 - .../0003-Add-mips-n64-relocation-format-hack.patch | 229 - .../elfutils-0.168/debian/arm_backend.diff | 603 - .../elfutils-0.168/debian/hppa_backend.diff | 802 - .../elfutils/elfutils-0.168/debian/hurd_path.patch | 17 - .../elfutils-0.168/debian/ignore_strmerge.diff | 14 - .../elfutils-0.168/debian/kfreebsd_path.patch | 20 - .../elfutils-0.168/debian/mips_backend.diff | 686 - .../elfutils-0.168/debian/mips_readelf_w.patch | 25 - .../debian/testsuite-ignore-elflint.diff | 42 - .../elfutils/elfutils-0.168/fallthrough.patch | 36 - .../elfutils/elfutils-0.168/fixheadercheck.patch | 23 - .../elfutils/elfutils-0.168/shadow.patch | 23 - .../elfutils/elfutils/Fix_elf_cvt_gunhash.patch | 29 - .../elfutils/elfutils/dso-link-change.patch | 32 - .../recipes-devtools/elfutils/elfutils_0.168.bb | 90 - .../recipes-devtools/elfutils/elfutils_0.170.bb | 79 + .../elfutils/files/0001-dso-link-change.patch | 52 + ...0001-libasm-may-link-with-libbz2-if-found.patch | 39 + ...-elf_cvt_gunhash-if-dest-and-src-are-same.patch | 42 + .../elfutils/files/0003-fixheadercheck.patch | 40 + .../0004-Disable-the-test-to-convert-euc-jp.patch | 44 + .../files/0005-fix-a-stack-usage-warning.patch | 35 + .../files/0006-Fix-build-on-aarch64-musl.patch | 61 + ...-path-where-we-have-str-as-uninitialized-.patch | 45 + ...de-alternatives-for-glibc-assumptions-hel.patch | 1031 + ...ferences-between-mips-machine-identifiers.patch | 35 + ...-support-for-mips64-abis-in-mips_retval.c.patch | 171 + .../0003-Add-mips-n64-relocation-format-hack.patch | 229 + .../elfutils/files/debian/arm_backend.diff | 603 + .../elfutils/files/debian/fallthrough.patch | 36 + .../elfutils/files/debian/hppa_backend.diff | 802 + .../elfutils/files/debian/mips_backend.patch | 715 + .../elfutils/files/debian/mips_readelf_w.patch | 25 + .../meta/recipes-devtools/expect/expect_5.45.bb | 7 +- .../meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb | 26 - .../meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb | 26 + .../recipes-devtools/file/file/debian-742262.patch | 17 +- .../meta/recipes-devtools/file/file_5.30.bb | 48 - .../meta/recipes-devtools/file/file_5.31.bb | 48 + .../meta/recipes-devtools/flex/flex_2.6.0.bb | 6 +- .../meta/recipes-devtools/gcc/gcc-5.4.inc | 147 - .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 - .../gcc/gcc-5.4/0002-uclibc-conf.patch | 53 - .../0003-gcc-uclibc-locale-ctype_touplow_t.patch | 87 - .../gcc/gcc-5.4/0004-uclibc-locale.patch | 2862 --- .../gcc/gcc-5.4/0005-uclibc-locale-no__x.patch | 257 - .../gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch | 68 - .../gcc/gcc-5.4/0007-uclibc-locale-update.patch | 542 - .../gcc/gcc-5.4/0008-missing-execinfo_h.patch | 28 - .../gcc/gcc-5.4/0009-c99-snprintf.patch | 28 - .../0010-gcc-poison-system-directories.patch | 192 - .../gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch | 39 - .../0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 - .../gcc/gcc-5.4/0013-64-bit-multilib-hack.patch | 85 - .../gcc/gcc-5.4/0014-optional-libstdc.patch | 101 - ...0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 - .../gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch | 38 - ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 - .../gcc-5.4/0018-fortran-cross-compile-hack.patch | 46 - .../gcc/gcc-5.4/0019-libgcc-sjlj-check.patch | 74 - .../gcc/gcc-5.4/0020-cpp-honor-sysroot.patch | 54 - .../gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch | 57 - ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 216 - ...0023-gcc-Fix-argument-list-too-long-error.patch | 40 - .../gcc/gcc-5.4/0024-Disable-sdt.patch | 113 - .../gcc/gcc-5.4/0025-libtool.patch | 42 - ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 - ...tilib-config-files-from-B-instead-of-usin.patch | 102 - ...-libdir-from-.la-which-usually-points-to-.patch | 31 - .../gcc/gcc-5.4/0029-export-CPP.patch | 53 - ...AltiVec-generation-on-powepc-linux-target.patch | 52 - ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 - ...Ensure-target-gcc-headers-can-be-included.patch | 98 - ...-t-build-with-disable-dependency-tracking.patch | 54 - ...h-host-directory-during-relink-if-inst_pr.patch | 38 - ...-link-the-plugins-with-libgomp-explicitly.patch | 83 - ...IBS_DIR-replacement-instead-of-hardcoding.patch | 27 - .../0037-aarch64-Add-support-for-musl-ldso.patch | 26 - .../gcc/gcc-5.4/0038-fix-g-sysroot.patch | 56 - ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 - ...-handle-sysroot-support-for-nativesdk-gcc.patch | 213 - ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 - ...-various-_FOR_BUILD-and-related-variables.patch | 137 - .../gcc/gcc-5.4/0043-libstdc-Support-musl.patch | 44 - ...l-as-a-musl-libc-specifier-and-the-necess.patch | 270 - .../gcc-5.4/0045-Support-for-arm-linux-musl.patch | 216 - ...et-rid-of-ever-broken-fixincludes-on-musl.patch | 28 - .../0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 - .../gcc/gcc-5.4/0048-ssp_nonshared.patch | 29 - ...-weak-reference-logic-in-gthr.h-for-os-ge.patch | 78 - ...050-powerpc-pass-secure-plt-to-the-linker.patch | 66 - ...ug-prefix-map-in-producer-string-by-Danie.patch | 31 - .../gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch | 103 - ...arget-65358-Avoid-clobbering-partial-argu.patch | 307 - .../gcc-5.4/0054-support-ffile-prefix-map.patch | 284 - ...ug-prefix-map-to-replace-ffile-prefix-map.patch | 43 - ...-provide-ssp-and-gcc_cv_target_dl_iterate.patch | 85 - .../gcc/gcc-5.4/0057-unwind-fix-for-musl.patch | 42 - ...prefix-map-support-to-remap-relative-path.patch | 51 - .../gcc/gcc-5.4/0059-libgcc-use-ldflags.patch | 16 - .../gcc/gcc-5.4/CVE-2016-6131.patch | 251 - .../meta/recipes-devtools/gcc/gcc-6.3.inc | 11 +- .../gcc/gcc-6.3/0002-uclibc-conf.patch | 53 - .../0003-gcc-uclibc-locale-ctype_touplow_t.patch | 87 - .../gcc/gcc-6.3/0004-uclibc-locale.patch | 2862 --- .../gcc/gcc-6.3/0005-uclibc-locale-no__x.patch | 257 - .../gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch | 68 - .../gcc/gcc-6.3/0007-uclibc-locale-update.patch | 542 - ...shared-to-link-commandline-for-musl-targe.patch | 87 - .../gcc/gcc-6.3/0041-ssp_nonshared.patch | 28 + ...e-alias-for-__cpu_indicator_init-instead-.patch | 2 +- ...-relax-the-restriction-on-subreg-reload-f.patch | 51 + .../meta/recipes-devtools/gcc/gcc-7.3.inc | 128 + .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 + .../gcc/gcc-7.3/0008-c99-snprintf.patch | 28 + .../0009-gcc-poison-system-directories.patch | 192 + .../gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch | 39 + .../0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 + .../gcc/gcc-7.3/0012-64-bit-multilib-hack.patch | 85 + .../gcc/gcc-7.3/0013-optional-libstdc.patch | 125 + ...0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 + .../gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch | 38 + ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 + .../gcc-7.3/0017-fortran-cross-compile-hack.patch | 46 + .../gcc/gcc-7.3/0018-cpp-honor-sysroot.patch | 54 + .../gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch | 57 + ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 234 + ...0021-gcc-Fix-argument-list-too-long-error.patch | 40 + .../gcc/gcc-7.3/0022-Disable-sdt.patch | 113 + .../gcc/gcc-7.3/0023-libtool.patch | 42 + ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 + ...tilib-config-files-from-B-instead-of-usin.patch | 102 + ...-libdir-from-.la-which-usually-points-to-.patch | 31 + .../gcc/gcc-7.3/0027-export-CPP.patch | 53 + ...AltiVec-generation-on-powepc-linux-target.patch | 56 + ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 + ...Ensure-target-gcc-headers-can-be-included.patch | 98 + ...-t-build-with-disable-dependency-tracking.patch | 54 + ...h-host-directory-during-relink-if-inst_pr.patch | 38 + ...IBS_DIR-replacement-instead-of-hardcoding.patch | 29 + .../0034-aarch64-Add-support-for-musl-ldso.patch | 28 + ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 + ...-handle-sysroot-support-for-nativesdk-gcc.patch | 213 + ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 + ...-various-_FOR_BUILD-and-related-variables.patch | 137 + .../0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 + ...shared-to-link-commandline-for-musl-targe.patch | 87 + ...c-libcpp-support-ffile-prefix-map-old-new.patch | 284 + ...ug-prefix-map-to-replace-ffile-prefix-map.patch | 43 + ...-fdebug-prefix-map-support-to-remap-sourc.patch | 54 + ...44-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 124 + ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 + .../gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch | 91 + .../gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch | 46 + ...le-non-legitimate-address-in-riscv_legiti.patch | 51 + .../fix-segmentation-fault-precompiled-hdr.patch | 49 + .../meta/recipes-devtools/gcc/gcc-common.inc | 3 +- .../recipes-devtools/gcc/gcc-configure-common.inc | 13 +- .../recipes-devtools/gcc/gcc-cross-canadian.inc | 7 +- .../recipes-devtools/gcc/gcc-cross-canadian_5.4.bb | 5 - .../recipes-devtools/gcc/gcc-cross-canadian_7.3.bb | 5 + .../recipes-devtools/gcc/gcc-cross-initial.inc | 3 +- .../recipes-devtools/gcc/gcc-cross-initial_5.4.bb | 2 - .../recipes-devtools/gcc/gcc-cross-initial_7.3.bb | 2 + .../meta/recipes-devtools/gcc/gcc-cross.inc | 13 +- .../meta/recipes-devtools/gcc/gcc-cross_5.4.bb | 3 - .../meta/recipes-devtools/gcc/gcc-cross_7.3.bb | 3 + .../gcc/gcc-crosssdk-initial_5.4.bb | 3 - .../gcc/gcc-crosssdk-initial_7.3.bb | 3 + .../meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb | 2 - .../meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb | 2 + .../meta/recipes-devtools/gcc/gcc-runtime.inc | 8 +- .../meta/recipes-devtools/gcc/gcc-runtime_5.4.bb | 7 - .../meta/recipes-devtools/gcc/gcc-runtime_7.3.bb | 7 + .../meta/recipes-devtools/gcc/gcc-sanitizers.inc | 1 + .../recipes-devtools/gcc/gcc-sanitizers_5.4.bb | 2 - .../recipes-devtools/gcc/gcc-sanitizers_7.3.bb | 2 + .../meta/recipes-devtools/gcc/gcc-source_5.4.bb | 4 - .../meta/recipes-devtools/gcc/gcc-source_7.3.bb | 4 + .../meta/recipes-devtools/gcc/gcc-target.inc | 8 + .../meta/recipes-devtools/gcc/gcc_5.4.bb | 9 - .../meta/recipes-devtools/gcc/gcc_7.3.bb | 10 + .../recipes-devtools/gcc/libgcc-initial_5.4.bb | 2 - .../recipes-devtools/gcc/libgcc-initial_7.3.bb | 2 + .../meta/recipes-devtools/gcc/libgcc.inc | 4 +- .../meta/recipes-devtools/gcc/libgcc_5.4.bb | 2 - .../meta/recipes-devtools/gcc/libgcc_7.3.bb | 2 + .../meta/recipes-devtools/gcc/libgfortran.inc | 3 +- .../meta/recipes-devtools/gcc/libgfortran_5.4.bb | 3 - .../meta/recipes-devtools/gcc/libgfortran_7.3.bb | 3 + .../meta/recipes-devtools/gdb/gdb-7.12.1.inc | 22 - .../meta/recipes-devtools/gdb/gdb-8.0.inc | 22 + .../meta/recipes-devtools/gdb/gdb-common.inc | 1 - .../gdb/gdb-cross-canadian_7.12.1.bb | 3 - .../recipes-devtools/gdb/gdb-cross-canadian_8.0.bb | 3 + .../meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb | 2 - .../meta/recipes-devtools/gdb/gdb-cross_8.0.bb | 2 + .../gdb/0001-include-sys-types.h-for-mode_t.patch | 6 +- ...0002-make-man-install-relative-to-DESTDIR.patch | 6 +- ...s-linux-nat-Define-_ABIO32-if-not-defined.patch | 8 +- ...Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 10 +- ...d-support-for-Renesas-SH-sh4-architecture.patch | 57 +- ...e-libreadline.a-when-using-disable-static.patch | 12 +- .../gdb/gdb/0007-use-asm-sgidefs.h.patch | 8 +- .../0008-Use-exorted-definitions-of-SIGRTMIN.patch | 14 +- .../gdb/gdb/0009-Change-order-of-CFLAGS.patch | 24 +- .../0010-resolve-restrict-keyword-conflict.patch | 8 +- .../meta/recipes-devtools/gdb/gdb_7.12.1.bb | 27 - .../meta/recipes-devtools/gdb/gdb_8.0.bb | 27 + .../yocto-poky/meta/recipes-devtools/git/git.inc | 1 - .../meta/recipes-devtools/git/git_2.11.1.bb | 11 - .../meta/recipes-devtools/git/git_2.13.3.bb | 11 + .../gnu-config/config-guess-uclibc.patch | 170 - .../gnu-config/gnu-config/uclibc.patch | 23 - .../gnu-config/gnu-config_20120814.bb | 1 - .../recipes-devtools/gnu-config/gnu-config_git.bb | 2 +- .../yocto-poky/meta/recipes-devtools/go/go-1.4.inc | 16 - ...alignment-for-the-.rel.plt-section-on-32-.patch | 33 - .../go/go-1.4/016-armhf-elf-header.patch | 24 - ...ckport-cmd-link-support-new-386-amd64-rel.patch | 225 - .../meta/recipes-devtools/go/go-1.4/syslog.patch | 62 - .../yocto-poky/meta/recipes-devtools/go/go-1.6.inc | 19 - .../go/go-1.6/armhf-elf-header.patch | 23 - .../go/go-1.6/fix-cc-handling.patch | 50 - .../go/go-1.6/fix-target-cc-for-build.patch | 17 - .../recipes-devtools/go/go-1.6/gotooldir.patch | 30 - .../go/go-1.6/split-host-and-target-build.patch | 63 - .../meta/recipes-devtools/go/go-1.6/syslog.patch | 62 - .../yocto-poky/meta/recipes-devtools/go/go-1.7.inc | 19 - .../go/go-1.7/armhf-elf-header.patch | 23 - .../go/go-1.7/fix-cc-handling.patch | 50 - .../go/go-1.7/fix-target-cc-for-build.patch | 17 - .../recipes-devtools/go/go-1.7/gotooldir.patch | 30 - .../go/go-1.7/split-host-and-target-build.patch | 62 - .../meta/recipes-devtools/go/go-1.7/syslog.patch | 62 - .../yocto-poky/meta/recipes-devtools/go/go-1.8.inc | 19 - .../go/go-1.8/armhf-elf-header.patch | 23 - .../go/go-1.8/fix-cc-handling.patch | 50 - .../go/go-1.8/fix-target-cc-for-build.patch | 17 - .../recipes-devtools/go/go-1.8/gotooldir.patch | 30 - .../go/go-1.8/split-host-and-target-build.patch | 62 - .../meta/recipes-devtools/go/go-1.8/syslog.patch | 62 - .../yocto-poky/meta/recipes-devtools/go/go-1.9.inc | 23 + .../0001-make.bash-quote-CC_FOR_TARGET.patch | 32 + ...CC-and-CXX-environment-variable-construct.patch | 67 + ...sh-better-separate-host-and-target-builds.patch | 92 + ...w-GOTOOLDIR-to-be-overridden-in-the-envir.patch | 68 + ...05-cmd-go-make-GOROOT-precious-by-default.patch | 41 + ...dd-GOTOOLDIR_BOOTSTRAP-environment-variab.patch | 36 + .../0007-ld-add-soname-to-shareable-objects.patch | 46 + ...dd-GOHOSTxx-indirection-for-cross-canadia.patch | 33 + ...dmode-pie-forces-external-linking-mode-on.patch | 47 + ...verride-CC-when-building-dist-and-go_boot.patch | 43 + .../go/go-1.9/set-external-linker.patch | 111 + .../recipes-devtools/go/go-bootstrap-native_1.4.bb | 3 - .../meta/recipes-devtools/go/go-common.inc | 6 +- .../meta/recipes-devtools/go/go-cross-canadian.inc | 62 + .../recipes-devtools/go/go-cross-canadian_1.9.bb | 2 + .../meta/recipes-devtools/go/go-cross.inc | 64 +- .../meta/recipes-devtools/go/go-cross_1.7.bb | 5 - .../meta/recipes-devtools/go/go-cross_1.8.bb | 5 - .../meta/recipes-devtools/go/go-cross_1.9.bb | 2 + .../meta/recipes-devtools/go/go-crosssdk.inc | 54 + .../meta/recipes-devtools/go/go-crosssdk_1.9.bb | 2 + .../meta/recipes-devtools/go/go-dep_0.3.0.bb | 16 + .../meta/recipes-devtools/go/go-native.inc | 50 +- .../meta/recipes-devtools/go/go-native_1.8.bb | 3 - .../meta/recipes-devtools/go/go-native_1.9.bb | 2 + .../meta/recipes-devtools/go/go-runtime.inc | 98 + .../meta/recipes-devtools/go/go-runtime_1.9.bb | 2 + .../meta/recipes-devtools/go/go-target.inc | 61 + .../yocto-poky/meta/recipes-devtools/go/go.inc | 86 - .../yocto-poky/meta/recipes-devtools/go/go_1.6.bb | 4 - .../yocto-poky/meta/recipes-devtools/go/go_1.7.bb | 2 - .../yocto-poky/meta/recipes-devtools/go/go_1.8.bb | 3 - .../yocto-poky/meta/recipes-devtools/go/go_1.9.bb | 2 + .../recipes-devtools/guile/files/arm_aarch64.patch | 19 - .../guile/files/arm_endianness.patch | 23 - ...-modules-are-removed-gc-test-as-unresolve.patch | 39 - ...with-owner-not-retained-threads-test-as-u.patch | 33 - .../guile/files/guile_2.0.6_fix_sed_error.patch | 24 - .../guile/files/libguile-Makefile.am-hook.patch | 42 - .../guile/files/opensuse/guile-64bit.patch | 39 - .../files/workaround-ice-ssa-corruption.patch | 60 - .../meta/recipes-devtools/guile/guile_2.0.14.bb | 125 - .../recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb | 1 + .../recipes-devtools/intltool/intltool_0.51.0.bb | 2 +- ...-FALLTHRU-comment-to-handle-GCC7-warnings.patch | 15 +- .../0001-Link-against-libm-when-needed.patch | 53 - .../0001-json_tokener-requires-INF-and-NAN.patch | 37 - .../meta/recipes-devtools/json-c/json-c_0.12.1.bb | 32 + .../meta/recipes-devtools/json-c/json-c_0.12.bb | 33 - .../kconfig-frontends_3.12.0.0.bb | 39 - ...2-Set-library-installation-path-correctly.patch | 2 +- ...cmake-drop-the-requirement-for-GTKDOC_SCA.patch | 2 +- ...ers-for-both-libsolv-and-libsolvext-libdn.patch | 15 +- ...-sysroot-path-to-introspection-tools-path.patch | 2 +- ...-library-installation-directory-correctly.patch | 2 +- ...-variables-with-pkg-config-cmake-s-own-mo.patch | 17 +- .../meta/recipes-devtools/libdnf/libdnf_0.9.3.bb | 28 + .../meta/recipes-devtools/libdnf/libdnf_git.bb | 29 - ...ly-set-the-library-installation-directory.patch | 2 +- ...-race-when-deleting-temporary-directories.patch | 2 +- ...ariables-with-pkg-config-not-with-cmake-m.patch | 2 +- ...rrect-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch | 40 + .../meta/recipes-devtools/librepo/librepo_git.bb | 1 + .../libtool/libtool/nohardcodepaths.patch | 2 + .../meta/recipes-devtools/libtool/libtool_2.4.6.bb | 2 + ...LibraryInfo-Undefine-libc-functions-if-th.patch | 93 + .../0002-llvm-allow-env-override-of-exe-path.patch | 39 + .../meta/recipes-devtools/llvm/llvm_git.bb | 185 + .../yocto-poky/meta/recipes-devtools/m4/m4.inc | 2 +- .../mkelfimage/mkelfimage/convert.bin.c | 348 + .../recipes-devtools/mkelfimage/mkelfimage_git.bb | 9 +- .../mklibs/mklibs-native_0.1.43.bb | 3 +- .../meta/recipes-devtools/mmc/mmc-utils_git.bb | 3 +- .../meta/recipes-devtools/mtd/mtd-utils_git.bb | 7 +- .../mtools/mtools/disable-hardcoded-configs.patch | 23 + .../meta/recipes-devtools/mtools/mtools_4.0.18.bb | 3 +- .../meta/recipes-devtools/nasm/nasm_2.12.02.bb | 28 - .../meta/recipes-devtools/nasm/nasm_2.13.01.bb | 28 + .../meta/recipes-devtools/ninja/ninja_1.7.2.bb | 30 + ...0001-Switch-all-scripts-to-use-Python-3.x.patch | 112 + .../opkg-utils/opkg-utils_0.3.5.bb | 62 + .../recipes-devtools/opkg-utils/opkg-utils_git.bb | 54 - .../recipes-devtools/opkg/opkg-arch-config_1.0.bb | 1 + .../opkg/opkg/opkg-configure.service | 2 +- .../opkg/opkg/status-conffile.patch | 69 - .../meta/recipes-devtools/opkg/opkg_0.3.4.bb | 76 - .../meta/recipes-devtools/opkg/opkg_0.3.5.bb | 75 + .../meta/recipes-devtools/orc/orc_0.4.26.bb | 27 - .../meta/recipes-devtools/orc/orc_0.4.27.bb | 27 + .../ossp-uuid/ossp-uuid/libtool-tag.patch | 21 + .../recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb | 2 + .../patchelf/patchelf/avoidholes.patch | 2 +- .../patchelf/fix-adjusting-startPage.patch | 38 + .../meta/recipes-devtools/patchelf/patchelf_0.9.bb | 1 + .../recipes-devtools/pax-utils/pax-utils_1.2.2.bb | 4 +- .../meta/recipes-devtools/perl/liburi-perl_1.71.bb | 30 - .../meta/recipes-devtools/perl/liburi-perl_1.72.bb | 30 + .../perl/libxml-parser-perl_2.44.bb | 1 + .../meta/recipes-devtools/perl/libxml-perl_0.08.bb | 1 + .../perl/libxml-simple-perl_2.22.bb | 24 - .../perl/libxml-simple-perl_2.24.bb | 24 + .../recipes-devtools/perl/perl-native_5.24.1.bb | 1 + ...emove-fstack-protector-strong-for-native-.patch | 2 +- .../perl/perl/debian/cpan-missing-site-dirs.diff | 1 + .../perl/perl/debian/cpan_definstalldirs.diff | 1 + .../perl/perl/debian/db_file_ver.diff | 1 + .../perl/perl/debian/deprecate-with-apt.diff | 1 + .../perl/perl/debian/doc_info.diff | 1 + .../perl/perl/debian/enc2xs_inc.diff | 1 + .../perl/perl/debian/errno_ver.diff | 2 +- .../perl/debian/extutils_set_libperl_path.diff | 1 + .../perl/perl/debian/fakeroot.diff | 1 + .../perl/perl/debian/find_html2text.diff | 1 + .../debian/fixes/document_makemaker_ccflags.diff | 1 + .../perl/debian/fixes/memoize_storable_nstore.diff | 1 + .../perl/perl/debian/fixes/net_smtp_docs.diff | 1 + .../perl/perl/debian/fixes/perl-Cnn.diff | 1 + .../debian/fixes/pod_man_reproducible_date.diff | 1 + .../perl/perl/debian/fixes/podman-empty-date.diff | 1 + .../perl/perl/debian/fixes/podman-pipe.diff | 1 + .../perl/perl/debian/fixes/podman-utc-docs.diff | 1 + .../perl/perl/debian/fixes/podman-utc.diff | 1 + .../perl/perl/debian/fixes/respect_umask.diff | 1 + .../perl/perl/debian/instmodsh_doc.diff | 1 + .../perl/perl/debian/ld_run_path.diff | 1 + .../perl/perl/debian/libnet_config_path.diff | 1 + .../perl/perl/debian/libperl_embed_doc.diff | 1 + .../perl/perl/debian/locale-robustness.diff | 1 + .../perl/perl/debian/makemaker-pasthru.diff | 1 + .../perl/perl/debian/makemaker_customized.diff | 1 + .../perl/perl/debian/mod_paths.diff | 1 + .../perl/perl/debian/no_packlist_perllocal.diff | 1 + .../perl/perl/debian/patchlevel.diff | 1 + .../perl/debian/perl5db-x-terminal-emulator.patch | 1 + .../recipes-devtools/perl/perl/debian/perlivp.diff | 1 + .../perl/perl/debian/pod2man-customized.diff | 1 + .../perl/perl/debian/prefix_changes.diff | 1 + .../perl/perl/debian/prune_libs.diff | 2 +- .../perl/perl/debian/regen-skip.diff | 1 + .../perl/perl/debian/skip-kfreebsd-crash.diff | 1 + .../perl/perl/debian/skip-upstream-git-tests.diff | 1 + .../perl/perl/debian/squelch-locale-warnings.diff | 1 + .../perl/perl/debian/writable_site_dirs.diff | 1 + ...le-t-odbm.t-fix-the-path-of-dbmt_common.p.patch | 2 + .../meta/recipes-devtools/perl/perl_5.24.1.bb | 27 +- ...imal-tweaks-to-compile-with-Visual-C-2015.patch | 224 + .../0001-stdinc.h-fix-build-with-mingw.patch | 48 + .../pkgconf/pkgconf/pkg-config-esdk.in | 24 + .../pkgconf/pkgconf/pkg-config-native.in | 6 + .../pkgconf/pkgconf/pkg-config-wrapper | 16 + .../meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb | 73 + ...e-Move-warning-pragma-outside-of-function.patch | 39 - .../pkgconfig/pkgconfig/pkg-config-esdk.in | 24 + .../recipes-devtools/pkgconfig/pkgconfig_git.bb | 21 +- .../meta/recipes-devtools/prelink/prelink_git.bb | 11 +- .../pseudo/files/0001-Use-epoll-API-on-Linux.patch | 292 + .../pseudo/files/fastopreply.patch | 76 + .../pseudo/files/toomanyfiles.patch | 59 + .../meta/recipes-devtools/pseudo/pseudo_1.8.2.bb | 3 + ...inite-loop-when-creating-np.pad-on-an-emp.patch | 45 + ...h-usr-and-so-on-for-libraries-by-default-.patch | 24 +- .../d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch | 47 - .../python-numpy/python-numpy_1.11.2.bb | 113 - .../python-numpy/python-numpy_1.13.1.bb | 114 + .../python-numpy/python3-numpy_1.11.2.bb | 114 - .../python-numpy/python3-numpy_1.13.1.bb | 114 + .../python/python-2.7-manifest.inc | 2 +- .../python/python-3.5-manifest.inc | 10 +- .../recipes-devtools/python/python-async_0.6.2.bb | 5 - .../meta/recipes-devtools/python/python-git.inc | 4 +- .../recipes-devtools/python/python-git_2.1.1.bb | 7 - .../recipes-devtools/python/python-gitdb_0.6.4.bb | 7 - .../meta/recipes-devtools/python/python-mako.inc | 5 +- .../recipes-devtools/python/python-mako_1.0.6.bb | 17 - .../python/python-native-2.7-manifest.inc | 5 +- .../python/python-native-3.5-manifest.inc | 4 +- .../recipes-devtools/python/python-nose_1.3.7.bb | 1 + .../python/python-pexpect_4.2.1.bb | 28 - .../python/python-ptyprocess_0.5.1.bb | 23 - .../meta/recipes-devtools/python/python-pycurl.inc | 31 - .../python/python-pycurl/no-static-link.patch | 17 - .../python/python-pycurl_7.21.5.bb | 3 - .../recipes-devtools/python/python-setuptools.inc | 8 +- .../python/python-setuptools_32.1.1.bb | 38 - .../python/python-setuptools_36.2.7.bb | 36 + .../recipes-devtools/python/python-six_1.10.0.bb | 4 - .../recipes-devtools/python/python-smmap_0.9.0.bb | 5 - .../recipes-devtools/python/python/multilib.patch | 2 +- ...ss-missing-libraries-to-Extension-for-mul.patch | 82 + ...pport_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch | 34 + .../use_sysroot_ncurses_instead_of_host.patch | 1 + .../python/python3-docutils_0.13.1.bb | 18 - .../python/python3-docutils_0.14.bb | 18 + .../recipes-devtools/python/python3-git_2.1.1.bb | 7 - .../recipes-devtools/python/python3-git_2.1.5.bb | 7 + .../recipes-devtools/python/python3-mako_1.0.6.bb | 11 - .../recipes-devtools/python/python3-mako_1.0.7.bb | 11 + .../python/python3-native_3.5.2.bb | 83 - .../python/python3-native_3.5.3.bb | 84 + .../recipes-devtools/python/python3-nose_1.3.7.bb | 4 + .../recipes-devtools/python/python3-pip_9.0.1.bb | 2 +- .../python/python3-pycairo_1.10.0.bb | 2 + .../python/python3-pycurl_7.21.5.bb | 5 - ...onfigure.ac-Don-t-use-gnome-common-macros.patch | 33 + .../python/python3-pygobject_3.22.0.bb | 31 - .../python/python3-pygobject_3.24.1.bb | 32 + .../recipes-devtools/python/python3-pygpgme_0.3.bb | 18 - .../python/python3-setuptools_32.1.1.bb | 37 - .../python/python3-setuptools_36.2.7.bb | 33 + .../python/python3/000-cross-compile.patch | 85 - ...the-shell-version-of-python-config-that-w.patch | 10 +- ...-Use-_sysconfigdata.py-to-initialize-dist.patch | 66 + .../python3/0001-cross-compile-support.patch | 93 + ...eakref-spewing-exceptions-during-interp-f.patch | 56 + ...ss-missing-libraries-to-Extension-for-mul.patch | 82 + .../python3/python3-fix-CVE-2016-1000110.patch | 148 - .../support_SOURCE_DATE_EPOCH_in_py_compile.patch | 97 + .../python/python3/upstream-random-fixes.patch | 288 +- .../meta/recipes-devtools/python/python3_3.5.2.bb | 224 - .../meta/recipes-devtools/python/python3_3.5.3.bb | 227 + .../meta/recipes-devtools/python/python_2.7.13.bb | 28 +- .../qemu/qemu-helper-native_1.0.bb | 1 - .../yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 1 - ...rt-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch | 719 + ...support-for-VM-suspend-resume-for-TPM-TIS.patch | 719 - .../04b33e21866412689f18b7ad6daf0a54d8f959a7.patch | 282 - .../recipes-devtools/qemu/qemu/CVE-2016-9908.patch | 44 - .../recipes-devtools/qemu/qemu/CVE-2016-9912.patch | 45 - .../qemu/qemu/CVE-2017-13672.patch | 504 + .../qemu/qemu/CVE-2017-13673.patch | 53 + .../qemu/qemu/CVE-2017-13711.patch | 87 + .../qemu/qemu/CVE-2017-14167.patch | 70 + .../qemu/qemu/add-ptest-in-makefile-v10.patch | 28 + .../qemu/qemu/add-ptest-in-makefile.patch | 28 - .../qemu/qemu/apic-fixup-fallthrough-to-PIC.patch | 46 + .../configure-fix-Darwin-target-detection.patch | 32 - .../recipes-devtools/qemu/qemu/ppc_locking.patch | 105 + .../qemu/qemu/qemu-2.5.0-cflags.patch | 2 + .../qemu/qemu/target-ppc-fix-user-mode.patch | 48 - .../meta/recipes-devtools/qemu/qemu_2.10.0.bb | 63 + .../meta/recipes-devtools/qemu/qemu_2.8.0.bb | 65 - .../recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 1 + .../meta/recipes-devtools/remake/remake.inc | 16 - .../remake/remake/version-remake.texi.patch | 16 - .../recipes-devtools/remake/remake_4.1+dbg-1.1.bb | 28 - ...code-lib-rpm-as-the-installation-path-for.patch | 2 +- .../files/0001-Fix-build-with-musl-C-library.patch | 2 +- ...y-package-building-into-a-separate-functi.patch | 84 + ...-binary-package-creation-via-thread-pools.patch | 127 + ...c-make-operations-over-string-pools-threa.patch | 207 + ...c-remove-static-local-variables-from-buil.patch | 337 + .../meta/recipes-devtools/rpm/rpm_git.bb | 23 +- .../ruby/ruby/CVE-2017-14064.patch | 353 - .../meta/recipes-devtools/ruby/ruby/extmk.patch | 1 + .../ruby/ruby/ruby-CVE-2017-14064.patch | 87 + .../meta/recipes-devtools/ruby/ruby_2.4.0.bb | 53 - .../meta/recipes-devtools/ruby/ruby_2.4.1.bb | 53 + .../run-postinsts/run-postinsts.service | 2 +- .../squashfs-tools-4.3-sysmacros.patch | 32 + .../squashfs-tools/squashfs-tools_git.bb | 2 + ...tion-Check-for-mips-and-alpha-before-usin.patch | 37 + .../strace/strace/Makefile-ptest.patch | 21 +- .../strace/strace/update-gawk-paths.patch | 58 +- .../meta/recipes-devtools/strace/strace_4.16.bb | 49 - .../meta/recipes-devtools/strace/strace_4.18.bb | 59 + .../subversion/subversion/CVE-2017-9800.patch | 136 + .../subversion/subversion_1.9.5.bb | 55 - .../subversion/subversion_1.9.6.bb | 56 + .../recipes-devtools/syslinux/syslinux_6.03.bb | 2 +- .../0001-parse-util-Don-t-use-xlocale.h.patch | 32 + .../systemd-bootchart/systemd-bootchart_231.bb | 4 +- .../recipes-devtools/tcf-agent/tcf-agent_git.bb | 17 +- .../meta/recipes-devtools/tcltk/tcl_8.6.6.bb | 97 - .../meta/recipes-devtools/tcltk/tcl_8.6.7.bb | 101 + .../recipes-devtools/unfs3/unfs3_0.9.22.r497.bb | 3 +- .../yocto-poky/meta/recipes-devtools/vala/vala.inc | 7 +- .../meta/recipes-devtools/vala/vala_0.34.4.bb | 8 - .../meta/recipes-devtools/vala/vala_0.36.4.bb | 8 + .../valgrind/0001-fix-build-for-musl-targets.patch | 69 - ...rop-setting-mcpu-to-cortex-a8-on-arm-arch.patch | 108 + ...m64-Define-__THROW-if-not-already-defined.patch | 32 + ...sts-Use-ucontext_t-instead-of-struct-ucon.patch | 30 + ...e-Rename-_sifields-to-__si_fields-on-musl.patch | 31 + ...tr_tester.c-Limit-rawmemchr-test-to-glibc.patch | 39 + ...02-context-APIs-are-not-available-on-musl.patch | 49 + ...emcheck-x86-Define-__THROW-if-not-defined.patch | 32 + ...rrect-include-directive-path-for-config.h.patch | 45 + ...verride-Replace-__modify_ldt-with-syscall.patch | 68 + .../valgrind/0004-Fix-out-of-tree-builds.patch | 34 +- ...4-pth_atfork1.c-Define-error-API-for-musl.patch | 37 + ...erifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch | 30 + ...d3.c-Dereference-pthread_t-before-adding-.patch | 32 + .../valgrind/valgrind/link-gz-tests.patch | 27 + .../valgrind/valgrind/ppc-headers.patch | 87 + .../recipes-devtools/valgrind/valgrind/run-ptest | 19 +- .../recipes-devtools/valgrind/valgrind_3.12.0.bb | 127 - .../recipes-devtools/valgrind/valgrind_3.13.0.bb | 153 + 695 files changed, 39908 insertions(+), 54396 deletions(-) delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in create mode 100755 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb (limited to 'import-layers/yocto-poky/meta/recipes-devtools') diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb deleted file mode 100644 index 1e660da74..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb +++ /dev/null @@ -1,4 +0,0 @@ -require apt-native.inc - -SRC_URI += "file://noconfigure.patch \ - file://no-curl.patch" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb new file mode 100644 index 000000000..5b16b503d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb @@ -0,0 +1,7 @@ +require apt-native.inc + +SRC_URI += "file://noconfigure.patch \ + file://no-curl.patch \ + file://gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch \ + file://gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch \ + file://gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc index 302637084..f1cde3068 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc @@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg" LICENSE = "GPLv2.0+" SECTION = "base" -SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ +SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ file://use-host.patch \ file://makerace.patch \ file://no-nls-dpkg.patch \ @@ -14,9 +14,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/ file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \ file://0001-apt-1.2.12-Fix-musl-build.patch \ " -SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7" -SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6" -LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" +SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0" +SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598" +LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" # the package is taken from snapshots.debian.org; that source is static and goes stale # so we check the latest upstream from a directory that does get updated diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch index b3a883bae..734ba00d4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch @@ -22,10 +22,10 @@ Signed-off-by: Roy Li 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc -index 834cb0e..84ded3a 100644 +index 533d9b367..6ce81bbd9 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc -@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() +@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() PackagesTotal++; } } @@ -38,7 +38,7 @@ index 834cb0e..84ded3a 100644 } /*}}}*/ bool pkgDPkgPM::Go(int StatusFd) -@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) +@@ -1268,8 +1262,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) // support subpressing of triggers processing for special // cases like d-i that runs the triggers handling manually @@ -50,7 +50,7 @@ index 834cb0e..84ded3a 100644 // for the progress diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822 -index 58fd732..3359762 100755 +index a8d59608d..0c6a9bbbf 100755 --- a/test/integration/test-apt-progress-fd-deb822 +++ b/test/integration/test-apt-progress-fd-deb822 @@ -27,36 +27,36 @@ Message: Installing testing (amd64) @@ -69,19 +69,19 @@ index 58fd732..3359762 100755 Status: progress Package: testing:amd64 --Percent: 50 -+Percent: 60 +-Percent: 50.0000 ++Percent: 60.0000 Message: Preparing to configure testing (amd64) Status: progress --Percent: 50 -+Percent: 60 +-Percent: 50.0000 ++Percent: 60.0000 Message: Running dpkg Status: progress Package: testing:amd64 --Percent: 50 -+Percent: 60 +-Percent: 50.0000 ++Percent: 60.0000 Message: Configuring testing (amd64) Status: progress @@ -98,7 +98,7 @@ index 58fd732..3359762 100755 Status: progress diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts -index d86e638..ef6d23b 100755 +index d86e638cd..ef6d23be2 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -59,8 +59,7 @@ startup packages configure @@ -122,5 +122,5 @@ index d86e638..ef6d23b 100755 checkpurge -- -2.1.4 +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch index 04b040658..f7ac19bfd 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch @@ -11,7 +11,7 @@ header so define it manually. apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h to avoid errors in types u_int_SIZE. -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Aníbal Limón --- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch new file mode 100644 index 000000000..438de209a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch @@ -0,0 +1,80 @@ +From 7ef2b2dba0e0bee450da3c8450ea782a3e7d6429 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= +Date: Tue, 22 Aug 2017 11:49:01 -0500 +Subject: [PATCH 3/3] Revert "avoid changing the global LC_TIME for Release + writing" + +This reverts commit 78e7b683c645e907db12658405a4b201a6243ea8. + +After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available) +versions this patch can be remove. + +Signed-off-by: Anibal Limon + +Upstream-Status: Inappropriate [embedded specific] +--- + ftparchive/writer.cc | 29 +++++++++++++++++------------ + 1 file changed, 17 insertions(+), 12 deletions(-) + +diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc +index 2596382..e43a643 100644 +--- a/ftparchive/writer.cc ++++ b/ftparchive/writer.cc +@@ -37,7 +37,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -984,29 +983,35 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) : + AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns")); + + time_t const now = time(NULL); +- auto const posix = std::locale("C.UTF-8"); + +- // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1 +- std::ostringstream datestr; +- datestr.imbue(posix); +- datestr << std::put_time(gmtime(&now), "%a, %d %b %Y %H:%M:%S UTC"); ++ setlocale(LC_TIME, "C"); ++ ++ char datestr[128]; ++ if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC", ++ gmtime(&now)) == 0) ++ { ++ datestr[0] = '\0'; ++ } + + time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0); +- std::ostringstream validstr; +- if (validuntil != now) ++ char validstr[128]; ++ if (now == validuntil || ++ strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC", ++ gmtime(&validuntil)) == 0) + { +- datestr.imbue(posix); +- validstr << std::put_time(gmtime(&validuntil), "%a, %d %b %Y %H:%M:%S UTC"); ++ validstr[0] = '\0'; + } + ++ setlocale(LC_TIME, ""); ++ + map Fields; + Fields["Origin"] = ""; + Fields["Label"] = ""; + Fields["Suite"] = ""; + Fields["Version"] = ""; + Fields["Codename"] = ""; +- Fields["Date"] = datestr.str(); +- Fields["Valid-Until"] = validstr.str(); ++ Fields["Date"] = datestr; ++ Fields["Valid-Until"] = validstr; + Fields["Architectures"] = ""; + Fields["Components"] = ""; + Fields["Description"] = ""; +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch new file mode 100644 index 000000000..088a66a3c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch @@ -0,0 +1,46 @@ +From c72ef9b6ae83a0a2fbbefd5c050335f65f0d2bc9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= +Date: Tue, 22 Aug 2017 11:48:46 -0500 +Subject: [PATCH 2/3] Revert "use de-localed std::put_time instead rolling our + own" + +This reverts commit 4ed2a17ab4334f019c00512aa54a162f0bf083c4. + +After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available) +versions this patch can be remove. + +Signed-off-by: Anibal Limon + +Upstream-Status: Inappropriate [embedded specific] +--- + apt-pkg/contrib/strutl.cc | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc +index c2ff01d..e9ef2be 100644 +--- a/apt-pkg/contrib/strutl.cc ++++ b/apt-pkg/contrib/strutl.cc +@@ -760,11 +760,15 @@ string TimeRFC1123(time_t Date) + if (gmtime_r(&Date, &Conv) == NULL) + return ""; + +- auto const posix = std::locale::classic(); +- std::ostringstream datestr; +- datestr.imbue(posix); +- datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT"); +- return datestr.str(); ++ char Buf[300]; ++ const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; ++ const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul", ++ "Aug","Sep","Oct","Nov","Dec"}; ++ ++ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday], ++ Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour, ++ Conv.tm_min,Conv.tm_sec); ++ return Buf; + } + /*}}}*/ + // ReadMessages - Read messages from the FD /*{{{*/ +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch new file mode 100644 index 000000000..cb3259187 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch @@ -0,0 +1,33 @@ +From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001 +From: Anibal Limon +Date: Tue, 22 Aug 2017 04:41:31 -0500 +Subject: [PATCH 1/3] apt-pkg/contrib/strutl.cc: Include array header + +If GCC version is less than 5 the array header needs to be included +to support std::array. + +After we drop debian8 and centos7 that has gcc < 5 versions this patch +can be remove. + +Signed-off-by: Anibal Limon + +Upstream-Status: Inappropriate [embedded specific] +--- + apt-pkg/contrib/strutl.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc +index 60d0ca8..c2ff01d 100644 +--- a/apt-pkg/contrib/strutl.cc ++++ b/apt-pkg/contrib/strutl.cc +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include + #include +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb deleted file mode 100644 index ae0bce933..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb +++ /dev/null @@ -1,20 +0,0 @@ -DEPENDS = "curl db zlib" -RDEPENDS_${PN} = "dpkg bash debianutils" -require apt.inc - -require apt-package.inc - -PACKAGECONFIG ??= "lzma" -PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz" -PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2" -PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4" - -FILES_${PN} += "${bindir}/apt-key" -apt-manpages += "doc/apt-key.8" - -do_install_append() { - #Write the correct apt-architecture to apt.conf - APT_CONF=${D}/etc/apt/apt.conf - echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} - oe_libinstall -so -C bin libapt-private ${D}${libdir}/ -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb new file mode 100644 index 000000000..ae0bce933 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb @@ -0,0 +1,20 @@ +DEPENDS = "curl db zlib" +RDEPENDS_${PN} = "dpkg bash debianutils" +require apt.inc + +require apt-package.inc + +PACKAGECONFIG ??= "lzma" +PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz" +PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2" +PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4" + +FILES_${PN} += "${bindir}/apt-key" +apt-manpages += "doc/apt-key.8" + +do_install_append() { + #Write the correct apt-architecture to apt.conf + APT_CONF=${D}/etc/apt/apt.conf + echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} + oe_libinstall -so -C bin libapt-private ${D}${libdir}/ +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb new file mode 100644 index 000000000..104dc3896 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb @@ -0,0 +1,14 @@ +SUMMARY = "a collection of freely re-usable Autoconf macros" +HOMEPAGE = "http://www.gnu.org/software/autoconf-archive/" +SECTION = "devel" +LICENSE = "GPL-3.0-with-autoconf-exception" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515" + +SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071" +SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc index f1b2dfca7..ea62df8fb 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc @@ -1,4 +1,4 @@ -SUMMARY = "A GNU tool that procude shell scripts to automatically configure software" +SUMMARY = "A GNU tool that produce shell scripts to automatically configure software" DESCRIPTION = "Autoconf is an extensible package of M4 macros that produce shell scripts to automatically \ configure software source code packages. Autoconf creates a configuration script for a package from a template \ file that lists the operating system features that the package can use, in the form of M4 macro calls." diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb deleted file mode 100644 index 853477cf7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Automated text and program generation tool" -DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\ - maintenance of programs that contain large amounts of repetitious text.\ - It is especially valuable in programs that have several blocks of text\ - that must be kept synchronized." -HOMEPAGE = "http://www.gnu.org/software/autogen/" -SECTION = "devel" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \ - file://increase-timeout-limit.patch \ - file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \ - file://fix-script-err-when-processing-libguile.patch \ - file://0001-config-libopts.m4-regenerate-it-from-config-libopts..patch \ - file://0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch \ -" - -SRC_URI[md5sum] = "551d15ccbf5b5fc5658da375d5003389" -SRC_URI[sha256sum] = "805c20182f3cb0ebf1571d3b01972851c56fb34348dfdc38799fd0ec3b2badbe" - -UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/" -UPSTREAM_CHECK_REGEX = "rel(?P\d+(\.\d+)+)/" - -DEPENDS = "guile-native libtool-native libxml2-native" - -inherit autotools texinfo native pkgconfig - -# autogen-native links against libguile which may have been relocated with sstate -# these environment variables ensure there isn't a relocation issue -export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0" -export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache" - -export POSIX_SHELL = "/usr/bin/env sh" - -do_install_append () { - create_wrapper ${D}/${bindir}/autogen \ - GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ - GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch deleted file mode 100644 index a14018e33..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch +++ /dev/null @@ -1,39 +0,0 @@ -From 45040e7d268329ebc40e6cb237c64a6637cfab5c Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Mon, 13 Mar 2017 20:22:10 -0700 -Subject: [PATCH] config/libopts.m4: regenerate it from config/libopts.def - -It was out of date compared to config/libopts.def, so regenerate it via -"autogen config/libopts.def" command. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - config/libopts.m4 | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/config/libopts.m4 b/config/libopts.m4 -index c7ba4f3..51e6a39 100644 ---- a/config/libopts.m4 -+++ b/config/libopts.m4 -@@ -2,7 +2,7 @@ dnl -*- buffer-read-only: t -*- vi: set ro: - dnl - dnl DO NOT EDIT THIS FILE (libopts.m4) - dnl --dnl It has been AutoGen-ed -+dnl It has been AutoGen-ed March 13, 2017 at 08:21:21 PM by AutoGen 5.18 - dnl From the definitions libopts.def - dnl and the template file conftest.tpl - dnl -@@ -114,6 +114,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ - AC_PROG_SED - [while : - do -+ test -x "$POSIX_SHELL" && break - POSIX_SHELL=`which bash` - test -x "$POSIX_SHELL" && break - POSIX_SHELL=`which dash` --- -2.10.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch deleted file mode 100644 index d5fe143ce..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9f69f3f5ef22bf1bcffb0e651efc260889cfaa46 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Mon, 13 Mar 2017 20:33:30 -0700 -Subject: [PATCH] autoopts/mk-tpl-config.sh: fix perl path - -Use "which perl" as shebang doesn't work when it is longer than -BINPRM_BUF_SIZE which is 128 usually. So use "/usr/bin/env perl" to -instead of. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - autoopts/mk-tpl-config.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh -index 093e808..8dfc6dd 100755 ---- a/autoopts/mk-tpl-config.sh -+++ b/autoopts/mk-tpl-config.sh -@@ -98,7 +98,7 @@ fix_scripts() { - st=`sed 1q $f` - - case "$st" in -- *perl ) echo '#!' `which perl` -+ *perl ) echo '#!/usr/bin/env perl' - sed 1d $f - ;; - --- -2.10.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch deleted file mode 100644 index 694a3953e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch +++ /dev/null @@ -1,37 +0,0 @@ -autogen-native: fix script err when processing libguile - -do_configure for autogen will fail if project directory path -contains '-I' character, which is caused by the unsuitable sed -script when processing libguile. - -Upstream-Status: Pending - -Signed-off-by: Zhenbo Gao -Signed-off-by: Yi Zhao - -diff --git a/config/ag_macros.m4 b/config/ag_macros.m4 -index 58186b6..58ed2ad 100644 ---- a/config/ag_macros.m4 -+++ b/config/ag_macros.m4 -@@ -32,7 +32,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[ - GUILE_FLAGS - [ag_gv=`gdir=\`pkg-config --cflags-only-I \ - guile-${GUILE_EFFECTIVE_VERSION} | \ -- sed 's/-I *//;s/ *-I.*/ /g'\` -+ sed 's/ *-I *\// \//g'\` - for d in $gdir - do test -f "$d/libguile/version.h" && gdir=$d && break - done -diff --git a/config/misc.def b/config/misc.def -index 490d361..6e183ef 100644 ---- a/config/misc.def -+++ b/config/misc.def -@@ -342,7 +342,7 @@ do-always = <<- _END_ALWAYS_ - GUILE_FLAGS - [ag_gv=`gdir=\`pkg-config --cflags-only-I \ - guile-${GUILE_EFFECTIVE_VERSION} | \ -- sed 's/-I *//;s/ *-I.*/ /g'\` -+ sed 's/ *-I *\// \//g'\` - test -z "$gdir" && gdir=/usr/include - for d in $gdir - do test -f "$d/libguile/version.h" && gdir=$d && break diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch deleted file mode 100644 index 9efd7e558..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch +++ /dev/null @@ -1,30 +0,0 @@ -Subject: [PATCH] autogen: increase timeout limit for shell commands - -On some overloaded hosts, shell commands of autogen may can not -finish in 5 secs. This has caused many build failures, so increase -the timeout limit to fix this. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Xin Ouyang ---- - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 58a848b..170dd9e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -178,9 +178,9 @@ time_delta=`expr ${config_end_time} - ${config_start_time} 2>/dev/null` - if test -z "${AG_TIMEOUT}" - then - if test -z "${time_delta}" -- then time_delta=10 -- elif test ${time_delta} -lt 5 -- then time_delta=5 ; fi -+ then time_delta=60 -+ elif test ${time_delta} -lt 30 -+ then time_delta=30 ; fi - - AG_TIMEOUT=${time_delta} - fi diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch deleted file mode 100644 index e56da7b1d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Pending - -mk-tpl-config.sh: force exit value to be 0 in subprocess - -The return value of statement list=`` is the exit value of the -subcommands. So if the subcommands fails, the compilation fails. This is obviously -not intended. In the normal case, we expect the grep command to fail as there should -be no 'noreturn' word in the libguile files. - -Signed-off-by: Chen Qi ---- - autoopts/mk-tpl-config.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh -index 926f5ab..6b4a0fb 100755 ---- a/autoopts/mk-tpl-config.sh -+++ b/autoopts/mk-tpl-config.sh -@@ -202,7 +202,7 @@ fix_guile() { - - list=`set +e ; exec 2>/dev/null - find ${libguiledir}/libguile* -type f | \ -- xargs grep -l -E '\'` -+ xargs grep -l -E '\' ; exit 0` - - test -z "$list" && exit 0 - --- -1.7.9.5 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch new file mode 100644 index 000000000..1221f1306 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch @@ -0,0 +1,27 @@ +From 25a8ac30486798d23f516722d73eb622e6264f28 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 26 Jul 2017 11:19:56 -0700 +Subject: [PATCH] automake: Add default libtool_tag to cppasm. + + * bin/automake.in (register_language): Define default libtool tag to be CC + since CPPASCOMPILE is using CC to call assembler + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + bin/automake.in | 1 + + 1 file changed, 1 insertion(+) + +Index: automake-1.15.1/bin/automake.in +=================================================================== +--- automake-1.15.1.orig/bin/automake.in ++++ automake-1.15.1/bin/automake.in +@@ -831,6 +831,7 @@ register_language ('name' => 'cppasm', + 'compiler' => 'CPPASCOMPILE', + 'compile_flag' => '-c', + 'output_flag' => '-o', ++ 'libtool_tag' => 'CC', + 'extensions' => ['.S', '.sx']); + + # Fortran 77 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch deleted file mode 100644 index 0e6895fb4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 13f00eb4493c217269b76614759e452d8302955e Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 31 Mar 2016 16:35:29 -0700 -Subject: [PATCH] automake: port to Perl 5.22 and later - -Without this change, Perl 5.22 complains "Unescaped left brace in -regex is deprecated" and this is planned to become a hard error in -Perl 5.26. See: -http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern -* bin/automake.in (substitute_ac_subst_variables): Escape left brace. - -Upstream-Status: Backport [13f00eb4493c217269b76614759e452d8302955e] ---- - bin/automake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/automake.in b/bin/automake.in -index a3a0aa318..2c8f31e14 100644 ---- a/bin/automake.in -+++ b/bin/automake.in -@@ -3878,7 +3878,7 @@ sub substitute_ac_subst_variables_worker - sub substitute_ac_subst_variables - { - my ($text) = @_; -- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; -+ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; - return $text; - } - --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb new file mode 100644 index 000000000..4f9b616b6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb @@ -0,0 +1,43 @@ +require automake.inc +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +DEPENDS_class-native = "autoconf-native" + +NAMEVER = "${@oe.utils.trim_version("${PV}", 2)}" + +RDEPENDS_${PN} += "\ + autoconf \ + perl \ + perl-module-bytes \ + perl-module-data-dumper \ + perl-module-strict \ + perl-module-text-parsewords \ + perl-module-thread-queue \ + perl-module-threads \ + perl-module-vars " + +RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native" +RDEPENDS_${PN}_class-nativesdk = "nativesdk-autoconf" + +SRC_URI += "file://python-libdir.patch \ + file://buildtest.patch \ + file://performance.patch \ + file://new_rt_path_for_test-driver.patch \ + file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \ + file://0001-automake-Add-default-libtool_tag-to-cppasm.patch \ + " + +SRC_URI[md5sum] = "95df3f2d6eb8f81e70b8cb63a93c8853" +SRC_URI[sha256sum] = "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260" + +PERL = "${USRBINPATH}/perl" +PERL_class-native = "${USRBINPATH}/env perl" +PERL_class-nativesdk = "${USRBINPATH}/env perl" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" + +do_install_append () { + install -d ${D}${datadir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb deleted file mode 100644 index 902dd63db..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb +++ /dev/null @@ -1,43 +0,0 @@ -require automake.inc -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -DEPENDS_class-native = "autoconf-native" - -NAMEVER = "${@oe.utils.trim_version("${PV}", 2)}" - -RDEPENDS_${PN} += "\ - autoconf \ - perl \ - perl-module-bytes \ - perl-module-data-dumper \ - perl-module-strict \ - perl-module-text-parsewords \ - perl-module-thread-queue \ - perl-module-threads \ - perl-module-vars " - -RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native" -RDEPENDS_${PN}_class-nativesdk = "nativesdk-autoconf" - -SRC_URI += "file://python-libdir.patch \ - file://buildtest.patch \ - file://performance.patch \ - file://new_rt_path_for_test-driver.patch \ - file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \ - file://0001-automake-port-to-Perl-5.22-and-later.patch \ - " - -SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3" -SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924" - -PERL = "${USRBINPATH}/perl" -PERL_class-native = "${USRBINPATH}/env perl" -PERL_class-nativesdk = "${USRBINPATH}/env perl" - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" - -do_install_append () { - install -d ${D}${datadir} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc deleted file mode 100644 index 1784c52ff..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc +++ /dev/null @@ -1,85 +0,0 @@ -LIC_FILES_CHKSUM="\ - file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ - file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ - file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - " - -def binutils_branch_version(d): - pvsplit = d.getVar('PV').split('.') - return pvsplit[0] + "_" + pvsplit[1] - -BINUPV = "${@binutils_branch_version(d)}" - -UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P\d+_(\d_?)*)" - -SRCREV = "354199c7692c1bed53a2a15f0e4d531457e95f17" -SRC_URI = "\ - git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \ - file://0003-gprof-add-uclibc-support-to-configure.patch \ - file://0004-Point-scripts-location-to-libdir.patch \ - file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ - file://0006-Explicitly-link-with-libm-on-uclibc.patch \ - file://0007-Use-libtool-2.4.patch \ - file://0008-Add-the-armv5e-architecture-to-binutils.patch \ - file://0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \ - file://0010-warn-for-uses-of-system-directories-when-cross-linki.patch \ - file://0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \ - file://0012-Change-default-emulation-for-mips64-linux.patch \ - file://0013-Add-support-for-Netlogic-XLP.patch \ - file://0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \ - file://0015-sync-with-OE-libtool-changes.patch \ - file://0016-Detect-64-bit-MIPS-targets.patch \ - file://CVE-2017-6965.patch \ - file://CVE-2017-6966.patch \ - file://0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch \ - file://0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch \ - file://CVE-2017-6969.patch \ - file://CVE-2017-6969_2.patch \ - file://CVE-2017-7209.patch \ - file://CVE-2017-7210.patch \ - file://CVE-2017-7223.patch \ - file://CVE-2017-7614.patch \ - file://CVE-2017-8393.patch \ - file://CVE-2017-8394.patch \ - file://CVE-2017-8395.patch \ - file://CVE-2017-8396_8397.patch \ - file://CVE-2017-8398.patch \ - file://CVE-2017-8421.patch \ - file://CVE-2017-9038_9044.patch \ - file://CVE-2017-9039.patch \ - file://CVE-2017-9040_9042.patch \ - file://CVE-2017-9742.patch \ - file://CVE-2017-9744.patch \ - file://CVE-2017-9745.patch \ - file://CVE-2017-9746.patch \ - file://CVE-2017-9747.patch \ - file://CVE-2017-9748.patch \ - file://CVE-2017-9749.patch \ - file://CVE-2017-9750.patch \ - file://CVE-2017-9751.patch \ - file://CVE-2017-9752.patch \ - file://CVE-2017-9753.patch \ - file://CVE-2017-9755.patch \ - file://CVE-2017-9756.patch \ - file://CVE-2017-9954.patch \ - file://CVE-2017-9955_1.patch \ - file://CVE-2017-9955_2.patch \ - file://CVE-2017-9955_3.patch \ - file://CVE-2017-9955_4.patch \ - file://CVE-2017-9955_5.patch \ - file://CVE-2017-9955_6.patch \ - file://CVE-2017-9955_7.patch \ - file://CVE-2017-9955_8.patch \ - file://CVE-2017-9955_9.patch \ -" -S = "${WORKDIR}/git" - -do_configure_prepend () { - rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc new file mode 100644 index 000000000..07a72e2b5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc @@ -0,0 +1,43 @@ +LIC_FILES_CHKSUM="\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ + file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ + file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + " + +def binutils_branch_version(d): + pvsplit = d.getVar('PV').split('.') + return pvsplit[0] + "_" + pvsplit[1] + +BINUPV = "${@binutils_branch_version(d)}" + +UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P\d+_(\d_?)*)" + +SRCREV ?= "90276f15379d380761fc499da2ba24cfb3c12a94" +BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git" +SRC_URI = "\ + ${BINUTILS_GIT_URI} \ + file://0003-configure-widen-the-regexp-for-SH-architectures.patch \ + file://0004-Point-scripts-location-to-libdir.patch \ + file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ + file://0006-Use-libtool-2.4.patch \ + file://0007-Add-the-armv5e-architecture-to-binutils.patch \ + file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \ + file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \ + file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \ + file://0011-Change-default-emulation-for-mips64-linux.patch \ + file://0012-Add-support-for-Netlogic-XLP.patch \ + file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \ + file://0014-Detect-64-bit-MIPS-targets.patch \ + file://0015-sync-with-OE-libtool-changes.patch \ +" +S = "${WORKDIR}/git" + +do_configure_prepend () { + rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb deleted file mode 100644 index 5dbaa0301..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb +++ /dev/null @@ -1,3 +0,0 @@ -require binutils.inc -require binutils-${PV}.inc -require binutils-cross-canadian.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb new file mode 100644 index 000000000..5dbaa0301 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb @@ -0,0 +1,3 @@ +require binutils.inc +require binutils-${PV}.inc +require binutils-cross-canadian.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb deleted file mode 100644 index fbd1f7d25..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb +++ /dev/null @@ -1,3 +0,0 @@ -require binutils.inc -require binutils-${PV}.inc -require binutils-cross.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb new file mode 100644 index 000000000..fbd1f7d25 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb @@ -0,0 +1,3 @@ +require binutils.inc +require binutils-${PV}.inc +require binutils-cross.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb deleted file mode 100644 index 37f4d6d2e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb +++ /dev/null @@ -1,13 +0,0 @@ -require binutils-cross_${PV}.bb - -inherit crosssdk - -PN = "binutils-crosssdk-${SDK_SYS}" - -PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" - -SRC_URI += "file://0001-binutils-crosssdk-Generate-relocatable-SDKs.patch" - -do_configure_prepend () { - sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb new file mode 100644 index 000000000..37f4d6d2e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb @@ -0,0 +1,13 @@ +require binutils-cross_${PV}.bb + +inherit crosssdk + +PN = "binutils-crosssdk-${SDK_SYS}" + +PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" + +SRC_URI += "file://0001-binutils-crosssdk-Generate-relocatable-SDKs.patch" + +do_configure_prepend () { + sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch index 8fb1b4ede..0b515d83c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch @@ -1,4 +1,4 @@ -From 689d011688b5ff9481d4367bef3dea7a7b2867fb Mon Sep 17 00:00:00 2001 +From 58ac9f95a3d83c29efaf7a8906fb6aefea8c8e79 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 01:58:54 +0000 Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs @@ -43,7 +43,7 @@ index b6940d376d..a42c4d7a4b 100755 LD_FLAG= DATA_ALIGNMENT=${DATA_ALIGNMENT_} diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index e65f9a3ccf..d99d2c1d2a 100644 +index d9138bc059..e48faeca43 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then @@ -58,5 +58,5 @@ index e65f9a3ccf..d99d2c1d2a 100644 if test -z "$PLT"; then IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }" -- -2.12.0 +2.14.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch index 14299fd1a..370333d5d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch @@ -1,4 +1,4 @@ -From 7c7de107b4b0a507d2aeca3e3a86d01cb4b51360 Mon Sep 17 00:00:00 2001 +From 8f929c616208351d0971d7dfd7574d48d3144603 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 6 Mar 2017 23:37:05 -0800 Subject: [PATCH 02/15] binutils-cross: Do not generate linker script @@ -57,5 +57,5 @@ index a42c4d7a4b..d727b4d07e 100755 libs=${NATIVE_LIB_DIRS} if [ "x${NATIVE}" = "xyes" ] ; then -- -2.12.0 +2.14.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch new file mode 100644 index 000000000..b6c09ccf1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch @@ -0,0 +1,47 @@ +From e5a806aae02a10290c71deb72f6294c98068368d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:07:33 +0000 +Subject: [PATCH 03/15] configure: widen the regexp for SH architectures + +gprof needs to know about uclibc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + configure | 2 +- + gprof/configure | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index be9dd89d9b..d8af155ab5 100755 +--- a/configure ++++ b/configure +@@ -3844,7 +3844,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/gprof/configure b/gprof/configure +index e71fe8b9e4..679e0dce77 100755 +--- a/gprof/configure ++++ b/gprof/configure +@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch deleted file mode 100644 index eddb42b4e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7893d2b24d0303bda3a0049846489619ffd1387b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:07:33 +0000 -Subject: [PATCH 03/15] gprof: add uclibc support to configure - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - gprof/configure | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/gprof/configure b/gprof/configure -index 9e6b8f3525..38a4c0b0e5 100755 ---- a/gprof/configure -+++ b/gprof/configure -@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch index c6b9de799..38eee3085 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch @@ -1,4 +1,4 @@ -From e34650c50574a8a39d694567ed607a63006b6f99 Mon Sep 17 00:00:00 2001 +From 3634ec3547bc0f8a5d1b8ad15365e2f836cda642 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 01:09:58 +0000 Subject: [PATCH 04/15] Point scripts location to libdir @@ -12,7 +12,7 @@ Signed-off-by: Khem Raj 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/Makefile.am b/ld/Makefile.am -index 15beaa7021..bbf9c671d8 100644 +index 625347ff62..d5334d2681 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -57,7 +57,7 @@ endif @@ -25,10 +25,10 @@ index 15beaa7021..bbf9c671d8 100644 EMUL = @EMUL@ EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/ld/Makefile.in b/ld/Makefile.in -index 042b690ed6..37e7b25e9a 100644 +index ba251777b0..a2cf2282b5 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in -@@ -452,7 +452,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) +@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. @@ -38,5 +38,5 @@ index 042b690ed6..37e7b25e9a 100644 BFDDIR = $(BASEDIR)/bfd INCDIR = $(BASEDIR)/include -- -2.12.0 +2.14.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch index 726f7020d..59150a2e4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch @@ -1,4 +1,4 @@ -From 42292f5533bca904f230a8e03ceee1f84ef0c4ec Mon Sep 17 00:00:00 2001 +From 9d37c8f68c07da63186cb993f1221f6c11eca422 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 01:27:17 +0000 Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not @@ -15,19 +15,19 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em -index 84adaef6df..ab8c74257e 100644 +index 9ac1840316..9dc4c149bc 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em -@@ -1411,6 +1411,8 @@ fragment <link.next) if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) -- -2.12.0 +2.14.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch deleted file mode 100644 index 9770ca7f0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 6a46bf151d7e53df8b5e7645a2d241967688368a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:32:49 +0000 -Subject: [PATCH 06/15] Explicitly link with libm on uclibc - -Description: - -We do not need to have the libtool patch anymore for binutils after -libtool has been updated upstream it include support for it. However -for building gas natively on uclibc systems we have to link it with --lm so that it picks up missing symbols. - -/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): -In function `floatformat_from_double': -floatformat.c:(.text+0x1ec): undefined reference to `frexp' -floatformat.c:(.text+0x2f8): undefined reference to `ldexp' -/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): -In function `floatformat_to_double': -floatformat.c:(.text+0x38a): undefined reference to `ldexp' -floatformat.c:(.text+0x3d2): undefined reference to `ldexp' -floatformat.c:(.text+0x43e): undefined reference to `ldexp' -floatformat.c:(.text+0x4e2): undefined reference to `ldexp' -collect2: ld returned 1 exit status -make[4]: *** [as-new] Error 1 - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - gas/configure.tgt | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/gas/configure.tgt b/gas/configure.tgt -index 711d537e95..7cd2dc176a 100644 ---- a/gas/configure.tgt -+++ b/gas/configure.tgt -@@ -494,6 +494,12 @@ case ${generic_target} in - *-*-netware) fmt=elf em=netware ;; - esac - -+case ${generic_target} in -+ arm-*-*uclibc*) -+ need_libm=yes -+ ;; -+esac -+ - case ${cpu_type} in - aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k) - bfd_gas=yes --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch new file mode 100644 index 000000000..e87efe653 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch @@ -0,0 +1,21157 @@ +From 71c734bb3754319029dcfc898cedbade42274dcb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 14 Feb 2016 17:04:07 +0000 +Subject: [PATCH 06/15] Use libtool 2.4 + +get libtool sysroot support + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + bfd/configure | 1318 +++++++++++++++++------ + bfd/configure.ac | 2 +- + binutils/configure | 1316 +++++++++++++++++------ + configure | 2 +- + gas/configure | 1314 +++++++++++++++++------ + gprof/configure | 1321 +++++++++++++++++------ + ld/configure | 1691 +++++++++++++++++++++-------- + libtool.m4 | 1080 +++++++++++++------ + ltmain.sh | 2925 +++++++++++++++++++++++++++++++++----------------- + ltoptions.m4 | 2 +- + ltversion.m4 | 12 +- + lt~obsolete.m4 | 2 +- + opcodes/configure | 1318 +++++++++++++++++------ + opcodes/configure.ac | 2 +- + zlib/configure | 1316 +++++++++++++++++------ + 15 files changed, 9927 insertions(+), 3694 deletions(-) + +diff --git a/bfd/configure b/bfd/configure +index 48276594ed..3ece8943f3 100755 +--- a/bfd/configure ++++ b/bfd/configure +@@ -672,6 +672,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -785,6 +788,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1461,6 +1465,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-mmap try using mmap for BFD input files if available + --with-separate-debug-dir=DIR + Look for global separate debug info in DIR +@@ -5393,8 +5399,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5434,7 +5440,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6120,8 +6126,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6170,6 +6176,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -6186,6 +6266,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6354,7 +6439,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6508,6 +6594,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6521,11 +6622,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6541,7 +6795,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6561,11 +6815,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6581,7 +6839,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6600,6 +6858,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6611,16 +6873,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6962,8 +7280,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6999,6 +7317,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7040,6 +7359,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7051,7 +7382,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7077,8 +7408,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7088,8 +7419,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7126,6 +7457,16 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ + + + +@@ -7142,6 +7483,45 @@ fi + + + ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7353,6 +7733,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7916,6 +8413,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8080,7 +8579,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8169,7 +8669,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8467,8 +8967,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8634,6 +9132,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8696,7 +9200,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8753,13 +9257,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8820,6 +9328,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9170,7 +9683,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9269,12 +9783,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9288,8 +9802,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9307,8 +9821,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9354,8 +9868,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9485,7 +9999,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9498,22 +10018,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9525,7 +10052,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9538,22 +10071,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9598,20 +10138,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9672,7 +10255,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9680,7 +10263,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9696,7 +10279,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9720,10 +10303,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9802,23 +10385,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -9903,7 +10499,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9922,9 +10518,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10500,8 +11096,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10534,13 +11131,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10632,7 +11287,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11472,10 +12127,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11578,10 +12233,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -14172,7 +14827,7 @@ SHARED_LDFLAGS= + if test "$enable_shared" = "yes"; then + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + # More hacks to build DLLs on Windows. +@@ -16879,13 +17534,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -16900,14 +17562,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -16940,12 +17605,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -17000,8 +17665,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -17011,12 +17681,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -17032,7 +17704,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -17068,6 +17739,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -17847,7 +18519,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -17950,19 +18623,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -17992,6 +18688,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -18001,6 +18703,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -18115,12 +18820,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -18207,9 +18912,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -18225,6 +18927,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -18257,210 +18962,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/bfd/configure.ac b/bfd/configure.ac +index 8fd03a7ea8..8816c3286c 100644 +--- a/bfd/configure.ac ++++ b/bfd/configure.ac +@@ -254,7 +254,7 @@ changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + changequote([,])dnl + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + # More hacks to build DLLs on Windows. +diff --git a/binutils/configure b/binutils/configure +index 22e1b1736e..321b63535b 100755 +--- a/binutils/configure ++++ b/binutils/configure +@@ -659,8 +659,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -772,6 +775,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1444,6 +1448,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-system-zlib use installed libz + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib +@@ -5160,8 +5166,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5201,7 +5207,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5887,8 +5893,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5937,6 +5943,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5953,6 +6033,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6121,7 +6206,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6275,6 +6361,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6290,9 +6391,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6308,7 +6562,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6328,11 +6582,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6348,7 +6606,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6367,6 +6625,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6378,12 +6640,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -6395,6 +6655,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6729,8 +7047,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6766,6 +7084,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6807,6 +7126,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6818,7 +7149,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6844,8 +7175,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6855,8 +7186,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6893,6 +7224,21 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6908,6 +7254,40 @@ fi + + + ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7120,6 +7500,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7683,6 +8180,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7878,7 +8377,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7967,7 +8467,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8265,8 +8765,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8432,6 +8930,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8494,7 +8998,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8551,13 +9055,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8618,6 +9126,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8968,7 +9481,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9067,12 +9581,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9086,8 +9600,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9105,8 +9619,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9152,8 +9666,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9283,7 +9797,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9296,22 +9816,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9323,7 +9850,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9336,22 +9869,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9396,20 +9936,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9470,7 +10053,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9478,7 +10061,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9494,7 +10077,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9518,10 +10101,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9600,23 +10183,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -9701,7 +10297,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9720,9 +10316,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10298,8 +10894,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10332,13 +10929,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10430,7 +11085,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11270,10 +11925,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11376,10 +12031,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -15446,13 +16101,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -15467,14 +16129,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -15507,12 +16172,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -15567,8 +16232,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -15578,12 +16248,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -15599,7 +16271,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -15635,6 +16306,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -16392,7 +17064,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -16495,19 +17168,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -16537,6 +17233,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -16546,6 +17248,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -16660,12 +17365,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -16752,9 +17457,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -16770,6 +17472,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -16802,210 +17507,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/configure b/configure +index d8af155ab5..005ed827ab 100755 +--- a/configure ++++ b/configure +@@ -3844,7 +3844,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh*-*-* | sh64-*-*) ++ sh-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/gas/configure b/gas/configure +index 93afb20c8f..81dd4cbd97 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -650,8 +650,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -763,6 +766,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -4921,8 +4925,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -4962,7 +4966,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5648,8 +5652,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5698,6 +5702,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5714,6 +5792,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -5882,7 +5965,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6036,6 +6120,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6051,9 +6150,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6069,7 +6321,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6089,11 +6341,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6109,7 +6365,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6128,6 +6384,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6139,12 +6399,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -6156,6 +6414,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6490,8 +6806,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6527,6 +6843,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6568,6 +6885,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6579,7 +6908,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6605,8 +6934,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6616,8 +6945,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6654,6 +6983,21 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6669,6 +7013,40 @@ fi + + + ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -6881,6 +7259,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7444,6 +7939,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7639,7 +8136,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7728,7 +8226,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8026,8 +8524,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8193,6 +8689,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8255,7 +8757,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8312,13 +8814,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8379,6 +8885,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8729,7 +9240,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8828,12 +9340,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -8847,8 +9359,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -8866,8 +9378,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -8913,8 +9425,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9044,7 +9556,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9057,22 +9575,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9084,7 +9609,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9097,22 +9628,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9157,20 +9695,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9231,7 +9812,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9239,7 +9820,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9255,7 +9836,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9279,10 +9860,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9361,23 +9942,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -9462,7 +10056,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9481,9 +10075,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10059,8 +10653,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10093,13 +10688,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10191,7 +10844,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11031,10 +11684,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11137,10 +11790,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -15436,13 +16089,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -15457,14 +16117,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -15497,12 +16160,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -15557,8 +16220,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -15568,12 +16236,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -15589,7 +16259,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -15625,6 +16294,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -16389,7 +17059,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -16492,19 +17163,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -16534,6 +17228,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -16543,6 +17243,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -16657,12 +17360,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -16749,9 +17452,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -16767,6 +17467,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -16799,210 +17502,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/gprof/configure b/gprof/configure +index 679e0dce77..ac4c016a63 100755 +--- a/gprof/configure ++++ b/gprof/configure +@@ -631,8 +631,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -744,6 +747,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1402,6 +1406,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -4836,8 +4842,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -4877,7 +4883,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5563,8 +5569,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5613,6 +5619,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5629,6 +5709,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -5797,7 +5882,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -5874,11 +5960,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +-linux-uclibc*) +- lt_cv_deplibs_check_method=pass_all +- lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` +- ;; +- + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' +@@ -5956,6 +6037,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -5971,9 +6067,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -5989,7 +6238,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6009,11 +6258,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6029,7 +6282,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6048,6 +6301,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6059,12 +6316,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} + + + +@@ -6076,6 +6331,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6410,8 +6723,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6447,6 +6760,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6488,6 +6802,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6499,7 +6825,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6525,8 +6851,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6536,8 +6862,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6574,6 +6900,18 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ + + + +@@ -6590,6 +6928,43 @@ fi + + + ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -6801,6 +7176,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7364,6 +7856,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7559,7 +8053,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7648,7 +8143,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -7946,8 +8441,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8113,6 +8606,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8175,7 +8674,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8232,13 +8731,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8299,6 +8802,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8649,7 +9157,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8748,12 +9257,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -8767,8 +9276,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -8786,8 +9295,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -8833,8 +9342,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -8964,7 +9473,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -8977,22 +9492,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9004,7 +9526,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9017,22 +9545,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9077,20 +9612,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9151,7 +9729,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9159,7 +9737,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9175,7 +9753,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9199,10 +9777,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9281,23 +9859,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -9382,7 +9973,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9401,9 +9992,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -9979,8 +10570,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10013,13 +10605,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10111,7 +10761,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -10951,10 +11601,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11057,10 +11707,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -13005,13 +13655,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -13026,14 +13683,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -13066,12 +13726,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -13126,8 +13786,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -13137,12 +13802,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -13158,7 +13825,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13194,6 +13860,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -13950,7 +14617,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -14053,19 +14721,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -14095,6 +14786,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -14104,6 +14801,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -14218,12 +14918,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -14310,9 +15010,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -14328,6 +15025,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -14360,210 +15060,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/ld/configure b/ld/configure +index d7f66f8cdc..4e71511bd1 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -655,8 +655,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -778,6 +781,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1464,6 +1468,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-lib-path=dir1:dir2... set default LIB_PATH + --with-sysroot=DIR Search for usr/lib et al within DIR. + +@@ -5658,8 +5664,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5699,7 +5705,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6385,8 +6391,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6435,6 +6441,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -6451,6 +6531,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6619,7 +6704,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6773,6 +6859,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6788,9 +6889,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6806,7 +7060,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6826,11 +7080,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6846,7 +7104,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6865,6 +7123,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6876,12 +7138,12 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ + + + +@@ -6891,6 +7153,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +@@ -7227,8 +7545,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7264,6 +7582,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7305,6 +7624,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7316,7 +7647,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7342,8 +7673,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7353,8 +7684,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7391,6 +7722,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -7404,6 +7748,42 @@ fi + + + ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7618,6 +7998,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -8181,6 +8678,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8249,6 +8748,16 @@ done + + + ++func_stripname_cnf () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname_cnf ++ ++ ++ + + + # Set options +@@ -8377,7 +8886,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8466,7 +8976,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8764,8 +9274,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8931,6 +9439,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8993,7 +9507,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -9050,13 +9564,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -9117,6 +9635,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9467,7 +9990,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9566,12 +10090,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9585,8 +10109,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9604,8 +10128,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9651,8 +10175,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9782,7 +10306,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9795,22 +10325,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9822,7 +10359,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9835,22 +10378,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9894,21 +10444,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +- # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ # no search path for DLLs. ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9969,7 +10562,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9977,7 +10570,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9993,7 +10586,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -10017,10 +10610,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -10099,23 +10692,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -10200,7 +10806,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -10219,9 +10825,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10797,8 +11403,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10831,13 +11438,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10929,7 +11594,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11769,10 +12434,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11875,10 +12540,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12270,6 +12935,7 @@ $RM -r conftest* + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC ++ lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX +@@ -12287,6 +12953,7 @@ $RM -r conftest* + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} ++ CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do +@@ -12569,7 +13236,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath__CXX+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -12582,22 +13255,29 @@ main () + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath__CXX ++fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + +@@ -12610,7 +13290,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath__CXX+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -12623,22 +13309,29 @@ main () + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath__CXX ++fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -12681,29 +13374,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) +- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, +- # as there is no search path for DLLs. +- hardcode_libdir_flag_spec_CXX='-L$libdir' +- export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' +- allow_undefined_flag_CXX=unsupported +- always_export_symbols_CXX=no +- enable_shared_with_static_runtimes_CXX=yes +- +- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then +- 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' +- # If the export-symbols file already is a .def file (1st line +- # is EXPORTS), use it as is; otherwise, prepend... +- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then +- cp $export_symbols $output_objdir/$soname.def; +- else +- echo EXPORTS > $output_objdir/$soname.def; +- cat $export_symbols >> $output_objdir/$soname.def; +- fi~ +- $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' +- else +- ld_shlibs_CXX=no +- fi +- ;; ++ case $GXX,$cc_basename in ++ ,cl* | no,cl*) ++ # Native MSVC ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec_CXX=' ' ++ allow_undefined_flag_CXX=unsupported ++ always_export_symbols_CXX=yes ++ file_list_spec_CXX='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' ++ enable_shared_with_static_runtimes_CXX=yes ++ # Don't use ranlib ++ old_postinstall_cmds_CXX='chmod 644 $oldlib' ++ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ func_to_tool_file "$lt_outputfile"~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # g++ ++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, ++ # as there is no search path for DLLs. ++ hardcode_libdir_flag_spec_CXX='-L$libdir' ++ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' ++ allow_undefined_flag_CXX=unsupported ++ always_export_symbols_CXX=no ++ enable_shared_with_static_runtimes_CXX=yes ++ ++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then ++ 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' ++ # If the export-symbols file already is a .def file (1st line ++ # is EXPORTS), use it as is; otherwise, prepend... ++ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ cp $export_symbols $output_objdir/$soname.def; ++ else ++ echo EXPORTS > $output_objdir/$soname.def; ++ cat $export_symbols >> $output_objdir/$soname.def; ++ fi~ ++ $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' ++ else ++ ld_shlibs_CXX=no ++ fi ++ ;; ++ esac ++ ;; + darwin* | rhapsody*) + + +@@ -12809,7 +13548,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ;; + *) + if test "$GXX" = yes; then +- 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' ++ 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' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no +@@ -12880,10 +13619,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) +- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) +- 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' ++ 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' + ;; + esac + fi +@@ -12924,9 +13663,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then +- 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' ++ 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' + else +- 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' ++ 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' + fi + fi + link_all_deplibs_CXX=yes +@@ -12996,20 +13735,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ +- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' ++ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $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' ++ $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' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +@@ -13204,7 +13943,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + 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' + ;; + *) +- 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' ++ 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' + ;; + esac + +@@ -13250,7 +13989,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' +@@ -13291,9 +14030,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then +- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' ++ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when +@@ -13428,6 +14167,13 @@ private: + }; + _LT_EOF + ++ ++_lt_libdeps_save_CFLAGS=$CFLAGS ++case "$CC $CFLAGS " in #( ++*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; ++*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; ++esac ++ + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -13441,7 +14187,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do +- case $p in ++ case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. +@@ -13450,13 +14196,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + test $p = "-R"; then + prev=$p + continue +- else +- prev= + fi + ++ # Expand the sysroot to ease extracting the directories later. ++ if test -z "$prev"; then ++ case $p in ++ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; ++ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; ++ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; ++ esac ++ fi ++ case $p in ++ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; ++ esac + if test "$pre_test_object_deps_done" = no; then +- case $p in +- -L* | -R*) ++ case ${prev} in ++ -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. +@@ -13476,8 +14231,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi ++ prev= + ;; + ++ *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. +@@ -13513,6 +14270,7 @@ else + fi + + $RM -f confest.$objext ++CFLAGS=$_lt_libdeps_save_CFLAGS + + # PORTME: override above test on systems where it is broken + case $host_os in +@@ -13548,7 +14306,7 @@ linux*) + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as +@@ -13613,8 +14371,6 @@ fi + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -13719,6 +14475,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + ;; + esac + ;; ++ mingw* | cygwin* | os2* | pw32* | cegcc*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ++ ;; + dgux*) + case $cc_basename in + ec++*) +@@ -13871,7 +14632,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + ;; + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' +@@ -13936,10 +14697,17 @@ case $host_os in + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 +-$as_echo "$lt_prog_compiler_pic_CXX" >&6; } +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } ++lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + + # + # Check to make sure the PIC flag actually works. +@@ -13997,6 +14765,8 @@ fi + + + ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -14174,6 +14944,7 @@ fi + $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. +@@ -14188,15 +14959,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" +- ;; ++ ;; + cygwin* | mingw* | cegcc*) +- 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' +- ;; ++ case $cc_basename in ++ cl*) ;; ++ *) ++ 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' ++ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ++ ;; ++ esac ++ ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ ;; + esac +- exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 + $as_echo "$ld_shlibs_CXX" >&6; } +@@ -14459,8 +15235,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -14492,13 +15269,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -14589,7 +15424,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -15048,6 +15883,7 @@ fi + fi # test -n "$compiler" + + CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC +@@ -18083,13 +18919,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -18104,14 +18947,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -18144,12 +18990,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -18188,8 +19034,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote + compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' + GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' + archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +@@ -18216,12 +19062,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_ + hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' + inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' + link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' + always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' + exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' + include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' + prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' ++postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' + file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' + hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' + compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +@@ -18259,8 +19105,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -18270,12 +19121,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -18291,7 +19144,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -18313,8 +19165,8 @@ LD_CXX \ + reload_flag_CXX \ + compiler_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ +-lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ ++lt_prog_compiler_wl_CXX \ + lt_prog_compiler_static_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + export_dynamic_flag_spec_CXX \ +@@ -18326,7 +19178,6 @@ no_undefined_flag_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ +-fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX \ + file_list_spec_CXX \ +@@ -18360,6 +19211,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -18374,7 +19226,8 @@ archive_expsym_cmds_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + export_symbols_cmds_CXX \ +-prelink_cmds_CXX; do ++prelink_cmds_CXX \ ++postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" +@@ -19167,7 +20020,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -19270,19 +20124,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -19312,6 +20189,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -19321,6 +20204,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -19435,12 +20321,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -19527,9 +20413,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -19545,6 +20428,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -19591,210 +20477,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +@@ -19822,12 +20667,12 @@ with_gcc=$GCC_CXX + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl_CXX +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_CXX + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl_CXX ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_CXX + +@@ -19914,9 +20759,6 @@ inherit_rpath=$inherit_rpath_CXX + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs_CXX + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path_CXX +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols_CXX + +@@ -19932,6 +20774,9 @@ include_expsyms=$lt_include_expsyms_CXX + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds_CXX + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds_CXX ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec_CXX + +diff --git a/libtool.m4 b/libtool.m4 +index 24d13f3440..e45fdc6998 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1,7 +1,8 @@ + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is free software; the Free Software Foundation gives +@@ -10,7 +11,8 @@ + + m4_define([_LT_COPYING], [dnl + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ]) + +-# serial 56 LT_INIT ++# serial 57 LT_INIT + + + # LT_PREREQ(VERSION) +@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + AC_SUBST(LIBTOOL)dnl + + _LT_SETUP +@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl + dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_CHECK_SHELL_FEATURES])dnl ++m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl + m4_require([_LT_CMD_RELOAD])dnl + m4_require([_LT_CHECK_MAGIC_METHOD])dnl ++m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl + m4_require([_LT_CMD_OLD_ARCHIVE])dnl + m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl ++m4_require([_LT_WITH_SYSROOT])dnl + + _LT_CONFIG_LIBTOOL_INIT([ + # See if we are running on zsh, and set the options which allow our +@@ -199,7 +205,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl + m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) + configured by $[0], generated by m4_PACKAGE_STRING. + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.lt script is free software; the Free Software Foundation + gives unlimited permision to copy, distribute and modify it." + +@@ -746,15 +752,12 @@ _LT_EOF + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + +- _LT_PROG_XSI_SHELLFNS ++ _LT_PROG_REPLACE_SHELLFNS + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + ], +@@ -980,6 +983,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD ++ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD ++ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + fi + ]) + +-# _LT_SYS_MODULE_PATH_AIX +-# ----------------------- ++# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) ++# ---------------------------------- + # Links a minimal program and checks the executable + # for the system default hardcoded library path. In most cases, + # this is /usr/lib:/lib, but when the MPI compilers are used + # the location of the communication and MPI libs are included too. + # If we don't find anything, use the default library path according + # to the aix ld manual. ++# Store the results from the different compilers for each TAGNAME. ++# Allow to override them for all tags through lt_cv_aix_libpath. + m4_defun([_LT_SYS_MODULE_PATH_AIX], + [m4_require([_LT_DECL_SED])dnl +-AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi],[]) +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ ++ lt_aix_libpath_sed='[ ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }]' ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi],[]) ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" ++ fi ++ ]) ++ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) ++fi + ])# _LT_SYS_MODULE_PATH_AIX + + +@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + + AC_MSG_CHECKING([how to print strings]) + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) + ])# _LT_PROG_ECHO_BACKSLASH + + ++# _LT_WITH_SYSROOT ++# ---------------- ++AC_DEFUN([_LT_WITH_SYSROOT], ++[AC_MSG_CHECKING([for sysroot]) ++AC_ARG_WITH([libtool-sysroot], ++[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified).], ++[], [with_libtool_sysroot=no]) ++ ++dnl lt_sysroot will always be passed unquoted. We quote it here ++dnl in case the user passed a directory name. ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ AC_MSG_RESULT([${with_libtool_sysroot}]) ++ AC_MSG_ERROR([The sysroot must be an absolute path.]) ++ ;; ++esac ++ ++ AC_MSG_RESULT([${lt_sysroot:-no}]) ++_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl ++[dependent libraries, and in which our libraries should be installed.])]) ++ + # _LT_ENABLE_LOCK + # --------------- + m4_defun([_LT_ENABLE_LOCK], +@@ -1320,14 +1369,47 @@ need_locks="$enable_libtool_lock" + ])# _LT_ENABLE_LOCK + + ++# _LT_PROG_AR ++# ----------- ++m4_defun([_LT_PROG_AR], ++[AC_CHECK_TOOLS(AR, [ar], false) ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++_LT_DECL([], [AR], [1], [The archiver]) ++_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) ++ ++AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ++ [lt_cv_ar_at_file=no ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], ++ [echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ]) ++ ]) ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++_LT_DECL([], [archiver_list_spec], [1], ++ [How to feed a file listing to the archiver]) ++])# _LT_PROG_AR ++ ++ + # _LT_CMD_OLD_ARCHIVE + # ------------------- + m4_defun([_LT_CMD_OLD_ARCHIVE], +-[AC_CHECK_TOOL(AR, ar, false) +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru +-_LT_DECL([], [AR], [1], [The archiver]) +-_LT_DECL([], [AR_FLAGS], [1]) ++[_LT_PROG_AR + + AC_CHECK_TOOL(STRIP, strip, :) + test -z "$STRIP" && STRIP=: +@@ -1623,7 +1705,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-[#line __oline__ "configure" ++[#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -1667,10 +1749,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -2210,8 +2292,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -2244,13 +2327,71 @@ m4_if([$1], [],[ + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -2342,7 +2483,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -2950,6 +3091,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -3016,7 +3162,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -3167,6 +3314,21 @@ tpf*) + ;; + esac + ]) ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + _LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) + _LT_DECL([], [file_magic_cmd], [1], +- [Command to use when deplibs_check_method == "file_magic"]) ++ [Command to use when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [file_magic_glob], [1], ++ [How to find potential files when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [want_nocaseglob], [1], ++ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) + ])# _LT_CHECK_MAGIC_METHOD + + +@@ -3277,6 +3443,67 @@ dnl aclocal-1.4 backwards compatibility: + dnl AC_DEFUN([AM_PROG_NM], []) + dnl AC_DEFUN([AC_PROG_NM], []) + ++# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++# -------------------------------- ++# how to determine the name of the shared library ++# associated with a specific link library. ++# -- PORTME fill in with the dynamic library characteristics ++m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], ++[m4_require([_LT_DECL_EGREP]) ++m4_require([_LT_DECL_OBJDUMP]) ++m4_require([_LT_DECL_DLLTOOL]) ++AC_CACHE_CHECK([how to associate runtime and link libraries], ++lt_cv_sharedlib_from_linklib_cmd, ++[lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++]) ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++_LT_DECL([], [sharedlib_from_linklib_cmd], [1], ++ [Command to associate shared and link libraries]) ++])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++ ++ ++# _LT_PATH_MANIFEST_TOOL ++# ---------------------- ++# locate the manifest tool ++m4_defun([_LT_PATH_MANIFEST_TOOL], ++[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], ++ [lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&AS_MESSAGE_LOG_FD ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest*]) ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ++])# _LT_PATH_MANIFEST_TOOL ++ + + # LT_LIB_M + # -------- +@@ -3403,8 +3630,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -3440,6 +3667,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -3473,6 +3701,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT@&t@_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT@&t@_DLSYM_CONST ++#else ++# define LT@&t@_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -3484,7 +3724,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi +@@ -3551,6 +3791,13 @@ else + AC_MSG_RESULT(ok) + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) + _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], +@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_address], + _LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) ++_LT_DECL([], [nm_file_list_spec], [1], ++ [Specify filename containing input files for $NM]) + ]) # _LT_CMD_GLOBAL_SYMBOLS + + +@@ -3572,7 +3821,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)= + +-AC_MSG_CHECKING([for $compiler option to produce PIC]) + m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -3678,6 +3926,12 @@ m4_if([$1], [CXX], [ + ;; + esac + ;; ++ mingw* | cygwin* | os2* | pw32* | cegcc*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ m4_if([$1], [GCJ], [], ++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ++ ;; + dgux*) + case $cc_basename in + ec++*) +@@ -3830,7 +4084,7 @@ m4_if([$1], [CXX], [ + ;; + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +@@ -4053,6 +4307,12 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -4115,7 +4375,7 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; +@@ -4172,9 +4432,11 @@ case $host_os in + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; + esac +-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], +- [How to pass a linker flag through the compiler]) ++ ++AC_CACHE_CHECK([for $compiler option to produce PIC], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) ++_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + + # + # Check to make sure the PIC flag actually works. +@@ -4193,6 +4455,8 @@ fi + _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + ++_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], ++ [How to pass a linker flag through the compiler]) + # + # Check to make sure the static flag actually works. + # +@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + m4_defun([_LT_LINKER_SHLIBS], + [AC_REQUIRE([LT_PATH_LD])dnl + AC_REQUIRE([LT_PATH_NM])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl + m4_require([_LT_DECL_SED])dnl +@@ -4221,6 +4486,7 @@ m4_require([_LT_TAG_COMPILER])dnl + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. +@@ -4235,15 +4501,20 @@ m4_if([$1], [CXX], [ + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" +- ;; ++ ;; + cygwin* | mingw* | cegcc*) +- _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' +- ;; ++ case $cc_basename in ++ cl*) ;; ++ *) ++ _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' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ++ ;; ++ esac ++ ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ ;; + esac +- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + ], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= +@@ -4411,7 +4682,8 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- _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' ++ _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' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _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' +@@ -4510,12 +4782,12 @@ _LT_EOF + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' +- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -4529,8 +4801,8 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _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' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _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' + fi + ;; + +@@ -4548,8 +4820,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _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' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4595,8 +4867,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _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' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4726,7 +4998,7 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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" + else +@@ -4737,7 +5009,7 @@ _LT_EOF + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -4781,20 +5053,63 @@ _LT_EOF + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' +- # FIXME: Should let the user specify the lib program. +- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' +- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ _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' ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ # FIXME: Should let the user specify the lib program. ++ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -4828,7 +5143,7 @@ _LT_EOF + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no +@@ -4836,7 +5151,7 @@ _LT_EOF + + hpux9*) + if test "$GCC" = yes; then +- _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' ++ _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' + else + _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' + fi +@@ -4852,7 +5167,7 @@ _LT_EOF + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -4876,10 +5191,10 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -4926,16 +5241,31 @@ _LT_EOF + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- _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' ++ _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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- AC_LINK_IFELSE(int foo(void) {}, +- _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' +- ) +- LDFLAGS="$save_LDFLAGS" ++ # This should be the same for all languages, so no per-tag cache variable. ++ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], ++ [lt_cv_irix_exported_symbol], ++ [save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ AC_LINK_IFELSE( ++ [AC_LANG_SOURCE( ++ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], ++ [C++], [[int foo (void) { return 0; }]], ++ [Fortran 77], [[ ++ subroutine foo ++ end]], ++ [Fortran], [[ ++ subroutine foo ++ end]])])], ++ [lt_cv_irix_exported_symbol=yes], ++ [lt_cv_irix_exported_symbol=no]) ++ LDFLAGS="$save_LDFLAGS"]) ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ _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' ++ fi + else + _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' + _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' +@@ -5020,7 +5350,7 @@ _LT_EOF + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _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' ++ _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' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +@@ -5039,9 +5369,9 @@ _LT_EOF + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -5313,8 +5643,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], + to runtime path list]) + _LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +-_LT_TAGDECL([], [fix_srcfile_path], [1], +- [Fix the shell variable $srcfile for the compiler]) + _LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) + _LT_TAGDECL([], [export_symbols_cmds], [2], +@@ -5325,6 +5653,8 @@ _LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) + _LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) ++_LT_TAGDECL([], [postlink_cmds], [2], ++ [Commands necessary for finishing linking programs]) + _LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) + dnl FIXME: Not yet implemented +@@ -5426,6 +5756,7 @@ CC="$lt_save_CC" + m4_defun([_LT_LANG_CXX_CONFIG], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes; then + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC ++ lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX +@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes; then + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} ++ CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _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" +@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes; then + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes; then + ;; + + cygwin* | mingw* | pw32* | cegcc*) +- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, +- # as there is no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_TAGVAR(always_export_symbols, $1)=no +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- +- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then +- _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' +- # If the export-symbols file already is a .def file (1st line +- # is EXPORTS), use it as is; otherwise, prepend... +- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then +- cp $export_symbols $output_objdir/$soname.def; +- else +- echo EXPORTS > $output_objdir/$soname.def; +- cat $export_symbols >> $output_objdir/$soname.def; +- fi~ +- $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' +- else +- _LT_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; ++ case $GXX,$cc_basename in ++ ,cl* | no,cl*) ++ # Native MSVC ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ func_to_tool_file "$lt_outputfile"~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # g++ ++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, ++ # as there is no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=no ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then ++ _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' ++ # If the export-symbols file already is a .def file (1st line ++ # is EXPORTS), use it as is; otherwise, prepend... ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ cp $export_symbols $output_objdir/$soname.def; ++ else ++ echo EXPORTS > $output_objdir/$soname.def; ++ cat $export_symbols >> $output_objdir/$soname.def; ++ fi~ ++ $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' ++ else ++ _LT_TAGVAR(ld_shlibs, $1)=no ++ fi ++ ;; ++ esac ++ ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; +@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes; then + ;; + *) + if test "$GXX" = yes; then +- _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' ++ _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' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no +@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) +- _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' ++ _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' + ;; + *) +- _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' ++ _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' + ;; + esac + fi +@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes; then + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then +- _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' ++ _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' + else +- _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' ++ _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' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes +@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ +- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' ++ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $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' ++ $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' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes; then + _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' + ;; + *) +- _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' ++ _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' + ;; + esac + +@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes; then + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' +@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes; then + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' ++ _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' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when +@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes; then + fi # test -n "$compiler" + + CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC +@@ -6445,6 +6825,29 @@ AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + + ++# _LT_FUNC_STRIPNAME_CNF ++# ---------------------- ++# func_stripname_cnf prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# ++# This function is identical to the (non-XSI) version of func_stripname, ++# except this one can be used by m4 code that may be executed by configure, ++# rather than the libtool script. ++m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl ++AC_REQUIRE([_LT_DECL_SED]) ++AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) ++func_stripname_cnf () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname_cnf ++])# _LT_FUNC_STRIPNAME_CNF ++ + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -6453,6 +6856,7 @@ AC_LANG_POP + # objects, libraries and library flags. + m4_defun([_LT_SYS_HIDDEN_LIBDEPS], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl ++AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl + # Dependencies to place before and after the object being linked: + _LT_TAGVAR(predep_objects, $1)= + _LT_TAGVAR(postdep_objects, $1)= +@@ -6503,6 +6907,13 @@ public class foo { + }; + _LT_EOF + ]) ++ ++_lt_libdeps_save_CFLAGS=$CFLAGS ++case "$CC $CFLAGS " in #( ++*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; ++*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; ++esac ++ + dnl Parse the compiler output and extract the necessary + dnl objects, libraries and library flags. + if AC_TRY_EVAL(ac_compile); then +@@ -6514,7 +6925,7 @@ if AC_TRY_EVAL(ac_compile); then + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do +- case $p in ++ case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. +@@ -6523,13 +6934,22 @@ if AC_TRY_EVAL(ac_compile); then + test $p = "-R"; then + prev=$p + continue +- else +- prev= + fi + ++ # Expand the sysroot to ease extracting the directories later. ++ if test -z "$prev"; then ++ case $p in ++ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; ++ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; ++ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; ++ esac ++ fi ++ case $p in ++ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; ++ esac + if test "$pre_test_object_deps_done" = no; then +- case $p in +- -L* | -R*) ++ case ${prev} in ++ -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. +@@ -6549,8 +6969,10 @@ if AC_TRY_EVAL(ac_compile); then + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi ++ prev= + ;; + ++ *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. +@@ -6586,6 +7008,7 @@ else + fi + + $RM -f confest.$objext ++CFLAGS=$_lt_libdeps_save_CFLAGS + + # PORTME: override above test on systems where it is broken + m4_if([$1], [CXX], +@@ -6622,7 +7045,7 @@ linux*) + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as +@@ -6735,7 +7158,9 @@ if test "$_lt_disable_F77" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} ++ CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -6789,6 +7214,7 @@ if test "$_lt_disable_F77" != yes; then + + GCC=$lt_save_GCC + CC="$lt_save_CC" ++ CFLAGS="$lt_save_CFLAGS" + fi # test "$_lt_disable_F77" != yes + + AC_LANG_POP +@@ -6865,7 +7291,9 @@ if test "$_lt_disable_FC" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} ++ CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + +@@ -6921,7 +7349,8 @@ if test "$_lt_disable_FC" != yes; then + fi # test -n "$compiler" + + GCC=$lt_save_GCC +- CC="$lt_save_CC" ++ CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + fi # test "$_lt_disable_FC" != yes + + AC_LANG_POP +@@ -6958,10 +7387,12 @@ _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. +-lt_save_CC="$CC" ++lt_save_CC=$CC ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC=yes + CC=${GCJ-"gcj"} ++CFLAGS=$GCJFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_TAGVAR(LD, $1)="$LD" +@@ -6992,7 +7423,8 @@ fi + AC_LANG_RESTORE + + GCC=$lt_save_GCC +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_GCJ_CONFIG + + +@@ -7027,9 +7459,11 @@ _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC= + CC=${RC-"windres"} ++CFLAGS= + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -7042,7 +7476,8 @@ fi + + GCC=$lt_save_GCC + AC_LANG_RESTORE +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_RC_CONFIG + + +@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) + AC_SUBST([OBJDUMP]) + ]) + ++# _LT_DECL_DLLTOOL ++# ---------------- ++# Ensure DLLTOOL variable is set. ++m4_defun([_LT_DECL_DLLTOOL], ++[AC_CHECK_TOOL(DLLTOOL, dlltool, false) ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) ++AC_SUBST([DLLTOOL]) ++]) + + # _LT_DECL_SED + # ------------ +@@ -7194,8 +7638,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl + ])# _LT_CHECK_SHELL_FEATURES + + +-# _LT_PROG_XSI_SHELLFNS +-# --------------------- +-# Bourne and XSI compatible variants of some useful shell functions. +-m4_defun([_LT_PROG_XSI_SHELLFNS], +-[case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $[*] )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} ++# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) ++# ------------------------------------------------------ ++# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and ++# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. ++m4_defun([_LT_PROG_FUNCTION_REPLACE], ++[dnl { ++sed -e '/^$1 ()$/,/^} # $1 /c\ ++$1 ()\ ++{\ ++m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) ++} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++]) + +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" + +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} ++# _LT_PROG_REPLACE_SHELLFNS ++# ------------------------- ++# Replace existing portable implementations of several shell functions with ++# equivalent extended shell implementations where those features are available.. ++m4_defun([_LT_PROG_REPLACE_SHELLFNS], ++[if test x"$xsi_shell" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl ++ func_basename_result="${1##*/}"]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac ++ func_basename_result="${1##*/}"]) + +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl ++ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are ++ # positional parameters, so assign one to ordinary parameter first. ++ func_stripname_result=${3} ++ func_stripname_result=${func_stripname_result#"${1}"} ++ func_stripname_result=${func_stripname_result%"${2}"}]) + +-dnl func_dirname_and_basename +-dnl A portable version of this function is already defined in general.m4sh +-dnl so there is no need for it here. ++ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl ++ func_split_long_opt_name=${1%%=*} ++ func_split_long_opt_arg=${1#*=}]) + +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} ++ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl ++ func_split_short_opt_arg=${1#??} ++ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + +-# sed scripts: +-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[[^=]]*=//' ++ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl ++ case ${1} in ++ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; ++ *) func_lo2o_result=${1} ;; ++ esac]) + +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) ++fi + +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$[@]"` +-} ++if test x"$lt_shell_append" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl ++ func_quote_for_eval "${2}" ++dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ ++ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + +-_LT_EOF +-esac ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi + +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" ++if test x"$_lt_function_replace_fail" = x":"; then ++ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) ++fi ++]) + +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]+=\$[2]" +-} +-_LT_EOF ++# _LT_PATH_CONVERSION_FUNCTIONS ++# ----------------------------- ++# Determine which file name conversion functions should be used by ++# func_to_host_file (and, implicitly, by func_to_host_path). These are needed ++# for certain cross-compile configurations and native mingw. ++m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], ++[AC_REQUIRE([AC_CANONICAL_HOST])dnl ++AC_REQUIRE([AC_CANONICAL_BUILD])dnl ++AC_MSG_CHECKING([how to convert $build file names to $host format]) ++AC_CACHE_VAL(lt_cv_to_host_file_cmd, ++[case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac + ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]=\$$[1]\$[2]" +-} +- +-_LT_EOF ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac + ;; +- esac ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++]) ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) ++_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], ++ [0], [convert $build file names to $host format])dnl ++ ++AC_MSG_CHECKING([how to convert $build file names to toolchain format]) ++AC_CACHE_VAL(lt_cv_to_tool_file_cmd, ++[#assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac + ]) ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) ++_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], ++ [0], [convert $build files to toolchain format])dnl ++])# _LT_PATH_CONVERSION_FUNCTIONS +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec85d7..70e856e065 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -1,10 +1,9 @@ +-# Generated from ltmain.m4sh. + +-# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# libtool (GNU libtool) 2.4 + # Written by Gordon Matzigkeit , 1996 + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +-# 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + # This is free software; see the source for copying conditions. There is NO + # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +@@ -38,7 +37,6 @@ + # -n, --dry-run display commands without modifying any files + # --features display basic configuration information and exit + # --mode=MODE use operation mode MODE +-# --no-finish let install mode avoid finish commands + # --preserve-dup-deps don't remove duplicate dependency libraries + # --quiet, --silent don't print informational messages + # --no-quiet, --no-silent +@@ -71,17 +69,19 @@ + # compiler: $LTCC + # compiler flags: $LTCFLAGS + # linker: $LD (gnu? $with_gnu_ld) +-# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# $progname: (GNU libtool) 2.4 + # automake: $automake_version + # autoconf: $autoconf_version + # + # Report bugs to . ++# GNU libtool home page: . ++# General help using GNU software: . + + PROGRAM=libtool + PACKAGE=libtool +-VERSION=2.2.7a +-TIMESTAMP=" 1.3134 2009-11-29" +-package_revision=1.3134 ++VERSION=2.4 ++TIMESTAMP="" ++package_revision=1.3293 + + # Be Bourne compatible + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +@@ -106,9 +106,6 @@ _LTECHO_EOF' + } + + # NLS nuisances: We save the old values to restore during execute mode. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). + lt_user_locale= + lt_safe_locale= + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +@@ -121,15 +118,13 @@ do + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" + done ++LC_ALL=C ++LANGUAGE=C ++export LANGUAGE LC_ALL + + $lt_unset CDPATH + + +- +- +- +- +- + # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh + # is ksh but when the shell is invoked as "sh" and the current value of + # the _XPG environment variable is not equal to 1 (one), the special +@@ -140,7 +135,7 @@ progpath="$0" + + + : ${CP="cp -f"} +-: ${ECHO=$as_echo} ++test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} + : ${EGREP="/bin/grep -E"} + : ${FGREP="/bin/grep -F"} + : ${GREP="/bin/grep"} +@@ -149,7 +144,7 @@ progpath="$0" + : ${MKDIR="mkdir"} + : ${MV="mv -f"} + : ${RM="rm -f"} +-: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} ++: ${SED="/bin/sed"} + : ${SHELL="${CONFIG_SHELL-/bin/sh}"} + : ${Xsed="$SED -e 1s/^X//"} + +@@ -169,6 +164,27 @@ IFS=" $lt_nl" + dirname="s,/[^/]*$,," + basename="s,^.*/,," + ++# func_dirname file append nondir_replacement ++# Compute the dirname of FILE. If nonempty, add APPEND to the result, ++# otherwise set result to NONDIR_REPLACEMENT. ++func_dirname () ++{ ++ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++} # func_dirname may be replaced by extended shell implementation ++ ++ ++# func_basename file ++func_basename () ++{ ++ func_basename_result=`$ECHO "${1}" | $SED "$basename"` ++} # func_basename may be replaced by extended shell implementation ++ ++ + # func_dirname_and_basename file append nondir_replacement + # perform func_basename and func_dirname in a single function + # call: +@@ -183,17 +199,31 @@ basename="s,^.*/,," + # those functions but instead duplicate the functionality here. + func_dirname_and_basename () + { +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +-} ++ # Extract subdirectory from the argument. ++ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` ++} # func_dirname_and_basename may be replaced by extended shell implementation ++ ++ ++# func_stripname prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# func_strip_suffix prefix name ++func_stripname () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname may be replaced by extended shell implementation + +-# Generated shell functions inserted here. + + # These SED scripts presuppose an absolute path with a trailing slash. + pathcar='s,^/\([^/]*\).*$,\1,' +@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + # Same as above, but do not quote variable references. + double_quote_subst='s/\(["`\\]\)/\\\1/g' + ++# Sed substitution that turns a string into a regex matching for the ++# string literally. ++sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' ++ ++# Sed substitution that converts a w32 file name or path ++# which contains forward slashes, into one that contains ++# (escaped) backslashes. A very naive implementation. ++lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ + # Re-`\' parameter expansions in output of double_quote_subst that were + # `\'-ed in input to the same. If an odd number of `\' preceded a '$' + # in input to double_quote_subst, that '$' was protected from expansion. +@@ -404,7 +443,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname${mode+: }$mode: $*" ++ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -430,14 +469,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 ++ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +@@ -656,19 +695,35 @@ func_show_eval_locale () + fi + } + +- +- ++# func_tr_sh ++# Turn $1 into a string suitable for a shell variable name. ++# Result is stored in $func_tr_sh_result. All characters ++# not in the set a-zA-Z0-9_ are replaced with '_'. Further, ++# if $1 begins with a digit, a '_' is prepended as well. ++func_tr_sh () ++{ ++ case $1 in ++ [0-9]* | *[!a-zA-Z0-9_]*) ++ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ++ ;; ++ * ) ++ func_tr_sh_result=$1 ++ ;; ++ esac ++} + + + # func_version + # Echo version message to standard output and exit. + func_version () + { ++ $opt_debug ++ + $SED -n '/(C)/!b go + :more + /\./!{ + N +- s/\n# // ++ s/\n# / / + b more + } + :go +@@ -685,7 +740,9 @@ func_version () + # Echo short help message to standard output and exit. + func_usage () + { +- $SED -n '/^# Usage:/,/^# *-h/ { ++ $opt_debug ++ ++ $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ +@@ -701,7 +758,10 @@ func_usage () + # unless 'noexit' is passed as argument. + func_help () + { ++ $opt_debug ++ + $SED -n '/^# Usage:/,/# Report bugs to/ { ++ :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* +@@ -714,7 +774,11 @@ func_help () + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p +- }' < "$progpath" ++ d ++ } ++ /^# .* home page:/b print ++ /^# General help using/b print ++ ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret +@@ -726,12 +790,39 @@ func_help () + # exit_cmd. + func_missing_arg () + { +- func_error "missing argument for $1" ++ $opt_debug ++ ++ func_error "missing argument for $1." + exit_cmd=exit + } + +-exit_cmd=: + ++# func_split_short_opt shortopt ++# Set func_split_short_opt_name and func_split_short_opt_arg shell ++# variables after splitting SHORTOPT after the 2nd character. ++func_split_short_opt () ++{ ++ my_sed_short_opt='1s/^\(..\).*$/\1/;q' ++ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' ++ ++ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` ++ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` ++} # func_split_short_opt may be replaced by extended shell implementation ++ ++ ++# func_split_long_opt longopt ++# Set func_split_long_opt_name and func_split_long_opt_arg shell ++# variables after splitting LONGOPT at the `=' sign. ++func_split_long_opt () ++{ ++ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' ++ my_sed_long_arg='1s/^--[^=]*=//' ++ ++ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` ++ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` ++} # func_split_long_opt may be replaced by extended shell implementation ++ ++exit_cmd=: + + + +@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" + magic_exe="%%%MAGIC EXE variable%%%" + + # Global variables. +-# $mode is unset + nonopt= +-execute_dlfiles= + preserve_args= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" + extracted_archives= + extracted_serial=0 + +-opt_dry_run=false +-opt_finish=: +-opt_duplicate_deps=false +-opt_silent=false +-opt_debug=: +- + # If this variable is set in any of the actions, the command in it + # will be execed at the end. This prevents here-documents from being + # left over by shells. + exec_cmd= + ++# func_append var value ++# Append VALUE to the end of shell variable VAR. ++func_append () ++{ ++ eval "${1}=\$${1}\${2}" ++} # func_append may be replaced by extended shell implementation ++ ++# func_append_quoted var value ++# Quote VALUE and append to the end of shell variable VAR, separated ++# by a space. ++func_append_quoted () ++{ ++ func_quote_for_eval "${2}" ++ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" ++} # func_append_quoted may be replaced by extended shell implementation ++ ++ ++# func_arith arithmetic-term... ++func_arith () ++{ ++ func_arith_result=`expr "${@}"` ++} # func_arith may be replaced by extended shell implementation ++ ++ ++# func_len string ++# STRING may not start with a hyphen. ++func_len () ++{ ++ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` ++} # func_len may be replaced by extended shell implementation ++ ++ ++# func_lo2o object ++func_lo2o () ++{ ++ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` ++} # func_lo2o may be replaced by extended shell implementation ++ ++ ++# func_xform libobj-or-source ++func_xform () ++{ ++ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` ++} # func_xform may be replaced by extended shell implementation ++ ++ + # func_fatal_configuration arg... + # Echo program name prefixed message to standard error, followed by + # a configuration failure hint, and exit. +@@ -850,130 +979,204 @@ func_enable_tag () + esac + } + +-# Parse options once, thoroughly. This comes as soon as possible in +-# the script to make things like `libtool --version' happen quickly. ++# func_check_version_match ++# Ensure that we are using m4 macros, and libtool script from the same ++# release of libtool. ++func_check_version_match () + { ++ if test "$package_revision" != "$macro_revision"; then ++ if test "$VERSION" != "$macro_version"; then ++ if test -z "$macro_version"; then ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from an older release. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ fi ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, ++$progname: but the definition of this LT_INIT comes from revision $macro_revision. ++$progname: You should recreate aclocal.m4 with macros from revision $package_revision ++$progname: of $PACKAGE $VERSION and run autoconf again. ++_LT_EOF ++ fi + +- # Shorthand for --mode=foo, only valid as the first argument +- case $1 in +- clean|clea|cle|cl) +- shift; set dummy --mode clean ${1+"$@"}; shift +- ;; +- compile|compil|compi|comp|com|co|c) +- shift; set dummy --mode compile ${1+"$@"}; shift +- ;; +- execute|execut|execu|exec|exe|ex|e) +- shift; set dummy --mode execute ${1+"$@"}; shift +- ;; +- finish|finis|fini|fin|fi|f) +- shift; set dummy --mode finish ${1+"$@"}; shift +- ;; +- install|instal|insta|inst|ins|in|i) +- shift; set dummy --mode install ${1+"$@"}; shift +- ;; +- link|lin|li|l) +- shift; set dummy --mode link ${1+"$@"}; shift +- ;; +- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) +- shift; set dummy --mode uninstall ${1+"$@"}; shift +- ;; +- esac ++ exit $EXIT_MISMATCH ++ fi ++} ++ ++ ++# Shorthand for --mode=foo, only valid as the first argument ++case $1 in ++clean|clea|cle|cl) ++ shift; set dummy --mode clean ${1+"$@"}; shift ++ ;; ++compile|compil|compi|comp|com|co|c) ++ shift; set dummy --mode compile ${1+"$@"}; shift ++ ;; ++execute|execut|execu|exec|exe|ex|e) ++ shift; set dummy --mode execute ${1+"$@"}; shift ++ ;; ++finish|finis|fini|fin|fi|f) ++ shift; set dummy --mode finish ${1+"$@"}; shift ++ ;; ++install|instal|insta|inst|ins|in|i) ++ shift; set dummy --mode install ${1+"$@"}; shift ++ ;; ++link|lin|li|l) ++ shift; set dummy --mode link ${1+"$@"}; shift ++ ;; ++uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) ++ shift; set dummy --mode uninstall ${1+"$@"}; shift ++ ;; ++esac + +- # Parse non-mode specific arguments: +- while test "$#" -gt 0; do ++ ++ ++# Option defaults: ++opt_debug=: ++opt_dry_run=false ++opt_config=false ++opt_preserve_dup_deps=false ++opt_features=false ++opt_finish=false ++opt_help=false ++opt_help_all=false ++opt_silent=: ++opt_verbose=: ++opt_silent=false ++opt_verbose=false ++ ++ ++# Parse options once, thoroughly. This comes as soon as possible in the ++# script to make things like `--version' happen as quickly as we can. ++{ ++ # this just eases exit handling ++ while test $# -gt 0; do + opt="$1" + shift +- + case $opt in +- --config) func_config ;; +- +- --debug) preserve_args="$preserve_args $opt" ++ --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" +- opt_debug='set -x' + $opt_debug + ;; +- +- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break +- execute_dlfiles="$execute_dlfiles $1" +- shift ++ --dry-run|--dryrun|-n) ++ opt_dry_run=: + ;; +- +- --dry-run | -n) opt_dry_run=: ;; +- --features) func_features ;; +- --finish) mode="finish" ;; +- --no-finish) opt_finish=false ;; +- +- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break +- case $1 in +- # Valid mode arguments: +- clean) ;; +- compile) ;; +- execute) ;; +- finish) ;; +- install) ;; +- link) ;; +- relink) ;; +- uninstall) ;; +- +- # Catch anything else as an error +- *) func_error "invalid argument for $opt" +- exit_cmd=exit +- break +- ;; +- esac +- +- mode="$1" ++ --config) ++ opt_config=: ++func_config ++ ;; ++ --dlopen|-dlopen) ++ optarg="$1" ++ opt_dlopen="${opt_dlopen+$opt_dlopen ++}$optarg" + shift + ;; +- + --preserve-dup-deps) +- opt_duplicate_deps=: ;; +- +- --quiet|--silent) preserve_args="$preserve_args $opt" +- opt_silent=: +- opt_verbose=false ++ opt_preserve_dup_deps=: + ;; +- +- --no-quiet|--no-silent) +- preserve_args="$preserve_args $opt" +- opt_silent=false ++ --features) ++ opt_features=: ++func_features + ;; +- +- --verbose| -v) preserve_args="$preserve_args $opt" ++ --finish) ++ opt_finish=: ++set dummy --mode finish ${1+"$@"}; shift ++ ;; ++ --help) ++ opt_help=: ++ ;; ++ --help-all) ++ opt_help_all=: ++opt_help=': help-all' ++ ;; ++ --mode) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_mode="$optarg" ++case $optarg in ++ # Valid mode arguments: ++ clean|compile|execute|finish|install|link|relink|uninstall) ;; ++ ++ # Catch anything else as an error ++ *) func_error "invalid argument for $opt" ++ exit_cmd=exit ++ break ++ ;; ++esac ++ shift ++ ;; ++ --no-silent|--no-quiet) + opt_silent=false +- opt_verbose=: ++func_append preserve_args " $opt" + ;; +- +- --no-verbose) preserve_args="$preserve_args $opt" ++ --no-verbose) + opt_verbose=false ++func_append preserve_args " $opt" + ;; +- +- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break +- preserve_args="$preserve_args $opt $1" +- func_enable_tag "$1" # tagname is set here ++ --silent|--quiet) ++ opt_silent=: ++func_append preserve_args " $opt" ++ opt_verbose=false ++ ;; ++ --verbose|-v) ++ opt_verbose=: ++func_append preserve_args " $opt" ++opt_silent=false ++ ;; ++ --tag) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_tag="$optarg" ++func_append preserve_args " $opt $optarg" ++func_enable_tag "$optarg" + shift + ;; + ++ -\?|-h) func_usage ;; ++ --help) func_help ;; ++ --version) func_version ;; ++ + # Separate optargs to long options: +- -dlopen=*|--mode=*|--tag=*) +- func_opt_split "$opt" +- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} ++ --*=*) ++ func_split_long_opt "$opt" ++ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + +- -\?|-h) func_usage ;; +- --help) opt_help=: ;; +- --help-all) opt_help=': help-all' ;; +- --version) func_version ;; +- +- -*) func_fatal_help "unrecognized option \`$opt'" ;; +- +- *) nonopt="$opt" +- break ++ # Separate non-argument short options: ++ -\?*|-h*|-n*|-v*) ++ func_split_short_opt "$opt" ++ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} ++ shift + ;; ++ ++ --) break ;; ++ -*) func_fatal_help "unrecognized option \`$opt'" ;; ++ *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + ++ # Validate options: ++ ++ # save first non-option argument ++ if test "$#" -gt 0; then ++ nonopt="$opt" ++ shift ++ fi ++ ++ # preserve --debug ++ test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* ) +@@ -981,82 +1184,44 @@ func_enable_tag () + opt_duplicate_compiler_generated_deps=: + ;; + *) +- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + +- # Having warned about all mis-specified options, bail out if +- # anything was wrong. +- $exit_cmd $EXIT_FAILURE +-} ++ $opt_help || { ++ # Sanity checks first: ++ func_check_version_match + +-# func_check_version_match +-# Ensure that we are using m4 macros, and libtool script from the same +-# release of libtool. +-func_check_version_match () +-{ +- if test "$package_revision" != "$macro_revision"; then +- if test "$VERSION" != "$macro_version"; then +- if test -z "$macro_version"; then +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from an older release. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- fi +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +-$progname: but the definition of this LT_INIT comes from revision $macro_revision. +-$progname: You should recreate aclocal.m4 with macros from revision $package_revision +-$progname: of $PACKAGE $VERSION and run autoconf again. +-_LT_EOF ++ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ++ func_fatal_configuration "not configured to build any kind of library" + fi + +- exit $EXIT_MISMATCH +- fi +-} +- ++ # Darwin sucks ++ eval std_shrext=\"$shrext_cmds\" + +-## ----------- ## +-## Main. ## +-## ----------- ## +- +-$opt_help || { +- # Sanity checks first: +- func_check_version_match +- +- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then +- func_fatal_configuration "not configured to build any kind of library" +- fi ++ # Only execute mode is allowed to have -dlopen flags. ++ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then ++ func_error "unrecognized option \`-dlopen'" ++ $ECHO "$help" 1>&2 ++ exit $EXIT_FAILURE ++ fi + +- test -z "$mode" && func_fatal_error "error: you must specify a MODE." ++ # Change the help message to a mode-specific one. ++ generic_help="$help" ++ help="Try \`$progname --help --mode=$opt_mode' for more information." ++ } + + +- # Darwin sucks +- eval "std_shrext=\"$shrext_cmds\"" ++ # Bail if the options were screwed ++ $exit_cmd $EXIT_FAILURE ++} + + +- # Only execute mode is allowed to have -dlopen flags. +- if test -n "$execute_dlfiles" && test "$mode" != execute; then +- func_error "unrecognized option \`-dlopen'" +- $ECHO "$help" 1>&2 +- exit $EXIT_FAILURE +- fi + +- # Change the help message to a mode-specific one. +- generic_help="$help" +- help="Try \`$progname --help --mode=$mode' for more information." +-} + ++## ----------- ## ++## Main. ## ++## ----------- ## + + # func_lalib_p file + # True iff FILE is a libtool `.la' library or `.lo' object file. +@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () + # temporary ltwrapper_script. + func_ltwrapper_scriptname () + { +- func_ltwrapper_scriptname_result="" +- if func_ltwrapper_executable_p "$1"; then +- func_dirname_and_basename "$1" "" "." +- func_stripname '' '.exe' "$func_basename_result" +- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +- fi ++ func_dirname_and_basename "$1" "" "." ++ func_stripname '' '.exe' "$func_basename_result" ++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + } + + # func_ltwrapper_p file +@@ -1149,7 +1311,7 @@ func_execute_cmds () + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +@@ -1172,6 +1334,37 @@ func_source () + } + + ++# func_resolve_sysroot PATH ++# Replace a leading = in PATH with a sysroot. Store the result into ++# func_resolve_sysroot_result ++func_resolve_sysroot () ++{ ++ func_resolve_sysroot_result=$1 ++ case $func_resolve_sysroot_result in ++ =*) ++ func_stripname '=' '' "$func_resolve_sysroot_result" ++ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ++ ;; ++ esac ++} ++ ++# func_replace_sysroot PATH ++# If PATH begins with the sysroot, replace it with = and ++# store the result into func_replace_sysroot_result. ++func_replace_sysroot () ++{ ++ case "$lt_sysroot:$1" in ++ ?*:"$lt_sysroot"*) ++ func_stripname "$lt_sysroot" '' "$1" ++ func_replace_sysroot_result="=$func_stripname_result" ++ ;; ++ *) ++ # Including no sysroot. ++ func_replace_sysroot_result=$1 ++ ;; ++ esac ++} ++ + # func_infer_tag arg + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. +@@ -1184,8 +1377,7 @@ func_infer_tag () + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1204,8 +1396,7 @@ func_infer_tag () + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1274,6 +1465,486 @@ EOF + } + } + ++ ++################################################## ++# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ++################################################## ++ ++# func_convert_core_file_wine_to_w32 ARG ++# Helper function used by file name conversion functions when $build is *nix, ++# and $host is mingw, cygwin, or some other w32 environment. Relies on a ++# correctly configured wine environment available, with the winepath program ++# in $build's $PATH. ++# ++# ARG is the $build file name to be converted to w32 format. ++# Result is available in $func_convert_core_file_wine_to_w32_result, and will ++# be empty on error (or when ARG is empty) ++func_convert_core_file_wine_to_w32 () ++{ ++ $opt_debug ++ func_convert_core_file_wine_to_w32_result="$1" ++ if test -n "$1"; then ++ # Unfortunately, winepath does not exit with a non-zero error code, so we ++ # are forced to check the contents of stdout. On the other hand, if the ++ # command is not found, the shell will set an exit code of 127 and print ++ # *an error message* to stdout. So we must check for both error code of ++ # zero AND non-empty stdout, which explains the odd construction: ++ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then ++ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ func_convert_core_file_wine_to_w32_result= ++ fi ++ fi ++} ++# end: func_convert_core_file_wine_to_w32 ++ ++ ++# func_convert_core_path_wine_to_w32 ARG ++# Helper function used by path conversion functions when $build is *nix, and ++# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly ++# configured wine environment available, with the winepath program in $build's ++# $PATH. Assumes ARG has no leading or trailing path separator characters. ++# ++# ARG is path to be converted from $build format to win32. ++# Result is available in $func_convert_core_path_wine_to_w32_result. ++# Unconvertible file (directory) names in ARG are skipped; if no directory names ++# are convertible, then the result may be empty. ++func_convert_core_path_wine_to_w32 () ++{ ++ $opt_debug ++ # unfortunately, winepath doesn't convert paths, only file names ++ func_convert_core_path_wine_to_w32_result="" ++ if test -n "$1"; then ++ oldIFS=$IFS ++ IFS=: ++ for func_convert_core_path_wine_to_w32_f in $1; do ++ IFS=$oldIFS ++ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" ++ if test -n "$func_convert_core_file_wine_to_w32_result" ; then ++ if test -z "$func_convert_core_path_wine_to_w32_result"; then ++ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" ++ else ++ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" ++ fi ++ fi ++ done ++ IFS=$oldIFS ++ fi ++} ++# end: func_convert_core_path_wine_to_w32 ++ ++ ++# func_cygpath ARGS... ++# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when ++# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) ++# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or ++# (2), returns the Cygwin file name or path in func_cygpath_result (input ++# file name or path is assumed to be in w32 format, as previously converted ++# from $build's *nix or MSYS format). In case (3), returns the w32 file name ++# or path in func_cygpath_result (input file name or path is assumed to be in ++# Cygwin format). Returns an empty string on error. ++# ++# ARGS are passed to cygpath, with the last one being the file name or path to ++# be converted. ++# ++# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH ++# environment variable; do not put it in $PATH. ++func_cygpath () ++{ ++ $opt_debug ++ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then ++ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` ++ if test "$?" -ne 0; then ++ # on failure, ensure result is empty ++ func_cygpath_result= ++ fi ++ else ++ func_cygpath_result= ++ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" ++ fi ++} ++#end: func_cygpath ++ ++ ++# func_convert_core_msys_to_w32 ARG ++# Convert file name or path ARG from MSYS format to w32 format. Return ++# result in func_convert_core_msys_to_w32_result. ++func_convert_core_msys_to_w32 () ++{ ++ $opt_debug ++ # awkward: cmd appends spaces to result ++ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | ++ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ++} ++#end: func_convert_core_msys_to_w32 ++ ++ ++# func_convert_file_check ARG1 ARG2 ++# Verify that ARG1 (a file name in $build format) was converted to $host ++# format in ARG2. Otherwise, emit an error message, but continue (resetting ++# func_to_host_file_result to ARG1). ++func_convert_file_check () ++{ ++ $opt_debug ++ if test -z "$2" && test -n "$1" ; then ++ func_error "Could not determine host file name corresponding to" ++ func_error " \`$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_file_result="$1" ++ fi ++} ++# end func_convert_file_check ++ ++ ++# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH ++# Verify that FROM_PATH (a path in $build format) was converted to $host ++# format in TO_PATH. Otherwise, emit an error message, but continue, resetting ++# func_to_host_file_result to a simplistic fallback value (see below). ++func_convert_path_check () ++{ ++ $opt_debug ++ if test -z "$4" && test -n "$3"; then ++ func_error "Could not determine the host path corresponding to" ++ func_error " \`$3'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This is a deliberately simplistic "conversion" and ++ # should not be "improved". See libtool.info. ++ if test "x$1" != "x$2"; then ++ lt_replace_pathsep_chars="s|$1|$2|g" ++ func_to_host_path_result=`echo "$3" | ++ $SED -e "$lt_replace_pathsep_chars"` ++ else ++ func_to_host_path_result="$3" ++ fi ++ fi ++} ++# end func_convert_path_check ++ ++ ++# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG ++# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT ++# and appending REPL if ORIG matches BACKPAT. ++func_convert_path_front_back_pathsep () ++{ ++ $opt_debug ++ case $4 in ++ $1 ) func_to_host_path_result="$3$func_to_host_path_result" ++ ;; ++ esac ++ case $4 in ++ $2 ) func_append func_to_host_path_result "$3" ++ ;; ++ esac ++} ++# end func_convert_path_front_back_pathsep ++ ++ ++################################################## ++# $build to $host FILE NAME CONVERSION FUNCTIONS # ++################################################## ++# invoked via `$to_host_file_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# Result will be available in $func_to_host_file_result. ++ ++ ++# func_to_host_file ARG ++# Converts the file name ARG from $build format to $host format. Return result ++# in func_to_host_file_result. ++func_to_host_file () ++{ ++ $opt_debug ++ $to_host_file_cmd "$1" ++} ++# end func_to_host_file ++ ++ ++# func_to_tool_file ARG LAZY ++# converts the file name ARG from $build format to toolchain format. Return ++# result in func_to_tool_file_result. If the conversion in use is listed ++# in (the comma separated) LAZY, no conversion takes place. ++func_to_tool_file () ++{ ++ $opt_debug ++ case ,$2, in ++ *,"$to_tool_file_cmd",*) ++ func_to_tool_file_result=$1 ++ ;; ++ *) ++ $to_tool_file_cmd "$1" ++ func_to_tool_file_result=$func_to_host_file_result ++ ;; ++ esac ++} ++# end func_to_tool_file ++ ++ ++# func_convert_file_noop ARG ++# Copy ARG to func_to_host_file_result. ++func_convert_file_noop () ++{ ++ func_to_host_file_result="$1" ++} ++# end func_convert_file_noop ++ ++ ++# func_convert_file_msys_to_w32 ARG ++# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_file_result. ++func_convert_file_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_msys_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_w32 ++ ++ ++# func_convert_file_cygwin_to_w32 ARG ++# Convert file name ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_file_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use ++ # LT_CYGPATH in this case. ++ func_to_host_file_result=`cygpath -m "$1"` ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_cygwin_to_w32 ++ ++ ++# func_convert_file_nix_to_w32 ARG ++# Convert file name ARG from *nix to w32 format. Requires a wine environment ++# and a working winepath. Returns result in func_to_host_file_result. ++func_convert_file_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_file_wine_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_w32 ++ ++ ++# func_convert_file_msys_to_cygwin ARG ++# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_file_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_msys_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_cygwin ++ ++ ++# func_convert_file_nix_to_cygwin ARG ++# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed ++# in a wine environment, working winepath, and LT_CYGPATH set. Returns result ++# in func_to_host_file_result. ++func_convert_file_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. ++ func_convert_core_file_wine_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_cygwin ++ ++ ++############################################# ++# $build to $host PATH CONVERSION FUNCTIONS # ++############################################# ++# invoked via `$to_host_path_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# The result will be available in $func_to_host_path_result. ++# ++# Path separators are also converted from $build format to $host format. If ++# ARG begins or ends with a path separator character, it is preserved (but ++# converted to $host format) on output. ++# ++# All path conversion functions are named using the following convention: ++# file name conversion function : func_convert_file_X_to_Y () ++# path conversion function : func_convert_path_X_to_Y () ++# where, for any given $build/$host combination the 'X_to_Y' value is the ++# same. If conversion functions are added for new $build/$host combinations, ++# the two new functions must follow this pattern, or func_init_to_host_path_cmd ++# will break. ++ ++ ++# func_init_to_host_path_cmd ++# Ensures that function "pointer" variable $to_host_path_cmd is set to the ++# appropriate value, based on the value of $to_host_file_cmd. ++to_host_path_cmd= ++func_init_to_host_path_cmd () ++{ ++ $opt_debug ++ if test -z "$to_host_path_cmd"; then ++ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" ++ to_host_path_cmd="func_convert_path_${func_stripname_result}" ++ fi ++} ++ ++ ++# func_to_host_path ARG ++# Converts the path ARG from $build format to $host format. Return result ++# in func_to_host_path_result. ++func_to_host_path () ++{ ++ $opt_debug ++ func_init_to_host_path_cmd ++ $to_host_path_cmd "$1" ++} ++# end func_to_host_path ++ ++ ++# func_convert_path_noop ARG ++# Copy ARG to func_to_host_path_result. ++func_convert_path_noop () ++{ ++ func_to_host_path_result="$1" ++} ++# end func_convert_path_noop ++ ++ ++# func_convert_path_msys_to_w32 ARG ++# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_path_result. ++func_convert_path_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ARG. MSYS ++ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; ++ # and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_msys_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_msys_to_w32 ++ ++ ++# func_convert_path_cygwin_to_w32 ARG ++# Convert path ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_path_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_cygwin_to_w32 ++ ++ ++# func_convert_path_nix_to_w32 ARG ++# Convert path ARG from *nix to w32 format. Requires a wine environment and ++# a working winepath. Returns result in func_to_host_file_result. ++func_convert_path_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_nix_to_w32 ++ ++ ++# func_convert_path_msys_to_cygwin ARG ++# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_path_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_msys_to_cygwin ++ ++ ++# func_convert_path_nix_to_cygwin ARG ++# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a ++# a wine environment, working winepath, and LT_CYGPATH set. Returns result in ++# func_to_host_file_result. ++func_convert_path_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ++ # ARG. msys behavior is inconsistent here, cygpath turns them ++ # into '.;' and ';.', and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_nix_to_cygwin ++ ++ + # func_mode_compile arg... + func_mode_compile () + { +@@ -1314,12 +1985,12 @@ func_mode_compile () + ;; + + -pie | -fpie | -fPIE) +- pie_flag="$pie_flag $arg" ++ func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) +- later="$later $arg" ++ func_append later " $arg" + continue + ;; + +@@ -1340,15 +2011,14 @@ func_mode_compile () + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" +- func_quote_for_eval "$arg" +- lastarg="$lastarg $func_quote_for_eval_result" ++ func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. +- base_compile="$base_compile $lastarg" ++ func_append base_compile " $lastarg" + continue + ;; + +@@ -1364,8 +2034,7 @@ func_mode_compile () + esac # case $arg_mode + + # Aesthetically quote the previous argument. +- func_quote_for_eval "$lastarg" +- base_compile="$base_compile $func_quote_for_eval_result" ++ func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in +@@ -1496,17 +2165,16 @@ compiler." + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi +- removelist="$removelist $output_obj" ++ func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist +- removelist="$removelist $lockfile" ++ func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + +- if test -n "$fix_srcfile_path"; then +- eval "srcfile=\"$fix_srcfile_path\"" +- fi ++ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 ++ srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + +@@ -1526,7 +2194,7 @@ compiler." + + if test -z "$output_obj"; then + # Place PIC objects in $objdir +- command="$command -o $lobj" ++ func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ +@@ -1573,11 +2241,11 @@ compiler." + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then +- command="$command -o $obj" ++ func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. +- command="$command$suppress_output" ++ func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + +@@ -1622,13 +2290,13 @@ compiler." + } + + $opt_help || { +- test "$mode" = compile && func_mode_compile ${1+"$@"} ++ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + } + + func_mode_help () + { + # We need to display help for each of the modes. +- case $mode in ++ case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. +@@ -1659,8 +2327,8 @@ This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes +- -prefer-pic try to building PIC objects only +- -prefer-non-pic try to building non-PIC objects only ++ -prefer-pic try to build PIC objects only ++ -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler +@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted using RM." + ;; + + *) +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + +@@ -1819,13 +2487,13 @@ if $opt_help; then + else + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done +@@ -1854,13 +2522,16 @@ func_mode_execute () + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. +- for file in $execute_dlfiles; do ++ for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" +@@ -1882,7 +2553,7 @@ func_mode_execute () + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then +- dir="$dir/$objdir" ++ func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" +@@ -1907,10 +2578,10 @@ func_mode_execute () + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. +- if eval test -z \"\$$shlibpath_var\"; then +- eval $shlibpath_var=\$dir ++ if eval "test -z \"\$$shlibpath_var\""; then ++ eval "$shlibpath_var=\"\$dir\"" + else +- eval $shlibpath_var=\$dir:\$$shlibpath_var ++ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + +@@ -1939,8 +2610,7 @@ func_mode_execute () + ;; + esac + # Quote arguments (to preserve shell metacharacters). +- func_quote_for_eval "$file" +- args="$args $func_quote_for_eval_result" ++ func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then +@@ -1972,22 +2642,59 @@ func_mode_execute () + fi + } + +-test "$mode" = execute && func_mode_execute ${1+"$@"} ++test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + + # func_mode_finish arg... + func_mode_finish () + { + $opt_debug +- libdirs="$nonopt" ++ libs= ++ libdirs= + admincmds= + +- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then +- for dir +- do +- libdirs="$libdirs $dir" +- done ++ for opt in "$nonopt" ${1+"$@"} ++ do ++ if test -d "$opt"; then ++ func_append libdirs " $opt" + ++ elif test -f "$opt"; then ++ if func_lalib_unsafe_p "$opt"; then ++ func_append libs " $opt" ++ else ++ func_warning "\`$opt' is not a valid libtool archive" ++ fi ++ ++ else ++ func_fatal_error "invalid argument \`$opt'" ++ fi ++ done ++ ++ if test -n "$libs"; then ++ if test -n "$lt_sysroot"; then ++ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` ++ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" ++ else ++ sysroot_cmd= ++ fi ++ ++ # Remove sysroot references ++ if $opt_dry_run; then ++ for lib in $libs; do ++ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" ++ done ++ else ++ tmpdir=`func_mktempdir` ++ for lib in $libs; do ++ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ ++ > $tmpdir/tmp-la ++ mv -f $tmpdir/tmp-la $lib ++ done ++ ${RM}r "$tmpdir" ++ fi ++ fi ++ ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. +@@ -1997,7 +2704,7 @@ func_mode_finish () + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" +- $opt_dry_run || eval "$cmds" || admincmds="$admincmds ++ $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done +@@ -2006,53 +2713,55 @@ func_mode_finish () + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- $ECHO " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval "flag=\"$hardcode_libdir_flag_spec\"" ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then ++ echo "----------------------------------------------------------------------" ++ echo "Libraries have been installed in:" ++ for libdir in $libdirs; do ++ $ECHO " $libdir" ++ done ++ echo ++ echo "If you ever happen to want to link against installed libraries" ++ echo "in a given directory, LIBDIR, you must either use libtool, and" ++ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" ++ echo "flag during linking and do at least one of the following:" ++ if test -n "$shlibpath_var"; then ++ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" ++ echo " during execution" ++ fi ++ if test -n "$runpath_var"; then ++ echo " - add LIBDIR to the \`$runpath_var' environment variable" ++ echo " during linking" ++ fi ++ if test -n "$hardcode_libdir_flag_spec"; then ++ libdir=LIBDIR ++ eval flag=\"$hardcode_libdir_flag_spec\" + +- $ECHO " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- $ECHO " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo ++ $ECHO " - use the \`$flag' linker flag" ++ fi ++ if test -n "$admincmds"; then ++ $ECHO " - have your system administrator run these commands:$admincmds" ++ fi ++ if test -f /etc/ld.so.conf; then ++ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" ++ fi ++ echo + +- echo "See any operating system documentation about shared libraries for" +- case $host in +- solaris2.[6789]|solaris2.1[0-9]) +- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" +- echo "pages." +- ;; +- *) +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- ;; +- esac +- echo "----------------------------------------------------------------------" ++ echo "See any operating system documentation about shared libraries for" ++ case $host in ++ solaris2.[6789]|solaris2.1[0-9]) ++ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" ++ echo "pages." ++ ;; ++ *) ++ echo "more information, such as the ld(1) and ld.so(8) manual pages." ++ ;; ++ esac ++ echo "----------------------------------------------------------------------" ++ fi + exit $EXIT_SUCCESS + } + +-test "$mode" = finish && func_mode_finish ${1+"$@"} ++test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + + # func_mode_install arg... +@@ -2077,7 +2786,7 @@ func_mode_install () + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" +- install_prog="$install_prog$func_quote_for_eval_result" ++ func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; +@@ -2097,7 +2806,7 @@ func_mode_install () + do + arg2= + if test -n "$dest"; then +- files="$files $dest" ++ func_append files " $dest" + dest=$arg + continue + fi +@@ -2135,11 +2844,11 @@ func_mode_install () + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" +- install_prog="$install_prog $func_quote_for_eval_result" ++ func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi +- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" ++ func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ +@@ -2151,7 +2860,7 @@ func_mode_install () + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" +- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" ++ func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + +@@ -2209,10 +2918,13 @@ func_mode_install () + case $file in + *.$libext) + # Do the static libraries later. +- staticlibs="$staticlibs $file" ++ func_append staticlibs " $file" + ;; + + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" +@@ -2226,23 +2938,30 @@ func_mode_install () + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; +- *) current_libdirs="$current_libdirs $libdir" ;; ++ *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; +- *) future_libdirs="$future_libdirs $libdir" ;; ++ *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" +- dir="$dir$objdir" ++ func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that +@@ -2315,7 +3034,7 @@ func_mode_install () + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. +- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ++ test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) +@@ -2503,7 +3222,7 @@ func_mode_install () + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + +- if test -n "$current_libdirs" && $opt_finish; then ++ if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' +@@ -2512,7 +3231,7 @@ func_mode_install () + fi + } + +-test "$mode" = install && func_mode_install ${1+"$@"} ++test "$opt_mode" = install && func_mode_install ${1+"$@"} + + + # func_generate_dlsyms outputname originator pic_p +@@ -2559,6 +3278,18 @@ extern \"C\" { + #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" + #endif + ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + /* External symbol declarations for the compiler. */\ + " + +@@ -2570,21 +3301,22 @@ extern \"C\" { + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do +- func_verbose "extracting global C symbols from \`$progfile'" +- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ++ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 ++ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" ++ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { +- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { +- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + +@@ -2593,23 +3325,23 @@ extern \"C\" { + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols +- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" ++ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$export_symbols" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { +- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" +- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' ++ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$nlist" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } +@@ -2620,10 +3352,52 @@ extern \"C\" { + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" +- $opt_dry_run || { +- $ECHO ": $name " >> "$nlist" +- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" +- } ++ case $host in ++ *cygwin* | *mingw* | *cegcc* ) ++ # if an import library, we need to obtain dlname ++ if func_win32_import_lib_p "$dlprefile"; then ++ func_tr_sh "$dlprefile" ++ eval "curr_lafile=\$libfile_$func_tr_sh_result" ++ dlprefile_dlbasename="" ++ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then ++ # Use subshell, to avoid clobbering current variable values ++ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` ++ if test -n "$dlprefile_dlname" ; then ++ func_basename "$dlprefile_dlname" ++ dlprefile_dlbasename="$func_basename_result" ++ else ++ # no lafile. user explicitly requested -dlpreopen . ++ $sharedlib_from_linklib_cmd "$dlprefile" ++ dlprefile_dlbasename=$sharedlib_from_linklib_result ++ fi ++ fi ++ $opt_dry_run || { ++ if test -n "$dlprefile_dlbasename" ; then ++ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' ++ else ++ func_warning "Could not compute DLL name from $name" ++ eval '$ECHO ": $name " >> "$nlist"' ++ fi ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ } ++ else # not an import lib ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ fi ++ ;; ++ *) ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ ;; ++ esac + done + + $opt_dry_run || { +@@ -2661,26 +3435,9 @@ typedef struct { + const char *name; + void *address; + } lt_dlsymlist; +-" +- case $host in +- *cygwin* | *mingw* | *cegcc* ) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* DATA imports from DLLs on WIN32 con't be const, because +- runtime relocations are performed -- see ld's documentation +- on pseudo-relocs. */" +- lt_dlsym_const= ;; +- *osf5*) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* This system does not cope well with relocations in const data */" +- lt_dlsym_const= ;; +- *) +- lt_dlsym_const=const ;; +- esac +- +- echo >> "$output_objdir/$my_dlsyms" "\ +-extern $lt_dlsym_const lt_dlsymlist ++extern LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[]; +-$lt_dlsym_const lt_dlsymlist ++LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[] = + {\ + { \"$my_originator\", (void *) 0 }," +@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() { + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; +- *) symtab_cflags="$symtab_cflags $arg" ;; ++ *) func_append symtab_cflags " $arg" ;; + esac + done + +@@ -2796,9 +3553,11 @@ func_win32_libid () + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static +- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | +- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then +- win32_nmres=`$NM -f posix -A "$1" | ++ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. ++ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ +@@ -2827,6 +3586,131 @@ func_win32_libid () + $ECHO "$win32_libid_type" + } + ++# func_cygming_dll_for_implib ARG ++# ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib () ++{ ++ $opt_debug ++ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` ++} ++ ++# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs ++# ++# The is the core of a fallback implementation of a ++# platform-specific function to extract the name of the ++# DLL associated with the specified import library LIBNAME. ++# ++# SECTION_NAME is either .idata$6 or .idata$7, depending ++# on the platform and compiler that created the implib. ++# ++# Echos the name of the DLL associated with the ++# specified import library. ++func_cygming_dll_for_implib_fallback_core () ++{ ++ $opt_debug ++ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` ++ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | ++ $SED '/^Contents of section '"$match_literal"':/{ ++ # Place marker at beginning of archive member dllname section ++ s/.*/====MARK====/ ++ p ++ d ++ } ++ # These lines can sometimes be longer than 43 characters, but ++ # are always uninteresting ++ /:[ ]*file format pe[i]\{,1\}-/d ++ /^In archive [^:]*:/d ++ # Ensure marker is printed ++ /^====MARK====/p ++ # Remove all lines with less than 43 characters ++ /^.\{43\}/!d ++ # From remaining lines, remove first 43 characters ++ s/^.\{43\}//' | ++ $SED -n ' ++ # Join marker and all lines until next marker into a single line ++ /^====MARK====/ b para ++ H ++ $ b para ++ b ++ :para ++ x ++ s/\n//g ++ # Remove the marker ++ s/^====MARK====// ++ # Remove trailing dots and whitespace ++ s/[\. \t]*$// ++ # Print ++ /./p' | ++ # we now have a list, one entry per line, of the stringified ++ # contents of the appropriate section of all members of the ++ # archive which possess that section. Heuristic: eliminate ++ # all those which have a first or second character that is ++ # a '.' (that is, objdump's representation of an unprintable ++ # character.) This should work for all archives with less than ++ # 0x302f exports -- but will fail for DLLs whose name actually ++ # begins with a literal '.' or a single character followed by ++ # a '.'. ++ # ++ # Of those that remain, print the first one. ++ $SED -e '/^\./d;/^.\./d;q' ++} ++ ++# func_cygming_gnu_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is a GNU/binutils-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_gnu_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ 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)$'` ++ test -n "$func_cygming_gnu_implib_tmp" ++} ++ ++# func_cygming_ms_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is an MS-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_ms_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` ++ test -n "$func_cygming_ms_implib_tmp" ++} ++ ++# func_cygming_dll_for_implib_fallback ARG ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# ++# This fallback implementation is for use when $DLLTOOL ++# does not support the --identify-strict option. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib_fallback () ++{ ++ $opt_debug ++ if func_cygming_gnu_implib_p "$1" ; then ++ # binutils import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` ++ elif func_cygming_ms_implib_p "$1" ; then ++ # ms-generated import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` ++ else ++ # unknown ++ sharedlib_from_linklib_result="" ++ fi ++} + + + # func_extract_an_archive dir oldlib +@@ -2917,7 +3801,7 @@ func_extract_archives () + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do +- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ++ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ +@@ -2932,7 +3816,7 @@ func_extract_archives () + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac +- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ++ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +@@ -3014,7 +3898,110 @@ func_fallback_echo () + _LTECHO_EOF' + } + ECHO=\"$qECHO\" +- fi\ ++ fi ++ ++# Very basic option parsing. These options are (a) specific to ++# the libtool wrapper, (b) are identical between the wrapper ++# /script/ and the wrapper /executable/ which is used only on ++# windows platforms, and (c) all begin with the string "--lt-" ++# (application programs are unlikely to have options which match ++# this pattern). ++# ++# There are only two supported options: --lt-debug and ++# --lt-dump-script. There is, deliberately, no --lt-help. ++# ++# The first argument to this parsing function should be the ++# script's $0 value, followed by "$@". ++lt_option_debug= ++func_parse_lt_options () ++{ ++ lt_script_arg0=\$0 ++ shift ++ for lt_opt ++ do ++ case \"\$lt_opt\" in ++ --lt-debug) lt_option_debug=1 ;; ++ --lt-dump-script) ++ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` ++ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. ++ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` ++ cat \"\$lt_dump_D/\$lt_dump_F\" ++ exit 0 ++ ;; ++ --lt-*) ++ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 ++ exit 1 ++ ;; ++ esac ++ done ++ ++ # Print the debug banner immediately: ++ if test -n \"\$lt_option_debug\"; then ++ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 ++ fi ++} ++ ++# Used when --lt-debug. Prints its arguments to stdout ++# (redirection is the responsibility of the caller) ++func_lt_dump_args () ++{ ++ lt_dump_args_N=1; ++ for lt_arg ++ do ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" ++ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` ++ done ++} ++ ++# Core function for launching the target application ++func_exec_program_core () ++{ ++" ++ case $host in ++ # Backslashes separate directories on plain windows ++ *-*-mingw | *-*-os2* | *-cegcc*) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} ++" ++ ;; ++ ++ *) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir/\$program\" \${1+\"\$@\"} ++" ++ ;; ++ esac ++ $ECHO "\ ++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 ++ exit 1 ++} ++ ++# A function to encapsulate launching the target application ++# Strips options in the --lt-* namespace from \$@ and ++# launches target application with the remaining arguments. ++func_exec_program () ++{ ++ for lt_wr_arg ++ do ++ case \$lt_wr_arg in ++ --lt-*) ;; ++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; ++ esac ++ shift ++ done ++ func_exec_program_core \${1+\"\$@\"} ++} ++ ++ # Parse options ++ func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` +@@ -3078,7 +4065,7 @@ _LTECHO_EOF' + + # relink executable if necessary + if test -n \"\$relink_command\"; then +- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : ++ if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" +@@ -3102,6 +4089,18 @@ _LTECHO_EOF' + + if test -f \"\$progdir/\$program\"; then" + ++ # fixup the dll searchpath if we need to. ++ # ++ # Fix the DLL searchpath if we need to. Do this before prepending ++ # to shlibpath, because on Windows, both are PATH and uninstalled ++ # libraries must come first. ++ if test -n "$dllsearchpath"; then ++ $ECHO "\ ++ # Add the dll search path components to the executable PATH ++ PATH=$dllsearchpath:\$PATH ++" ++ fi ++ + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ +@@ -3116,35 +4115,10 @@ _LTECHO_EOF' + " + fi + +- # fixup the dll searchpath if we need to. +- if test -n "$dllsearchpath"; then +- $ECHO "\ +- # Add the dll search path components to the executable PATH +- PATH=$dllsearchpath:\$PATH +-" +- fi +- + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +-" +- case $host in +- # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2* | *-cegcc*) +- $ECHO "\ +- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +-" +- ;; +- +- *) +- $ECHO "\ +- exec \"\$progdir/\$program\" \${1+\"\$@\"} +-" +- ;; +- esac +- $ECHO "\ +- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 +- exit 1 ++ func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. +@@ -3158,166 +4132,6 @@ fi\ + } + + +-# func_to_host_path arg +-# +-# Convert paths to host format when used with build tools. +-# Intended for use with "native" mingw (where libtool itself +-# is running under the msys shell), or in the following cross- +-# build environments: +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# where wine is equipped with the `winepath' executable. +-# In the native mingw case, the (msys) shell automatically +-# converts paths for any non-msys applications it launches, +-# but that facility isn't available from inside the cwrapper. +-# Similar accommodations are necessary for $host mingw and +-# $build cygwin. Calling this function does no harm for other +-# $host/$build combinations not listed above. +-# +-# ARG is the path (on $build) that should be converted to +-# the proper representation for $host. The result is stored +-# in $func_to_host_path_result. +-func_to_host_path () +-{ +- func_to_host_path_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- case $build in +- *mingw* ) # actually, msys +- # awkward: cmd appends spaces to result +- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_path_result=`cygpath -w "$1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # Unfortunately, winepath does not exit with a non-zero +- # error code, so we are forced to check the contents of +- # stdout. On the other hand, if the command is not +- # found, the shell will set an exit code of 127 and print +- # *an error message* to stdout. So we must check for both +- # error code of zero AND non-empty stdout, which explains +- # the odd construction: +- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` +- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then +- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- else +- # Allow warning below. +- func_to_host_path_result= +- fi +- ;; +- esac +- if test -z "$func_to_host_path_result" ; then +- func_error "Could not determine host path corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback: +- func_to_host_path_result="$1" +- fi +- ;; +- esac +- fi +-} +-# end: func_to_host_path +- +-# func_to_host_pathlist arg +-# +-# Convert pathlists to host format when used with build tools. +-# See func_to_host_path(), above. This function supports the +-# following $build/$host combinations (but does no harm for +-# combinations not listed here): +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# +-# Path separators are also converted from $build format to +-# $host format. If ARG begins or ends with a path separator +-# character, it is preserved (but converted to $host format) +-# on output. +-# +-# ARG is a pathlist (on $build) that should be converted to +-# the proper representation on $host. The result is stored +-# in $func_to_host_pathlist_result. +-func_to_host_pathlist () +-{ +- func_to_host_pathlist_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- # Remove leading and trailing path separator characters from +- # ARG. msys behavior is inconsistent here, cygpath turns them +- # into '.;' and ';.', and winepath ignores them completely. +- func_stripname : : "$1" +- func_to_host_pathlist_tmp1=$func_stripname_result +- case $build in +- *mingw* ) # Actually, msys. +- # Awkward: cmd appends spaces to result. +- func_to_host_pathlist_result=` +- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # unfortunately, winepath doesn't convert pathlists +- func_to_host_pathlist_result="" +- func_to_host_pathlist_oldIFS=$IFS +- IFS=: +- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do +- IFS=$func_to_host_pathlist_oldIFS +- if test -n "$func_to_host_pathlist_f" ; then +- func_to_host_path "$func_to_host_pathlist_f" +- if test -n "$func_to_host_path_result" ; then +- if test -z "$func_to_host_pathlist_result" ; then +- func_to_host_pathlist_result="$func_to_host_path_result" +- else +- func_append func_to_host_pathlist_result ";$func_to_host_path_result" +- fi +- fi +- fi +- done +- IFS=$func_to_host_pathlist_oldIFS +- ;; +- esac +- if test -z "$func_to_host_pathlist_result"; then +- func_error "Could not determine the host path(s) corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback. This may break if $1 contains DOS-style drive +- # specifications. The fix is not to complicate the expression +- # below, but for the user to provide a working wine installation +- # with winepath so that path translation in the cross-to-mingw +- # case works properly. +- lt_replace_pathsep_nix_to_dos="s|:|;|g" +- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ +- $SED -e "$lt_replace_pathsep_nix_to_dos"` +- fi +- # Now, add the leading and trailing path separators back +- case "$1" in +- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" +- ;; +- esac +- case "$1" in +- *: ) func_append func_to_host_pathlist_result ";" +- ;; +- esac +- ;; +- esac +- fi +-} +-# end: func_to_host_pathlist +- + # func_emit_cwrapperexe_src + # emit the source code for a wrapper executable on stdout + # Must ONLY be called from within func_mode_link because +@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. +- +- Currently, it simply execs the wrapper *script* "$SHELL $output", +- but could eventually absorb all of the scripts functionality and +- exec $objdir/$outputname directly. + */ + EOF + cat <<"EOF" +@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, int); + if (stale) { free ((void *) stale); stale = 0; } \ + } while (0) + +-#undef LTWRAPPER_DEBUGPRINTF +-#if defined LT_DEBUGWRAPPER +-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +-static void +-ltwrapper_debugprintf (const char *fmt, ...) +-{ +- va_list args; +- va_start (args, fmt); +- (void) vfprintf (stderr, fmt, args); +- va_end (args); +-} ++#if defined(LT_DEBUGWRAPPER) ++static int lt_debug = 1; + #else +-# define LTWRAPPER_DEBUGPRINTF(args) ++static int lt_debug = 0; + #endif + +-const char *program_name = NULL; ++const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + + void *xmalloc (size_t num); + char *xstrdup (const char *string); +@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathspec); + int make_executable (const char *path); + int check_executable (const char *path); + char *strendzap (char *str, const char *pat); +-void lt_fatal (const char *message, ...); ++void lt_debugprintf (const char *file, int line, const char *fmt, ...); ++void lt_fatal (const char *file, int line, const char *message, ...); ++static const char *nonnull (const char *s); ++static const char *nonempty (const char *s); + void lt_setenv (const char *name, const char *value); + char *lt_extend_str (const char *orig_value, const char *add, int to_end); + void lt_update_exe_path (const char *name, const char *value); +@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); + EOF + + cat <"))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", ++ nonnull (lt_argv_zero)); + for (i = 0; i < newargc; i++) + { +- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", ++ i, nonnull (newargz[i])); + } + + EOF +@@ -3706,7 +4529,9 @@ EOF + if (rval == -1) + { + /* failed to start process */ +- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(main) failed to launch target \"%s\": %s\n", ++ lt_argv_zero, nonnull (strerror (errno))); + return 127; + } + return rval; +@@ -3728,7 +4553,7 @@ xmalloc (size_t num) + { + void *p = (void *) malloc (num); + if (!p) +- lt_fatal ("Memory exhausted"); ++ lt_fatal (__FILE__, __LINE__, "memory exhausted"); + + return p; + } +@@ -3762,8 +4587,8 @@ check_executable (const char *path) + { + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3780,8 +4605,8 @@ make_executable (const char *path) + int rval = 0; + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) + int tmp_len; + char *concat_name; + +- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", +- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", ++ nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; +@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); +@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); +@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { +- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", +- tmp_pathspec)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "checking path component for symlinks: %s\n", ++ tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) +@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) + } + else + { +- char *errstr = strerror (errno); +- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); ++ lt_fatal (__FILE__, __LINE__, ++ "error accessing file \"%s\": %s", ++ tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); +@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { +- lt_fatal ("Could not follow symlinks for %s", pathspec); ++ lt_fatal (__FILE__, __LINE__, ++ "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); + #endif +@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) + return str; + } + ++void ++lt_debugprintf (const char *file, int line, const char *fmt, ...) ++{ ++ va_list args; ++ if (lt_debug) ++ { ++ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); ++ va_start (args, fmt); ++ (void) vfprintf (stderr, fmt, args); ++ va_end (args); ++ } ++} ++ + static void +-lt_error_core (int exit_status, const char *mode, ++lt_error_core (int exit_status, const char *file, ++ int line, const char *mode, + const char *message, va_list ap) + { +- fprintf (stderr, "%s: %s: ", program_name, mode); ++ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + +@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const char *mode, + } + + void +-lt_fatal (const char *message, ...) ++lt_fatal (const char *file, int line, const char *message, ...) + { + va_list ap; + va_start (ap, message); +- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); ++ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); + } + ++static const char * ++nonnull (const char *s) ++{ ++ return s ? s : "(null)"; ++} ++ ++static const char * ++nonempty (const char *s) ++{ ++ return (s && !*s) ? "(empty)" : nonnull (s); ++} ++ + void + lt_setenv (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_setenv) setting '%s' to '%s'\n", ++ nonnull (name), nonnull (value)); + { + #ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ +@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) + void + lt_update_exe_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, const char *value) + void + lt_update_lib_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4222,7 +5078,7 @@ EOF + func_win32_import_lib_p () + { + $opt_debug +- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in ++ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +@@ -4401,9 +5257,9 @@ func_mode_link () + ;; + *) + if test "$prev" = dlfiles; then +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $arg" + else +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $arg" + fi + prev= + continue +@@ -4427,7 +5283,7 @@ func_mode_link () + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; +- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ++ *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; +@@ -4446,7 +5302,7 @@ func_mode_link () + moreargs= + for fil in `cat "$save_arg"` + do +-# moreargs="$moreargs $fil" ++# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + +@@ -4475,7 +5331,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -4487,7 +5343,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -4557,12 +5413,12 @@ func_mode_link () + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; +- *) rpath="$rpath $arg" ;; ++ *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; +- *) xrpath="$xrpath $arg" ;; ++ *) func_append xrpath " $arg" ;; + esac + fi + prev= +@@ -4574,28 +5430,28 @@ func_mode_link () + continue + ;; + weak) +- weak_libs="$weak_libs $arg" ++ func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) +- compiler_flags="$compiler_flags $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $wl$qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" +@@ -4686,15 +5542,16 @@ func_mode_link () + ;; + + -L*) +- func_stripname '-L' '' "$arg" +- dir=$func_stripname_result +- if test -z "$dir"; then ++ func_stripname "-L" '' "$arg" ++ if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; +@@ -4706,10 +5563,16 @@ func_mode_link () + ;; + esac + case "$deplibs " in +- *" -L$dir "*) ;; ++ *" -L$dir "* | *" $arg "*) ++ # Will only happen for absolute or sysroot arguments ++ ;; + *) +- deplibs="$deplibs -L$dir" +- lib_search_path="$lib_search_path $dir" ++ # Preserve sysroot, but never include relative directories ++ case $dir in ++ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; ++ *) func_append deplibs " -L$dir" ;; ++ esac ++ func_append lib_search_path " $dir" + ;; + esac + case $host in +@@ -4718,12 +5581,12 @@ func_mode_link () + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; +- *) dllsearchpath="$dllsearchpath:$dir";; ++ *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -4747,7 +5610,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) +@@ -4758,9 +5621,6 @@ func_mode_link () + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; +- *-*-linux*) +- test "X$arg" = "X-lc" && continue +- ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in +@@ -4770,7 +5630,7 @@ func_mode_link () + ;; + esac + fi +- deplibs="$deplibs $arg" ++ func_append deplibs " $arg" + continue + ;; + +@@ -4782,8 +5642,8 @@ func_mode_link () + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. +- -model|-arch|-isysroot) +- compiler_flags="$compiler_flags $arg" ++ -model|-arch|-isysroot|--sysroot) ++ func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler +@@ -4791,12 +5651,12 @@ func_mode_link () + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) +- compiler_flags="$compiler_flags $arg" ++ func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; ++ * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; +@@ -4863,13 +5723,17 @@ func_mode_link () + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; ++ =*) ++ func_stripname '=' '' "$dir" ++ dir=$lt_sysroot$func_stripname_result ++ ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + continue + ;; +@@ -4922,8 +5786,8 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $func_quote_for_eval_result" +- compiler_flags="$compiler_flags $func_quote_for_eval_result" ++ func_append arg " $func_quote_for_eval_result" ++ func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4938,9 +5802,9 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $wl$func_quote_for_eval_result" +- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" +- linker_flags="$linker_flags $func_quote_for_eval_result" ++ func_append arg " $wl$func_quote_for_eval_result" ++ func_append compiler_flags " $wl$func_quote_for_eval_result" ++ func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4968,24 +5832,27 @@ func_mode_link () + arg="$func_quote_for_eval_result" + ;; + +- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler +- # -r[0-9][0-9]* specifies the processor on the SGI compiler +- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler +- # +DA*, +DD* enable 64-bit mode on the HP compiler +- # -q* pass through compiler args for the IBM compiler +- # -m*, -t[45]*, -txscale* pass through architecture-specific +- # compiler args for GCC +- # -F/path gives path to uninstalled frameworks, gcc on darwin +- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC +- # @file GCC response files +- # -tp=* Portland pgcc target processor selection ++ # Flags to be passed through unchanged, with rationale: ++ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler ++ # -r[0-9][0-9]* specify processor for the SGI compiler ++ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler ++ # +DA*, +DD* enable 64-bit mode for the HP compiler ++ # -q* compiler args for the IBM compiler ++ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC ++ # -F/path path to uninstalled frameworks, gcc on darwin ++ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC ++ # @file GCC response files ++ # -tp=* Portland pgcc target processor selection ++ # --sysroot=* for sysroot support ++ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" +- compiler_flags="$compiler_flags $arg" ++ func_append compiler_flags " $arg" + continue + ;; + +@@ -4997,7 +5864,7 @@ func_mode_link () + + *.$objext) + # A standard object. +- objs="$objs $arg" ++ func_append objs " $arg" + ;; + + *.lo) +@@ -5028,7 +5895,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -5040,7 +5907,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -5085,24 +5952,25 @@ func_mode_link () + + *.$libext) + # An archive. +- deplibs="$deplibs $arg" +- old_deplibs="$old_deplibs $arg" ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + ++ func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else +- deplibs="$deplibs $arg" ++ func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; +@@ -5127,7 +5995,7 @@ func_mode_link () + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then +- eval "arg=\"$export_dynamic_flag_spec\"" ++ eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi +@@ -5144,11 +6012,13 @@ func_mode_link () + else + shlib_search_path= + fi +- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" +- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" ++ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ++ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" ++ func_to_tool_file "$output_objdir/" ++ tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + +@@ -5169,12 +6039,12 @@ func_mode_link () + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- libs="$libs $deplib" ++ func_append libs " $deplib" + done + + if test "$linkmode" = lib; then +@@ -5187,9 +6057,9 @@ func_mode_link () + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in +- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; ++ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac +- pre_post_deps="$pre_post_deps $pre_post_dep" ++ func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= +@@ -5256,8 +6126,9 @@ func_mode_link () + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= ++ func_resolve_sysroot "$lib" + case $lib in +- *.la) func_source "$lib" ;; ++ *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library +@@ -5267,7 +6138,7 @@ func_mode_link () + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; +- *) deplibs="$deplibs $deplib" ;; ++ *) func_append deplibs " $deplib" ;; + esac + done + done +@@ -5288,11 +6159,11 @@ func_mode_link () + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- compiler_flags="$compiler_flags $deplib" ++ func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5377,7 +6248,7 @@ func_mode_link () + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5390,7 +6261,8 @@ func_mode_link () + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then +@@ -5404,7 +6276,8 @@ func_mode_link () + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" +@@ -5415,17 +6288,21 @@ func_mode_link () + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" +- dir=$func_stripname_result ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; +- *.la) lib="$deplib" ;; ++ *.la) ++ func_resolve_sysroot "$deplib" ++ lib=$func_resolve_sysroot_result ++ ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" +@@ -5488,11 +6365,11 @@ func_mode_link () + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. +- newdlprefiles="$newdlprefiles $deplib" ++ func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- newdlfiles="$newdlfiles $deplib" ++ func_append newdlfiles " $deplib" + fi + fi + continue +@@ -5538,7 +6415,7 @@ func_mode_link () + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; +- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; ++ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi +@@ -5546,8 +6423,8 @@ func_mode_link () + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then +- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" +- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" ++ test -n "$dlopen" && func_append dlfiles " $dlopen" ++ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then +@@ -5558,20 +6435,20 @@ func_mode_link () + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. +- convenience="$convenience $ladir/$objdir/$old_library" +- old_convenience="$old_convenience $ladir/$objdir/$old_library" ++ func_append convenience " $ladir/$objdir/$old_library" ++ func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv +@@ -5579,9 +6456,15 @@ func_mode_link () + + # Get the name of the library we link against. + linklib= +- for l in $old_library $library_names; do +- linklib="$l" +- done ++ if test -n "$old_library" && ++ { test "$prefer_static_libs" = yes || ++ test "$prefer_static_libs,$installed" = "built,no"; }; then ++ linklib=$old_library ++ else ++ for l in $old_library $library_names; do ++ linklib="$l" ++ done ++ fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi +@@ -5598,9 +6481,9 @@ func_mode_link () + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. +- dlprefiles="$dlprefiles $lib $dependency_libs" ++ func_append dlprefiles " $lib $dependency_libs" + else +- newdlfiles="$newdlfiles $lib" ++ func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen +@@ -5622,14 +6505,14 @@ func_mode_link () + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then +- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then ++ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ dir="$lt_sysroot$libdir" ++ absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5637,12 +6520,12 @@ func_mode_link () + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" +@@ -5653,20 +6536,46 @@ func_mode_link () + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi +- # Prefer using a static library (so that no silly _DYNAMIC symbols +- # are required to link). +- if test -n "$old_library"; then +- newdlprefiles="$newdlprefiles $dir/$old_library" +- # Keep a list of preopened convenience libraries to check +- # that they are being used correctly in the link pass. +- test -z "$libdir" && \ +- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" +- # Otherwise, use the dlname, so that lt_dlopen finds it. +- elif test -n "$dlname"; then +- newdlprefiles="$newdlprefiles $dir/$dlname" +- else +- newdlprefiles="$newdlprefiles $dir/$linklib" +- fi ++ case "$host" in ++ # special handling for platforms with PE-DLLs. ++ *cygwin* | *mingw* | *cegcc* ) ++ # Linker will automatically link against shared library if both ++ # static and shared are present. Therefore, ensure we extract ++ # symbols from the import library if a shared library is present ++ # (otherwise, the dlopen module name will be incorrect). We do ++ # this by putting the import library name into $newdlprefiles. ++ # We recover the dlopen module name by 'saving' the la file ++ # name in a special purpose variable, and (later) extracting the ++ # dlname from the la file. ++ if test -n "$dlname"; then ++ func_tr_sh "$dir/$linklib" ++ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" ++ func_append newdlprefiles " $dir/$linklib" ++ else ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ fi ++ ;; ++ * ) ++ # Prefer using a static library (so that no silly _DYNAMIC symbols ++ # are required to link). ++ if test -n "$old_library"; then ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ # Otherwise, use the dlname, so that lt_dlopen finds it. ++ elif test -n "$dlname"; then ++ func_append newdlprefiles " $dir/$dlname" ++ else ++ func_append newdlprefiles " $dir/$linklib" ++ fi ++ ;; ++ esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then +@@ -5684,7 +6593,7 @@ func_mode_link () + + + if test "$linkmode" = prog && test "$pass" != link; then +- newlib_search_path="$newlib_search_path $ladir" ++ func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no +@@ -5697,7 +6606,8 @@ func_mode_link () + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? +@@ -5708,12 +6618,12 @@ func_mode_link () + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... +@@ -5728,7 +6638,7 @@ func_mode_link () + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; +- *) temp_rpath="$temp_rpath$absdir:" ;; ++ *) func_append temp_rpath "$absdir:" ;; + esac + fi + +@@ -5740,7 +6650,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5749,7 +6659,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5774,12 +6684,12 @@ func_mode_link () + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; +@@ -5814,7 +6724,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5823,7 +6733,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5835,7 +6745,7 @@ func_mode_link () + shift + realname="$1" + shift +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" +@@ -5848,7 +6758,7 @@ func_mode_link () + versuffix="-$major" + ;; + esac +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -5877,7 +6787,7 @@ func_mode_link () + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + +- if test "$linkmode" = prog || test "$mode" != relink; then ++ if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= +@@ -5933,7 +6843,7 @@ func_mode_link () + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -5955,7 +6865,7 @@ func_mode_link () + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; +- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; ++ *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then +@@ -5969,13 +6879,13 @@ func_mode_link () + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + +- if test "$linkmode" = prog || test "$mode" = relink; then ++ if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= +@@ -5989,7 +6899,7 @@ func_mode_link () + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then +@@ -6001,12 +6911,12 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" ++ add_dir="-L$lt_sysroot$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -6083,27 +6993,33 @@ func_mode_link () + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; +- *) xrpath="$xrpath $temp_xrpath";; ++ *) func_append xrpath " $temp_xrpath";; + esac;; +- *) temp_deplibs="$temp_deplibs $libdir";; ++ *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + +- newlib_search_path="$newlib_search_path $absdir" ++ func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" +- if $opt_duplicate_deps ; then ++ case $deplib in ++ -L*) func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result";; ++ *) func_resolve_sysroot "$deplib" ;; ++ esac ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $func_resolve_sysroot_result "*) ++ func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then +@@ -6113,8 +7029,10 @@ func_mode_link () + case $deplib in + -L*) path="$deplib" ;; + *.la) ++ func_resolve_sysroot "$deplib" ++ deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." +- dir="$func_dirname_result" ++ dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; +@@ -6130,7 +7048,7 @@ func_mode_link () + case $host in + *-*-darwin*) + depdepl= +- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` ++ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp +@@ -6141,8 +7059,8 @@ func_mode_link () + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi +- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" +- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" ++ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" ++ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi +@@ -6152,7 +7070,7 @@ func_mode_link () + ;; + esac + else +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ +@@ -6192,7 +7110,7 @@ func_mode_link () + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; +- *) lib_search_path="$lib_search_path $dir" ;; ++ *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= +@@ -6205,7 +7123,7 @@ func_mode_link () + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order +- eval tmp_libs=\$$var ++ eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so +@@ -6250,13 +7168,13 @@ func_mode_link () + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + done +- eval $var=\$tmp_libs ++ eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs +@@ -6269,7 +7187,7 @@ func_mode_link () + ;; + esac + if test -n "$i" ; then +- tmp_libs="$tmp_libs $i" ++ func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs +@@ -6310,7 +7228,7 @@ func_mode_link () + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" +- objs="$objs$old_deplibs" ++ func_append objs "$old_deplibs" + ;; + + lib) +@@ -6319,8 +7237,8 @@ func_mode_link () + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ +@@ -6330,8 +7248,8 @@ func_mode_link () + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result +@@ -6346,7 +7264,7 @@ func_mode_link () + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" +- libobjs="$libobjs $objs" ++ func_append libobjs " $objs" + fi + fi + +@@ -6544,7 +7462,7 @@ func_mode_link () + done + + # Make executables depend on our current version. +- verstring="$verstring:${current}.0" ++ func_append verstring ":${current}.0" + ;; + + qnx) +@@ -6612,10 +7530,10 @@ func_mode_link () + fi + + func_generate_dlsyms "$libname" "$libname" "yes" +- libobjs="$libobjs $symfileobj" ++ func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + +- if test "$mode" != relink; then ++ if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= +@@ -6631,7 +7549,7 @@ func_mode_link () + continue + fi + fi +- removelist="$removelist $p" ++ func_append removelist " $p" + ;; + *) ;; + esac +@@ -6642,7 +7560,7 @@ func_mode_link () + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then +- oldlibs="$oldlibs $output_objdir/$libname.$libext" ++ func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` +@@ -6659,10 +7577,11 @@ func_mode_link () + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do +- temp_xrpath="$temp_xrpath -R$libdir" ++ func_replace_sysroot "$libdir" ++ func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then +@@ -6676,7 +7595,7 @@ func_mode_link () + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; +- *) dlfiles="$dlfiles $lib" ;; ++ *) func_append dlfiles " $lib" ;; + esac + done + +@@ -6686,7 +7605,7 @@ func_mode_link () + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; +- *) dlprefiles="$dlprefiles $lib" ;; ++ *) func_append dlprefiles " $lib" ;; + esac + done + +@@ -6698,7 +7617,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. +@@ -6715,7 +7634,7 @@ func_mode_link () + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then +- deplibs="$deplibs -lc" ++ func_append deplibs " -lc" + fi + ;; + esac +@@ -6764,18 +7683,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6789,7 +7708,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6807,18 +7726,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6840,7 +7759,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6857,15 +7776,27 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ if test -n "$file_magic_glob"; then ++ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` ++ else ++ libnameglob=$libname ++ fi ++ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do +- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` ++ if test "$want_nocaseglob" = yes; then ++ shopt -s nocaseglob ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ $nocaseglob ++ else ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | +@@ -6885,10 +7816,10 @@ EOF + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done +- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6913,7 +7844,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. +@@ -6929,20 +7860,20 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6967,7 +7898,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. +@@ -7071,7 +8002,7 @@ EOF + *) + case " $deplibs " in + *" -L$path/$objdir "*) +- new_libs="$new_libs -L$path/$objdir" ;; ++ func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac +@@ -7081,10 +8012,10 @@ EOF + -L*) + case " $new_libs " in + *" $deplib "*) ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" +@@ -7101,10 +8032,12 @@ EOF + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" +- test "$mode" != relink && rpath="$compile_rpath$rpath" ++ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -7113,18 +8046,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- dep_rpath="$dep_rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_apped perm_rpath " $libdir" ;; + esac + fi + done +@@ -7133,40 +8066,38 @@ EOF + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then +- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else +- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done +- eval $runpath_var=\$rpath\$$runpath_var +- export $runpath_var ++ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" +- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" ++ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then +- eval $shlibpath_var=\$shlibpath\$$shlibpath_var +- export $shlibpath_var ++ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. +- eval "shared_ext=\"$shrext_cmds\"" +- eval "library_names=\"$library_names_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -7178,7 +8109,7 @@ EOF + linknames= + for link + do +- linknames="$linknames $link" ++ func_append linknames " $link" + done + + # Use standard objects if they are pic +@@ -7189,7 +8120,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" +- delfiles="$delfiles $export_symbols" ++ func_append delfiles " $export_symbols" + fi + + orig_export_symbols= +@@ -7220,13 +8151,45 @@ EOF + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do ++ for cmd1 in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" +- func_len " $cmd" +- len=$func_len_result +- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ # Take the normal branch if the nm_file_list_spec branch ++ # doesn't work or if tool conversion is not needed. ++ case $nm_file_list_spec~$to_tool_file_cmd in ++ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) ++ try_normal_branch=yes ++ eval cmd=\"$cmd1\" ++ func_len " $cmd" ++ len=$func_len_result ++ ;; ++ *) ++ try_normal_branch=no ++ ;; ++ esac ++ if test "$try_normal_branch" = yes \ ++ && { test "$len" -lt "$max_cmd_len" \ ++ || test "$max_cmd_len" -le -1; } ++ then ++ func_show_eval "$cmd" 'exit $?' ++ skipped_export=false ++ elif test -n "$nm_file_list_spec"; then ++ func_basename "$output" ++ output_la=$func_basename_result ++ save_libobjs=$libobjs ++ save_output=$output ++ output=${output_objdir}/${output_la}.nm ++ func_to_tool_file "$output" ++ libobjs=$nm_file_list_spec$func_to_tool_file_result ++ func_append delfiles " $output" ++ func_verbose "creating $NM input file list: $output" ++ for obj in $save_libobjs; do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > "$output" ++ eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' ++ output=$save_output ++ libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. +@@ -7248,7 +8211,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then +@@ -7260,7 +8223,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7270,7 +8233,7 @@ EOF + case " $convenience " in + *" $test_deplib "*) ;; + *) +- tmp_deplibs="$tmp_deplibs $test_deplib" ++ func_append tmp_deplibs " $test_deplib" + ;; + esac + done +@@ -7286,43 +8249,43 @@ EOF + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $convenience +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then +- eval "flag=\"$thread_safe_flag_spec\"" +- linker_flags="$linker_flags $flag" ++ eval flag=\"$thread_safe_flag_spec\" ++ func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then +- eval "test_cmds=\"$module_expsym_cmds\"" ++ eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else +- eval "test_cmds=\"$module_cmds\"" ++ eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then +- eval "test_cmds=\"$archive_expsym_cmds\"" ++ eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else +- eval "test_cmds=\"$archive_cmds\"" ++ eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi +@@ -7366,10 +8329,13 @@ EOF + echo 'INPUT (' > $output + for obj in $save_libobjs + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output +- delfiles="$delfiles $output" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" +@@ -7383,15 +8349,17 @@ EOF + fi + for obj + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done +- delfiles="$delfiles $output" +- output=$firstobj\"$file_list_spec$output\" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext +- eval "test_cmds=\"$reload_cmds\"" ++ eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -7411,12 +8379,12 @@ EOF + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist +- eval "concat_cmds=\"$reload_cmds\"" ++ eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 +@@ -7433,11 +8401,11 @@ EOF + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" ++ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi +- delfiles="$delfiles $output" ++ func_append delfiles " $output" + + else + output= +@@ -7450,9 +8418,9 @@ EOF + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" ++ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + +@@ -7471,7 +8439,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7492,7 +8460,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then +@@ -7504,7 +8472,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7515,7 +8483,7 @@ EOF + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the +@@ -7539,23 +8507,23 @@ EOF + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. +- eval "cmds=\"\$cmds~\$RM $delfiles\"" ++ eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" +@@ -7564,7 +8532,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7576,8 +8544,8 @@ EOF + IFS="$save_ifs" + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then +@@ -7656,17 +8624,20 @@ EOF + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then +- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" ++ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + ++ # If we're not building shared, we need to use non_pic_objs ++ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" ++ + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + +@@ -7690,7 +8661,7 @@ EOF + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" +- # $opt_dry_run || echo timestamp > $libobj || exit $? ++ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + +@@ -7740,8 +8711,8 @@ EOF + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) +- compile_command="$compile_command ${wl}-bind_at_load" +- finalize_command="$finalize_command ${wl}-bind_at_load" ++ func_append compile_command " ${wl}-bind_at_load" ++ func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi +@@ -7761,7 +8732,7 @@ EOF + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) +- new_libs="$new_libs -L$path/$objdir" ;; ++ func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac +@@ -7771,17 +8742,17 @@ EOF + -L*) + case " $new_libs " in + *" $deplib "*) ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + +- compile_command="$compile_command $compile_deplibs" +- finalize_command="$finalize_command $finalize_deplibs" ++ func_append compile_command " $compile_deplibs" ++ func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. +@@ -7789,7 +8760,7 @@ EOF + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + fi +@@ -7808,18 +8779,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in +@@ -7828,12 +8799,12 @@ EOF + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; +- *) dllsearchpath="$dllsearchpath:$libdir";; ++ *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -7842,7 +8813,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + +@@ -7859,18 +8830,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; +- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; ++ *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done +@@ -7878,7 +8849,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + +@@ -7921,6 +8892,12 @@ EOF + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' +@@ -7943,7 +8920,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7951,7 +8928,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7966,6 +8943,13 @@ EOF + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' ++ ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + exit $EXIT_SUCCESS + fi + +@@ -7999,6 +8983,12 @@ EOF + + func_show_eval "$link_command" 'exit $?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output_objdir/$outputname" ++ 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'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Now create the wrapper script. + func_verbose "creating $output" + +@@ -8096,7 +9086,7 @@ EOF + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then +- oldobjs="$oldobjs $symfileobj" ++ func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" +@@ -8104,10 +9094,10 @@ EOF + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $addlibs +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. +@@ -8118,10 +9108,10 @@ EOF + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have +@@ -8139,7 +9129,7 @@ EOF + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= +@@ -8163,18 +9153,28 @@ EOF + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" +- oldobjs="$oldobjs $gentop/$newobj" ++ func_append oldobjs " $gentop/$newobj" + ;; +- *) oldobjs="$oldobjs $obj" ;; ++ *) func_append oldobjs " $obj" ;; + esac + done + fi +- eval "cmds=\"$old_archive_cmds\"" ++ eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds ++ elif test -n "$archiver_list_spec"; then ++ func_verbose "using command file archive linking..." ++ for obj in $oldobjs ++ do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > $output_objdir/$libname.libcmd ++ func_to_tool_file "$output_objdir/$libname.libcmd" ++ oldobjs=" $archiver_list_spec$func_to_tool_file_result" ++ cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." +@@ -8189,7 +9189,7 @@ EOF + do + last_oldobj=$obj + done +- eval "test_cmds=\"$old_archive_cmds\"" ++ eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -8208,7 +9208,7 @@ EOF + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi +@@ -8216,9 +9216,9 @@ EOF + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then +- eval "cmds=\"\$concat_cmds\"" ++ eval cmds=\"\$concat_cmds\" + else +- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" ++ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi +@@ -8268,12 +9268,23 @@ EOF + *.la) + func_basename "$deplib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ func_resolve_sysroot "$deplib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" +- newdependency_libs="$newdependency_libs $libdir/$name" ++ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ++ ;; ++ -L*) ++ func_stripname -L '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; +- *) newdependency_libs="$newdependency_libs $deplib" ;; ++ -R*) ++ func_stripname -R '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -R$func_replace_sysroot_result" ++ ;; ++ *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" +@@ -8284,12 +9295,14 @@ EOF + *.la) + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` ++ + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlfiles="$newdlfiles $libdir/$name" ++ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; +- *) newdlfiles="$newdlfiles $lib" ;; ++ *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" +@@ -8303,10 +9316,11 @@ EOF + # the library: + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlprefiles="$newdlprefiles $libdir/$name" ++ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done +@@ -8318,7 +9332,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlfiles="$newdlfiles $abs" ++ func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= +@@ -8327,7 +9341,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlprefiles="$newdlprefiles $abs" ++ func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi +@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" + exit $EXIT_SUCCESS + } + +-{ test "$mode" = link || test "$mode" = relink; } && ++{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +@@ -8432,9 +9446,9 @@ func_mode_uninstall () + for arg + do + case $arg in +- -f) RM="$RM $arg"; rmforce=yes ;; +- -*) RM="$RM $arg" ;; +- *) files="$files $arg" ;; ++ -f) func_append RM " $arg"; rmforce=yes ;; ++ -*) func_append RM " $arg" ;; ++ *) func_append files " $arg" ;; + esac + done + +@@ -8443,24 +9457,23 @@ func_mode_uninstall () + + rmdirs= + +- origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then +- objdir="$origobjdir" ++ odir="$objdir" + else +- objdir="$dir/$origobjdir" ++ odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" +- test "$mode" = uninstall && objdir="$dir" ++ test "$opt_mode" = uninstall && odir="$dir" + +- # Remember objdir for removal later, being careful to avoid duplicates +- if test "$mode" = clean; then ++ # Remember odir for removal later, being careful to avoid duplicates ++ if test "$opt_mode" = clean; then + case " $rmdirs " in +- *" $objdir "*) ;; +- *) rmdirs="$rmdirs $objdir" ;; ++ *" $odir "*) ;; ++ *) func_append rmdirs " $odir" ;; + esac + fi + +@@ -8486,18 +9499,17 @@ func_mode_uninstall () + + # Delete the libtool libraries and symlinks. + for n in $library_names; do +- rmfiles="$rmfiles $objdir/$n" ++ func_append rmfiles " $odir/$n" + done +- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" ++ test -n "$old_library" && func_append rmfiles " $odir/$old_library" + +- case "$mode" in ++ case "$opt_mode" in + clean) +- case " $library_names " in +- # " " in the beginning catches empty $dlname ++ case " $library_names " in + *" $dlname "*) ;; +- *) rmfiles="$rmfiles $objdir/$dlname" ;; ++ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac +- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ++ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then +@@ -8525,19 +9537,19 @@ func_mode_uninstall () + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then +- rmfiles="$rmfiles $dir/$pic_object" ++ func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then +- rmfiles="$rmfiles $dir/$non_pic_object" ++ func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) +- if test "$mode" = clean ; then ++ if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) +@@ -8547,7 +9559,7 @@ func_mode_uninstall () + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe +- rmfiles="$rmfiles $file" ++ func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. +@@ -8556,7 +9568,7 @@ func_mode_uninstall () + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result +- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" ++ func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename +@@ -8564,12 +9576,12 @@ func_mode_uninstall () + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles +- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" ++ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then +- rmfiles="$rmfiles $objdir/lt-$name" ++ func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then +- rmfiles="$rmfiles $objdir/lt-${noexename}.c" ++ func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi +@@ -8577,7 +9589,6 @@ func_mode_uninstall () + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done +- objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do +@@ -8589,16 +9600,16 @@ func_mode_uninstall () + exit $exit_status + } + +-{ test "$mode" = uninstall || test "$mode" = clean; } && ++{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +-test -z "$mode" && { ++test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" + } + + test -z "$exec_cmd" && \ +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + + if test -n "$exec_cmd"; then + eval exec "$exec_cmd" +diff --git a/ltoptions.m4 b/ltoptions.m4 +index 5ef12ced2a..17cfd51c0b 100644 +--- a/ltoptions.m4 ++++ b/ltoptions.m4 +@@ -8,7 +8,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 6 ltoptions.m4 ++# serial 7 ltoptions.m4 + + # This is to help aclocal find these macros, as it can't see m4_define. + AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +diff --git a/ltversion.m4 b/ltversion.m4 +index bf87f77132..9c7b5d4118 100644 +--- a/ltversion.m4 ++++ b/ltversion.m4 +@@ -7,17 +7,17 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# Generated from ltversion.in. ++# @configure_input@ + +-# serial 3134 ltversion.m4 ++# serial 3293 ltversion.m4 + # This file is part of GNU Libtool + +-m4_define([LT_PACKAGE_VERSION], [2.2.7a]) +-m4_define([LT_PACKAGE_REVISION], [1.3134]) ++m4_define([LT_PACKAGE_VERSION], [2.4]) ++m4_define([LT_PACKAGE_REVISION], [1.3293]) + + AC_DEFUN([LTVERSION_VERSION], +-[macro_version='2.2.7a' +-macro_revision='1.3134' ++[macro_version='2.4' ++macro_revision='1.3293' + _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) + _LT_DECL(, macro_revision, 0) + ]) +diff --git a/lt~obsolete.m4 b/lt~obsolete.m4 +index bf92b5e079..c573da90c5 100644 +--- a/lt~obsolete.m4 ++++ b/lt~obsolete.m4 +@@ -7,7 +7,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 4 lt~obsolete.m4 ++# serial 5 lt~obsolete.m4 + + # These exist entirely to fool aclocal when bootstrapping libtool. + # +diff --git a/opcodes/configure b/opcodes/configure +index 17530f54b9..79b39611c2 100755 +--- a/opcodes/configure ++++ b/opcodes/configure +@@ -650,6 +650,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -763,6 +766,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_targets + enable_werror +@@ -1423,6 +1427,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -5115,8 +5121,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5156,7 +5162,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5842,8 +5848,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5892,6 +5898,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -5908,6 +5988,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6076,7 +6161,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6230,6 +6316,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6243,11 +6344,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -6263,7 +6517,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6283,11 +6537,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -6303,7 +6561,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6322,6 +6580,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6333,16 +6595,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6684,8 +7002,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6721,6 +7039,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6762,6 +7081,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6773,7 +7104,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6799,8 +7130,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6810,8 +7141,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6848,6 +7179,16 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ + + + +@@ -6864,6 +7205,45 @@ fi + + + ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7075,6 +7455,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7638,6 +8135,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7803,7 +8302,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7892,7 +8392,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8190,8 +8690,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8357,6 +8855,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8419,7 +8923,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8476,13 +8980,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8543,6 +9051,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8893,7 +9406,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8992,12 +9506,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9011,8 +9525,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9030,8 +9544,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9077,8 +9591,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9208,7 +9722,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9221,22 +9741,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -9248,7 +9775,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9261,22 +9794,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9321,20 +9861,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9395,7 +9978,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9403,7 +9986,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -9419,7 +10002,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9443,10 +10026,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9525,23 +10108,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -9626,7 +10222,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9645,9 +10241,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10223,8 +10819,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10257,13 +10854,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10355,7 +11010,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11195,10 +11850,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11301,10 +11956,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12543,7 +13198,7 @@ if test "$enable_shared" = "yes"; then + # since libbfd may not pull in the entirety of libiberty. + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + case "${host}" in +@@ -13520,13 +14175,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -13541,14 +14203,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -13581,12 +14246,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -13641,8 +14306,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -13652,12 +14322,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -13673,7 +14345,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13709,6 +14380,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -14465,7 +15137,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -14568,19 +15241,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -14610,6 +15306,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -14619,6 +15321,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -14733,12 +15438,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -14825,9 +15530,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -14843,6 +15545,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -14875,210 +15580,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/opcodes/configure.ac b/opcodes/configure.ac +index a9fbfd61f1..c43780f64d 100644 +--- a/opcodes/configure.ac ++++ b/opcodes/configure.ac +@@ -167,7 +167,7 @@ changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + changequote([,])dnl + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + case "${host}" in +diff --git a/zlib/configure b/zlib/configure +index dc2d9ed383..ed9a492f5c 100755 +--- a/zlib/configure ++++ b/zlib/configure +@@ -614,8 +614,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -737,6 +740,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_host_shared + ' +@@ -1385,6 +1389,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -3910,8 +3916,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -3951,7 +3957,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -4767,8 +4773,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -4817,6 +4823,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if test "${lt_cv_to_host_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if test "${lt_cv_to_tool_file_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then : +@@ -4833,6 +4913,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -5001,7 +5086,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -5155,6 +5241,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -5168,11 +5269,165 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then : +@@ -5188,7 +5443,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -5208,11 +5463,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +@@ -5228,7 +5487,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -5247,6 +5506,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -5258,16 +5521,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if test "${lt_cv_ar_at_file+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -5609,8 +5928,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-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'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++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'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -5646,6 +5965,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -5687,6 +6007,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -5698,7 +6030,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -5724,8 +6056,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -5735,8 +6067,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -5773,6 +6105,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -5790,6 +6135,41 @@ fi + + + ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -6004,6 +6384,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if test "${lt_cv_path_mainfest_tool+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -6570,6 +7067,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7033,7 +7532,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7122,7 +7622,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -7420,8 +7920,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -7587,6 +8085,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -7649,7 +8153,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -7706,13 +8210,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if test "${lt_cv_prog_compiler_pic+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -7773,6 +8281,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8123,7 +8636,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ 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' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -8222,12 +8736,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -8241,8 +8755,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -8260,8 +8774,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -8307,8 +8821,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -8438,7 +8952,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- if test x$gcc_no_link = xyes; then ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -8454,22 +8974,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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" +@@ -8481,7 +9008,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- if test x$gcc_no_link = xyes; then ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if test "${lt_cv_aix_libpath_+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -8497,22 +9030,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -8557,20 +9097,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -8631,7 +9214,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -8639,7 +9222,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- 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' ++ 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' + else + 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' + fi +@@ -8655,7 +9238,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -8679,10 +9262,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -8761,26 +9344,39 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- 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' ++ 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' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- if test x$gcc_no_link = xyes; then ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if test "${lt_cv_irix_exported_symbol+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- 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' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ 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' ++ fi + else + 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' + 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' +@@ -8865,7 +9461,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- 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' ++ 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -8884,9 +9480,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -9462,8 +10058,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -9496,13 +10093,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -9594,7 +10249,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -10452,10 +11107,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -10558,10 +11213,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11992,13 +12647,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -12013,14 +12675,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + 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"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -12053,12 +12718,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -12113,8 +12778,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -12124,12 +12794,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -12145,7 +12817,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -12181,6 +12852,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -12770,7 +13442,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -12873,19 +13546,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -12915,6 +13611,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -12924,6 +13626,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -13038,12 +13743,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -13130,9 +13835,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -13148,6 +13850,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -13180,210 +13885,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch new file mode 100644 index 000000000..88019606f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch @@ -0,0 +1,35 @@ +From 2b87aad1741bc481dd0982f100ad5ea7f937bb61 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:37:10 +0000 +Subject: [PATCH 07/15] Add the armv5e architecture to binutils + +Binutils has a comment that indicates it is supposed to match gcc for +all of the support "-march=" settings, but it was lacking the armv5e setting. +This was a simple way to add it, as thumb instructions shouldn't be generated +by the compiler anyway. + +Upstream-Status: Denied +Upstream maintainer indicated that we should not be using armv5e, even +though it is a legal archicture defined by our gcc. + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + gas/config/tc-arm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c +index a885efe4fc..735eaa7447 100644 +--- a/gas/config/tc-arm.c ++++ b/gas/config/tc-arm.c +@@ -25990,6 +25990,7 @@ static const struct arm_arch_option_table arm_archs[] = + ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA), + ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA), + ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP), ++ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP), + ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP), + ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP), + ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP), +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch deleted file mode 100644 index 6b7f75389..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch +++ /dev/null @@ -1,21137 +0,0 @@ -From 9a3651e120261c72090689ad770ad048b0baf506 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 6 Mar 2017 23:28:33 -0800 -Subject: [PATCH 07/15] Use libtool 2.4 - -get libtool sysroot support - -Signed-off-by: Khem Raj ---- -Upstream-Status: Inappropriate [ OE configuration Specific] - - bfd/configure | 1318 +++++++++++++++++------ - bfd/configure.ac | 2 +- - binutils/configure | 1316 +++++++++++++++++------ - gas/configure | 1314 +++++++++++++++++------ - gprof/configure | 1321 +++++++++++++++++------ - ld/configure | 1691 +++++++++++++++++++++-------- - libtool.m4 | 1080 +++++++++++++------ - ltmain.sh | 2925 +++++++++++++++++++++++++++++++++----------------- - ltoptions.m4 | 2 +- - ltversion.m4 | 12 +- - lt~obsolete.m4 | 2 +- - opcodes/configure | 1318 +++++++++++++++++------ - opcodes/configure.ac | 2 +- - zlib/configure | 1316 +++++++++++++++++------ - 14 files changed, 9926 insertions(+), 3693 deletions(-) - -diff --git a/bfd/configure b/bfd/configure -index f30bfabef3..fa1a545e9d 100755 ---- a/bfd/configure -+++ b/bfd/configure -@@ -672,6 +672,9 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL -+ac_ct_AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -785,6 +788,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -1461,6 +1465,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - --with-mmap try using mmap for BFD input files if available - --with-separate-debug-dir=DIR - Look for global separate debug info in DIR -@@ -5393,8 +5399,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5434,7 +5440,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -6120,8 +6126,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -6170,6 +6176,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -6186,6 +6266,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6354,7 +6439,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6508,6 +6594,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6523,9 +6624,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6541,7 +6795,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6561,11 +6815,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6581,7 +6839,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6600,6 +6858,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6611,16 +6873,72 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a - -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } - -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi - - - -@@ -6962,8 +7280,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6999,6 +7317,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -7040,6 +7359,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -7051,7 +7382,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -7077,8 +7408,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -7088,8 +7419,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -7126,6 +7457,16 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ - - - -@@ -7147,6 +7488,45 @@ fi - - - -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ -+ - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -@@ -7353,6 +7733,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7916,6 +8413,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -8080,7 +8579,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -8169,7 +8669,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8467,8 +8967,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8634,6 +9132,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8696,7 +9200,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8753,13 +9257,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8820,6 +9328,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -9170,7 +9683,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -9269,12 +9783,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9288,8 +9802,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9307,8 +9821,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9354,8 +9868,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9485,7 +9999,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9498,22 +10018,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9525,7 +10052,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9538,22 +10071,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9598,20 +10138,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9672,7 +10255,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9680,7 +10263,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9696,7 +10279,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9720,10 +10303,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9802,23 +10385,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -9903,7 +10499,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9922,9 +10518,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10500,8 +11096,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10534,13 +11131,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10632,7 +11287,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11472,10 +12127,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11578,10 +12233,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -14122,7 +14777,7 @@ SHARED_LDFLAGS= - if test "$enable_shared" = "yes"; then - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - # More hacks to build DLLs on Windows. -@@ -16826,13 +17481,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -16847,14 +17509,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -16887,12 +17552,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -16947,8 +17612,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -16958,12 +17628,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -16979,7 +17651,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -17015,6 +17686,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -17794,7 +18466,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -17897,19 +18570,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -17939,6 +18635,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -17948,6 +18650,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -18062,12 +18767,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -18154,9 +18859,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -18172,6 +18874,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -18204,210 +18909,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -diff --git a/bfd/configure.ac b/bfd/configure.ac -index 9a183c1628..3d8ea07836 100644 ---- a/bfd/configure.ac -+++ b/bfd/configure.ac -@@ -253,7 +253,7 @@ changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - changequote([,])dnl - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - # More hacks to build DLLs on Windows. -diff --git a/binutils/configure b/binutils/configure -index 82119efe72..4a98918ce1 100755 ---- a/binutils/configure -+++ b/binutils/configure -@@ -659,8 +659,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -772,6 +775,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -1444,6 +1448,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - --with-system-zlib use installed libz - --with-gnu-ld assume the C compiler uses GNU ld default=no - --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib -@@ -5160,8 +5166,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5201,7 +5207,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5887,8 +5893,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5937,6 +5943,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5953,6 +6033,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6121,7 +6206,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6275,6 +6361,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6290,9 +6391,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6308,7 +6562,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6328,11 +6582,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6348,7 +6606,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6367,6 +6625,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6378,12 +6640,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -6395,6 +6655,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -6729,8 +7047,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6766,6 +7084,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6807,6 +7126,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6818,7 +7149,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6844,8 +7175,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6855,8 +7186,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6893,6 +7224,21 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -@@ -6910,6 +7256,40 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ - - - -@@ -7120,6 +7500,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7683,6 +8180,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7878,7 +8377,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7967,7 +8467,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8265,8 +8765,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8432,6 +8930,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8494,7 +8998,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8551,13 +9055,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8618,6 +9126,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8968,7 +9481,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -9067,12 +9581,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9086,8 +9600,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9105,8 +9619,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9152,8 +9666,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9283,7 +9797,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9296,22 +9816,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9323,7 +9850,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9336,22 +9869,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9396,20 +9936,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9470,7 +10053,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9478,7 +10061,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9494,7 +10077,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9518,10 +10101,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9600,23 +10183,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -9701,7 +10297,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9720,9 +10316,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10298,8 +10894,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10332,13 +10929,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10430,7 +11085,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11270,10 +11925,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11376,10 +12031,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -15436,13 +16091,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -15457,14 +16119,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -15497,12 +16162,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -15557,8 +16222,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -15568,12 +16238,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -15589,7 +16261,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -15625,6 +16296,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -16382,7 +17054,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -16485,19 +17158,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -16527,6 +17223,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -16536,6 +17238,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -16650,12 +17355,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -16742,9 +17447,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -16760,6 +17462,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -16792,210 +17497,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -diff --git a/gas/configure b/gas/configure -index e574cb8514..a36f1ae161 100755 ---- a/gas/configure -+++ b/gas/configure -@@ -650,8 +650,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -763,6 +766,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -4921,8 +4925,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -4962,7 +4966,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5648,8 +5652,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5698,6 +5702,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5714,6 +5792,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -5882,7 +5965,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6036,6 +6120,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6051,9 +6150,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6069,7 +6321,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6089,11 +6341,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6109,7 +6365,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6128,6 +6384,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6139,12 +6399,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -6156,6 +6414,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -6490,8 +6806,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6527,6 +6843,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6568,6 +6885,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6579,7 +6908,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6605,8 +6934,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6616,8 +6945,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6654,6 +6983,21 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -@@ -6671,6 +7015,40 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ - - - -@@ -6881,6 +7259,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7444,6 +7939,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7639,7 +8136,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7728,7 +8226,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8026,8 +8524,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8193,6 +8689,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8255,7 +8757,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8312,13 +8814,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8379,6 +8885,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8729,7 +9240,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8828,12 +9340,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -8847,8 +9359,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -8866,8 +9378,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -8913,8 +9425,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9044,7 +9556,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9057,22 +9575,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9084,7 +9609,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9097,22 +9628,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9157,20 +9695,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9231,7 +9812,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9239,7 +9820,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9255,7 +9836,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9279,10 +9860,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9361,23 +9942,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -9462,7 +10056,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9481,9 +10075,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10059,8 +10653,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10093,13 +10688,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10191,7 +10844,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11031,10 +11684,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11137,10 +11790,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -15425,13 +16078,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -15446,14 +16106,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -15486,12 +16149,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -15546,8 +16209,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -15557,12 +16225,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -15578,7 +16248,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -15614,6 +16283,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -16378,7 +17048,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -16481,19 +17152,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -16523,6 +17217,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -16532,6 +17232,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -16646,12 +17349,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -16738,9 +17441,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -16756,6 +17456,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -16788,210 +17491,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -diff --git a/gprof/configure b/gprof/configure -index 38a4c0b0e5..38d1f699c7 100755 ---- a/gprof/configure -+++ b/gprof/configure -@@ -631,8 +631,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -744,6 +747,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -1402,6 +1406,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -4836,8 +4842,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -4877,7 +4883,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5563,8 +5569,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5613,6 +5619,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5629,6 +5709,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -5797,7 +5882,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -5874,11 +5960,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - --linux-uclibc*) -- lt_cv_deplibs_check_method=pass_all -- lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -- ;; -- - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' -@@ -5956,6 +6037,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -5971,9 +6067,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -5989,7 +6238,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6009,11 +6258,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6029,7 +6282,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6048,6 +6301,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6059,12 +6316,10 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} - - - -@@ -6076,6 +6331,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 -@@ -6410,8 +6723,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6447,6 +6760,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6488,6 +6802,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6499,7 +6825,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6525,8 +6851,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6536,8 +6862,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6574,6 +6900,18 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ - - - -@@ -6595,6 +6933,43 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ -+ - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -@@ -6801,6 +7176,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7364,6 +7856,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7559,7 +8053,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7648,7 +8143,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -7946,8 +8441,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8113,6 +8606,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8175,7 +8674,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8232,13 +8731,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8299,6 +8802,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8649,7 +9157,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8748,12 +9257,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -8767,8 +9276,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -8786,8 +9295,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -8833,8 +9342,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -8964,7 +9473,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -8977,22 +9492,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9004,7 +9526,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9017,22 +9545,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9077,20 +9612,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9151,7 +9729,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9159,7 +9737,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9175,7 +9753,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9199,10 +9777,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9281,23 +9859,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -9382,7 +9973,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9401,9 +9992,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -9979,8 +10570,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10013,13 +10605,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10111,7 +10761,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -10951,10 +11601,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11057,10 +11707,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -13005,13 +13655,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -13026,14 +13683,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -13066,12 +13726,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -13126,8 +13786,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -13137,12 +13802,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -13158,7 +13825,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -13194,6 +13860,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -13950,7 +14617,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -14053,19 +14721,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -14095,6 +14786,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -14104,6 +14801,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -14218,12 +14918,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -14310,9 +15010,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -14328,6 +15025,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -14360,210 +15060,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -diff --git a/ld/configure b/ld/configure -index a16c6db059..4277b74bad 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -659,8 +659,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -782,6 +785,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_plugins - enable_largefile -@@ -1463,6 +1467,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - --with-lib-path=dir1:dir2... set default LIB_PATH - --with-sysroot=DIR Search for usr/lib et al within DIR. - -@@ -5657,8 +5663,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5698,7 +5704,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -6384,8 +6390,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -6434,6 +6440,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -6450,6 +6530,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6618,7 +6703,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6772,6 +6858,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6787,9 +6888,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6805,7 +7059,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6825,11 +7079,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6845,7 +7103,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6864,6 +7122,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6875,12 +7137,12 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ - - - -@@ -6890,6 +7152,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+ -+ -+ -+ -+ - - - if test -n "$ac_tool_prefix"; then -@@ -7226,8 +7544,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -7263,6 +7581,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -7304,6 +7623,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -7315,7 +7646,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -7341,8 +7672,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -7352,8 +7683,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -7390,6 +7721,19 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ - - - -@@ -7410,6 +7754,42 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ - - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : -@@ -7617,6 +7997,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -8180,6 +8677,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -8248,6 +8747,16 @@ done - - - -+func_stripname_cnf () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname_cnf -+ -+ -+ - - - # Set options -@@ -8376,7 +8885,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -8465,7 +8975,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8763,8 +9273,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8930,6 +9438,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8992,7 +9506,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -9049,13 +9563,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -9116,6 +9634,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -9466,7 +9989,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -9565,12 +10089,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9584,8 +10108,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9603,8 +10127,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9650,8 +10174,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9781,7 +10305,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9794,22 +10324,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9821,7 +10358,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9834,22 +10377,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9893,21 +10443,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ # no search path for DLLs. -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9968,7 +10561,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9976,7 +10569,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9992,7 +10585,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -10016,10 +10609,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -10098,23 +10691,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -10199,7 +10805,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -10218,9 +10824,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10796,8 +11402,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10830,13 +11437,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10928,7 +11593,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11768,10 +12433,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11874,10 +12539,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -12269,6 +12934,7 @@ $RM -r conftest* - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC -+ lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX -@@ -12286,6 +12952,7 @@ $RM -r conftest* - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} -+ CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do -@@ -12568,7 +13235,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath__CXX+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -12581,22 +13254,29 @@ main () - _ACEOF - if ac_fn_cxx_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath__CXX"; then -+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath__CXX"; then -+ lt_cv_aix_libpath__CXX="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath__CXX -+fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - -@@ -12609,7 +13289,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath__CXX+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -12622,22 +13308,29 @@ main () - _ACEOF - if ac_fn_cxx_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath__CXX"; then -+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath__CXX"; then -+ lt_cv_aix_libpath__CXX="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath__CXX -+fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -12680,29 +13373,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, -- # as there is no search path for DLLs. -- hardcode_libdir_flag_spec_CXX='-L$libdir' -- export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' -- allow_undefined_flag_CXX=unsupported -- always_export_symbols_CXX=no -- enable_shared_with_static_runtimes_CXX=yes -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- 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' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $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' -- else -- ld_shlibs_CXX=no -- fi -- ;; -+ case $GXX,$cc_basename in -+ ,cl* | no,cl*) -+ # Native MSVC -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec_CXX=' ' -+ allow_undefined_flag_CXX=unsupported -+ always_export_symbols_CXX=yes -+ file_list_spec_CXX='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' -+ enable_shared_with_static_runtimes_CXX=yes -+ # Don't use ranlib -+ old_postinstall_cmds_CXX='chmod 644 $oldlib' -+ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ func_to_tool_file "$lt_outputfile"~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # g++ -+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, -+ # as there is no search path for DLLs. -+ hardcode_libdir_flag_spec_CXX='-L$libdir' -+ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' -+ allow_undefined_flag_CXX=unsupported -+ always_export_symbols_CXX=no -+ enable_shared_with_static_runtimes_CXX=yes -+ -+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -+ 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' -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is; otherwise, prepend... -+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $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' -+ else -+ ld_shlibs_CXX=no -+ fi -+ ;; -+ esac -+ ;; - darwin* | rhapsody*) - - -@@ -12808,7 +13547,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - ;; - *) - if test "$GXX" = yes; then -- 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' -+ 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' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no -@@ -12879,10 +13618,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) -- 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' -+ 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' - ;; - esac - fi -@@ -12923,9 +13662,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then -- 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' -+ 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' - else -- 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' -+ 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' - fi - fi - link_all_deplibs_CXX=yes -@@ -12995,20 +13734,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' -+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ -+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $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' -+ $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' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -@@ -13203,7 +13942,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - 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' - ;; - *) -- 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' -+ 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' - ;; - esac - -@@ -13249,7 +13988,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' -@@ -13290,9 +14029,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when -@@ -13427,6 +14166,13 @@ private: - }; - _LT_EOF - -+ -+_lt_libdeps_save_CFLAGS=$CFLAGS -+case "$CC $CFLAGS " in #( -+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -+esac -+ - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -13440,7 +14186,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do -- case $p in -+ case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. -@@ -13449,13 +14195,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - test $p = "-R"; then - prev=$p - continue -- else -- prev= - fi - -+ # Expand the sysroot to ease extracting the directories later. -+ if test -z "$prev"; then -+ case $p in -+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; -+ esac -+ fi -+ case $p in -+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; -+ esac - if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -+ case ${prev} in -+ -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. -@@ -13475,8 +14230,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi -+ prev= - ;; - -+ *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. -@@ -13512,6 +14269,7 @@ else - fi - - $RM -f confest.$objext -+CFLAGS=$_lt_libdeps_save_CFLAGS - - # PORTME: override above test on systems where it is broken - case $host_os in -@@ -13547,7 +14305,7 @@ linux*) - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as -@@ -13612,8 +14370,6 @@ fi - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then -@@ -13718,6 +14474,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - ;; - esac - ;; -+ mingw* | cygwin* | os2* | pw32* | cegcc*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT' -+ ;; - dgux*) - case $cc_basename in - ec++*) -@@ -13870,7 +14631,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - ;; - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' -@@ -13935,10 +14696,17 @@ case $host_os in - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 --$as_echo "$lt_prog_compiler_pic_CXX" >&6; } -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - - # - # Check to make sure the PIC flag actually works. -@@ -13996,6 +14764,8 @@ fi - - - -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -14173,6 +14943,7 @@ fi - $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. -@@ -14187,15 +14958,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" -- ;; -+ ;; - cygwin* | mingw* | cegcc*) -- 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' -- ;; -+ case $cc_basename in -+ cl*) ;; -+ *) -+ 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' -+ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' -+ ;; -+ esac -+ ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -+ ;; - esac -- exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 - $as_echo "$ld_shlibs_CXX" >&6; } -@@ -14458,8 +15234,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -14491,13 +15268,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -14588,7 +15423,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -15047,6 +15882,7 @@ fi - fi # test -n "$compiler" - - CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC -@@ -18026,13 +18862,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -18047,14 +18890,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -18087,12 +18933,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -18131,8 +18977,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote - compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' - GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' - archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -@@ -18159,12 +19005,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_ - hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' - inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' - link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' - always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' - exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' - include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' - prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' - file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' - hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' - compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -@@ -18202,8 +19048,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -18213,12 +19064,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -18234,7 +19087,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -18256,8 +19108,8 @@ LD_CXX \ - reload_flag_CXX \ - compiler_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ --lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ -+lt_prog_compiler_wl_CXX \ - lt_prog_compiler_static_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - export_dynamic_flag_spec_CXX \ -@@ -18269,7 +19121,6 @@ no_undefined_flag_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ --fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX \ - file_list_spec_CXX \ -@@ -18303,6 +19154,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -18317,7 +19169,8 @@ archive_expsym_cmds_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - export_symbols_cmds_CXX \ --prelink_cmds_CXX; do -+prelink_cmds_CXX \ -+postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" -@@ -19110,7 +19963,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -19213,19 +20067,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -19255,6 +20132,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -19264,6 +20147,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -19378,12 +20264,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -19470,9 +20356,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -19488,6 +20371,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -19534,210 +20420,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -@@ -19765,12 +20610,12 @@ with_gcc=$GCC_CXX - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl_CXX -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic_CXX - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl_CXX -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static_CXX - -@@ -19857,9 +20702,6 @@ inherit_rpath=$inherit_rpath_CXX - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs_CXX - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path_CXX -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols_CXX - -@@ -19875,6 +20717,9 @@ include_expsyms=$lt_include_expsyms_CXX - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds_CXX - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds_CXX -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec_CXX - -diff --git a/libtool.m4 b/libtool.m4 -index 24d13f3440..e45fdc6998 100644 ---- a/libtool.m4 -+++ b/libtool.m4 -@@ -1,7 +1,8 @@ - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is free software; the Free Software Foundation gives -@@ -10,7 +11,8 @@ - - m4_define([_LT_COPYING], [dnl - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - ]) - --# serial 56 LT_INIT -+# serial 57 LT_INIT - - - # LT_PREREQ(VERSION) -@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl - dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_CHECK_SHELL_FEATURES])dnl -+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl - m4_require([_LT_CMD_RELOAD])dnl - m4_require([_LT_CHECK_MAGIC_METHOD])dnl -+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl - m4_require([_LT_CMD_OLD_ARCHIVE])dnl - m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -+m4_require([_LT_WITH_SYSROOT])dnl - - _LT_CONFIG_LIBTOOL_INIT([ - # See if we are running on zsh, and set the options which allow our -@@ -199,7 +205,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl - m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) - configured by $[0], generated by m4_PACKAGE_STRING. - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.lt script is free software; the Free Software Foundation - gives unlimited permision to copy, distribute and modify it." - -@@ -746,15 +752,12 @@ _LT_EOF - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -- _LT_PROG_XSI_SHELLFNS -+ _LT_PROG_REPLACE_SHELLFNS - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - ], -@@ -980,6 +983,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD -+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD -+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], - fi - ]) - --# _LT_SYS_MODULE_PATH_AIX --# ----------------------- -+# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -+# ---------------------------------- - # Links a minimal program and checks the executable - # for the system default hardcoded library path. In most cases, - # this is /usr/lib:/lib, but when the MPI compilers are used - # the location of the communication and MPI libs are included too. - # If we don't find anything, use the default library path according - # to the aix ld manual. -+# Store the results from the different compilers for each TAGNAME. -+# Allow to override them for all tags through lt_cv_aix_libpath. - m4_defun([_LT_SYS_MODULE_PATH_AIX], - [m4_require([_LT_DECL_SED])dnl --AC_LINK_IFELSE(AC_LANG_PROGRAM,[ --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi],[]) --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ -+ lt_aix_libpath_sed='[ -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }]' -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi],[]) -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" -+ fi -+ ]) -+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -+fi - ])# _LT_SYS_MODULE_PATH_AIX - - -@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - - AC_MSG_CHECKING([how to print strings]) - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) - ])# _LT_PROG_ECHO_BACKSLASH - - -+# _LT_WITH_SYSROOT -+# ---------------- -+AC_DEFUN([_LT_WITH_SYSROOT], -+[AC_MSG_CHECKING([for sysroot]) -+AC_ARG_WITH([libtool-sysroot], -+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified).], -+[], [with_libtool_sysroot=no]) -+ -+dnl lt_sysroot will always be passed unquoted. We quote it here -+dnl in case the user passed a directory name. -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ AC_MSG_RESULT([${with_libtool_sysroot}]) -+ AC_MSG_ERROR([The sysroot must be an absolute path.]) -+ ;; -+esac -+ -+ AC_MSG_RESULT([${lt_sysroot:-no}]) -+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -+[dependent libraries, and in which our libraries should be installed.])]) -+ - # _LT_ENABLE_LOCK - # --------------- - m4_defun([_LT_ENABLE_LOCK], -@@ -1320,14 +1369,47 @@ need_locks="$enable_libtool_lock" - ])# _LT_ENABLE_LOCK - - -+# _LT_PROG_AR -+# ----------- -+m4_defun([_LT_PROG_AR], -+[AC_CHECK_TOOLS(AR, [ar], false) -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+_LT_DECL([], [AR], [1], [The archiver]) -+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) -+ -+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], -+ [lt_cv_ar_at_file=no -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], -+ [echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ ]) -+ ]) -+ -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi -+_LT_DECL([], [archiver_list_spec], [1], -+ [How to feed a file listing to the archiver]) -+])# _LT_PROG_AR -+ -+ - # _LT_CMD_OLD_ARCHIVE - # ------------------- - m4_defun([_LT_CMD_OLD_ARCHIVE], --[AC_CHECK_TOOL(AR, ar, false) --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --_LT_DECL([], [AR], [1], [The archiver]) --_LT_DECL([], [AR_FLAGS], [1]) -+[_LT_PROG_AR - - AC_CHECK_TOOL(STRIP, strip, :) - test -z "$STRIP" && STRIP=: -@@ -1623,7 +1705,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --[#line __oline__ "configure" -+[#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -1667,10 +1749,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -2210,8 +2292,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -2244,13 +2327,71 @@ m4_if([$1], [],[ - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -2342,7 +2483,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -2950,6 +3091,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -3016,7 +3162,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -3167,6 +3314,21 @@ tpf*) - ;; - esac - ]) -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - _LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) - _LT_DECL([], [file_magic_cmd], [1], -- [Command to use when deplibs_check_method == "file_magic"]) -+ [Command to use when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [file_magic_glob], [1], -+ [How to find potential files when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [want_nocaseglob], [1], -+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) - ])# _LT_CHECK_MAGIC_METHOD - - -@@ -3277,6 +3443,67 @@ dnl aclocal-1.4 backwards compatibility: - dnl AC_DEFUN([AM_PROG_NM], []) - dnl AC_DEFUN([AC_PROG_NM], []) - -+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -+# -------------------------------- -+# how to determine the name of the shared library -+# associated with a specific link library. -+# -- PORTME fill in with the dynamic library characteristics -+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -+[m4_require([_LT_DECL_EGREP]) -+m4_require([_LT_DECL_OBJDUMP]) -+m4_require([_LT_DECL_DLLTOOL]) -+AC_CACHE_CHECK([how to associate runtime and link libraries], -+lt_cv_sharedlib_from_linklib_cmd, -+[lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+]) -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+_LT_DECL([], [sharedlib_from_linklib_cmd], [1], -+ [Command to associate shared and link libraries]) -+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -+ -+ -+# _LT_PATH_MANIFEST_TOOL -+# ---------------------- -+# locate the manifest tool -+m4_defun([_LT_PATH_MANIFEST_TOOL], -+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], -+ [lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&AS_MESSAGE_LOG_FD -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest*]) -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -+])# _LT_PATH_MANIFEST_TOOL -+ - - # LT_LIB_M - # -------- -@@ -3403,8 +3630,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -3440,6 +3667,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -3473,6 +3701,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT@&t@_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT@&t@_DLSYM_CONST -+#else -+# define LT@&t@_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -3484,7 +3724,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi -@@ -3551,6 +3791,13 @@ else - AC_MSG_RESULT(ok) - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ - _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) - _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], -@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_address], - _LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -+_LT_DECL([], [nm_file_list_spec], [1], -+ [Specify filename containing input files for $NM]) - ]) # _LT_CMD_GLOBAL_SYMBOLS - - -@@ -3572,7 +3821,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)= - --AC_MSG_CHECKING([for $compiler option to produce PIC]) - m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then -@@ -3678,6 +3926,12 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -+ mingw* | cygwin* | os2* | pw32* | cegcc*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ m4_if([$1], [GCJ], [], -+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ ;; - dgux*) - case $cc_basename in - ec++*) -@@ -3830,7 +4084,7 @@ m4_if([$1], [CXX], [ - ;; - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -@@ -4053,6 +4307,12 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -4115,7 +4375,7 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; -@@ -4172,9 +4432,11 @@ case $host_os in - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; - esac --AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) --_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -- [How to pass a linker flag through the compiler]) -+ -+AC_CACHE_CHECK([for $compiler option to produce PIC], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - - # - # Check to make sure the PIC flag actually works. -@@ -4193,6 +4455,8 @@ fi - _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -+ [How to pass a linker flag through the compiler]) - # - # Check to make sure the static flag actually works. - # -@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - m4_defun([_LT_LINKER_SHLIBS], - [AC_REQUIRE([LT_PATH_LD])dnl - AC_REQUIRE([LT_PATH_NM])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl - m4_require([_LT_DECL_SED])dnl -@@ -4221,6 +4486,7 @@ m4_require([_LT_TAG_COMPILER])dnl - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. -@@ -4235,15 +4501,20 @@ m4_if([$1], [CXX], [ - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -- ;; -+ ;; - cygwin* | mingw* | cegcc*) -- _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' -- ;; -+ case $cc_basename in -+ cl*) ;; -+ *) -+ _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' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] -+ ;; -+ esac -+ ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -+ ;; - esac -- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - ], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= -@@ -4411,7 +4682,8 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- _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' -+ _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' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _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' -@@ -4510,12 +4782,12 @@ _LT_EOF - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' -- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -4529,8 +4801,8 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _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' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _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' - fi - ;; - -@@ -4548,8 +4820,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _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' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4595,8 +4867,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _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' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4726,7 +4998,7 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _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" - else -@@ -4737,7 +5009,7 @@ _LT_EOF - else - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -4781,20 +5053,63 @@ _LT_EOF - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -- # FIXME: Should let the user specify the lib program. -- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ _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' -+ # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ # FIXME: Should let the user specify the lib program. -+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -4828,7 +5143,7 @@ _LT_EOF - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -@@ -4836,7 +5151,7 @@ _LT_EOF - - hpux9*) - if test "$GCC" = yes; then -- _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' -+ _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' - else - _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' - fi -@@ -4852,7 +5167,7 @@ _LT_EOF - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -4876,10 +5191,10 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -4926,16 +5241,31 @@ _LT_EOF - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- _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' -+ _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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- AC_LINK_IFELSE(int foo(void) {}, -- _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' -- ) -- LDFLAGS="$save_LDFLAGS" -+ # This should be the same for all languages, so no per-tag cache variable. -+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], -+ [lt_cv_irix_exported_symbol], -+ [save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ AC_LINK_IFELSE( -+ [AC_LANG_SOURCE( -+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], -+ [C++], [[int foo (void) { return 0; }]], -+ [Fortran 77], [[ -+ subroutine foo -+ end]], -+ [Fortran], [[ -+ subroutine foo -+ end]])])], -+ [lt_cv_irix_exported_symbol=yes], -+ [lt_cv_irix_exported_symbol=no]) -+ LDFLAGS="$save_LDFLAGS"]) -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ _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' -+ fi - else - _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' - _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' -@@ -5020,7 +5350,7 @@ _LT_EOF - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _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' -+ _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' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -@@ -5039,9 +5369,9 @@ _LT_EOF - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -5313,8 +5643,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], - to runtime path list]) - _LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) --_LT_TAGDECL([], [fix_srcfile_path], [1], -- [Fix the shell variable $srcfile for the compiler]) - _LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) - _LT_TAGDECL([], [export_symbols_cmds], [2], -@@ -5325,6 +5653,8 @@ _LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) - _LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -+_LT_TAGDECL([], [postlink_cmds], [2], -+ [Commands necessary for finishing linking programs]) - _LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) - dnl FIXME: Not yet implemented -@@ -5426,6 +5756,7 @@ CC="$lt_save_CC" - m4_defun([_LT_LANG_CXX_CONFIG], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then -@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes; then - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC -+ lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX -@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes; then - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} -+ CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _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" -@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes; then - else - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes; then - ;; - - cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _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' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $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' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+ case $GXX,$cc_basename in -+ ,cl* | no,cl*) -+ # Native MSVC -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ func_to_tool_file "$lt_outputfile"~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # g++ -+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -+ # as there is no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=no -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ -+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -+ _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' -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is; otherwise, prepend... -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $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' -+ else -+ _LT_TAGVAR(ld_shlibs, $1)=no -+ fi -+ ;; -+ esac -+ ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; -@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes; then - ;; - *) - if test "$GXX" = yes; then -- _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' -+ _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' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no -@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- _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' -+ _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' - ;; - *) -- _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' -+ _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' - ;; - esac - fi -@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes; then - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then -- _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' -+ _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' - else -- _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' -+ _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' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes -@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' -+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ -+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $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' -+ $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' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes; then - _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' - ;; - *) -- _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' -+ _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' - ;; - esac - -@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes; then - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes; then - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _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' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when -@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes; then - fi # test -n "$compiler" - - CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC -@@ -6445,6 +6825,29 @@ AC_LANG_POP - ])# _LT_LANG_CXX_CONFIG - - -+# _LT_FUNC_STRIPNAME_CNF -+# ---------------------- -+# func_stripname_cnf prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# -+# This function is identical to the (non-XSI) version of func_stripname, -+# except this one can be used by m4 code that may be executed by configure, -+# rather than the libtool script. -+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -+AC_REQUIRE([_LT_DECL_SED]) -+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -+func_stripname_cnf () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname_cnf -+])# _LT_FUNC_STRIPNAME_CNF -+ - # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) - # --------------------------------- - # Figure out "hidden" library dependencies from verbose -@@ -6453,6 +6856,7 @@ AC_LANG_POP - # objects, libraries and library flags. - m4_defun([_LT_SYS_HIDDEN_LIBDEPS], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl -+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl - # Dependencies to place before and after the object being linked: - _LT_TAGVAR(predep_objects, $1)= - _LT_TAGVAR(postdep_objects, $1)= -@@ -6503,6 +6907,13 @@ public class foo { - }; - _LT_EOF - ]) -+ -+_lt_libdeps_save_CFLAGS=$CFLAGS -+case "$CC $CFLAGS " in #( -+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -+esac -+ - dnl Parse the compiler output and extract the necessary - dnl objects, libraries and library flags. - if AC_TRY_EVAL(ac_compile); then -@@ -6514,7 +6925,7 @@ if AC_TRY_EVAL(ac_compile); then - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do -- case $p in -+ case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. -@@ -6523,13 +6934,22 @@ if AC_TRY_EVAL(ac_compile); then - test $p = "-R"; then - prev=$p - continue -- else -- prev= - fi - -+ # Expand the sysroot to ease extracting the directories later. -+ if test -z "$prev"; then -+ case $p in -+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; -+ esac -+ fi -+ case $p in -+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; -+ esac - if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -+ case ${prev} in -+ -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. -@@ -6549,8 +6969,10 @@ if AC_TRY_EVAL(ac_compile); then - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi -+ prev= - ;; - -+ *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. -@@ -6586,6 +7008,7 @@ else - fi - - $RM -f confest.$objext -+CFLAGS=$_lt_libdeps_save_CFLAGS - - # PORTME: override above test on systems where it is broken - m4_if([$1], [CXX], -@@ -6622,7 +7045,7 @@ linux*) - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as -@@ -6735,7 +7158,9 @@ if test "$_lt_disable_F77" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} -+ CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -6789,6 +7214,7 @@ if test "$_lt_disable_F77" != yes; then - - GCC=$lt_save_GCC - CC="$lt_save_CC" -+ CFLAGS="$lt_save_CFLAGS" - fi # test "$_lt_disable_F77" != yes - - AC_LANG_POP -@@ -6865,7 +7291,9 @@ if test "$_lt_disable_FC" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} -+ CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - -@@ -6921,7 +7349,8 @@ if test "$_lt_disable_FC" != yes; then - fi # test -n "$compiler" - - GCC=$lt_save_GCC -- CC="$lt_save_CC" -+ CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - fi # test "$_lt_disable_FC" != yes - - AC_LANG_POP -@@ -6958,10 +7387,12 @@ _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. --lt_save_CC="$CC" -+lt_save_CC=$CC -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC=yes - CC=${GCJ-"gcj"} -+CFLAGS=$GCJFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_TAGVAR(LD, $1)="$LD" -@@ -6992,7 +7423,8 @@ fi - AC_LANG_RESTORE - - GCC=$lt_save_GCC --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_GCJ_CONFIG - - -@@ -7027,9 +7459,11 @@ _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC= - CC=${RC-"windres"} -+CFLAGS= - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -7042,7 +7476,8 @@ fi - - GCC=$lt_save_GCC - AC_LANG_RESTORE --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_RC_CONFIG - - -@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) - AC_SUBST([OBJDUMP]) - ]) - -+# _LT_DECL_DLLTOOL -+# ---------------- -+# Ensure DLLTOOL variable is set. -+m4_defun([_LT_DECL_DLLTOOL], -+[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -+AC_SUBST([DLLTOOL]) -+]) - - # _LT_DECL_SED - # ------------ -@@ -7194,8 +7638,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl - ])# _LT_CHECK_SHELL_FEATURES - - --# _LT_PROG_XSI_SHELLFNS --# --------------------- --# Bourne and XSI compatible variants of some useful shell functions. --m4_defun([_LT_PROG_XSI_SHELLFNS], --[case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $[*] )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -+# ------------------------------------------------------ -+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -+m4_defun([_LT_PROG_FUNCTION_REPLACE], -+[dnl { -+sed -e '/^$1 ()$/,/^} # $1 /c\ -+$1 ()\ -+{\ -+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+]) - --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" - --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -+# _LT_PROG_REPLACE_SHELLFNS -+# ------------------------- -+# Replace existing portable implementations of several shell functions with -+# equivalent extended shell implementations where those features are available.. -+m4_defun([_LT_PROG_REPLACE_SHELLFNS], -+[if test x"$xsi_shell" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl -+ func_basename_result="${1##*/}"]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac -+ func_basename_result="${1##*/}"]) - --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl -+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -+ # positional parameters, so assign one to ordinary parameter first. -+ func_stripname_result=${3} -+ func_stripname_result=${func_stripname_result#"${1}"} -+ func_stripname_result=${func_stripname_result%"${2}"}]) - --dnl func_dirname_and_basename --dnl A portable version of this function is already defined in general.m4sh --dnl so there is no need for it here. -+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl -+ func_split_long_opt_name=${1%%=*} -+ func_split_long_opt_arg=${1#*=}]) - --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl -+ func_split_short_opt_arg=${1#??} -+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - --# sed scripts: --my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[[^=]]*=//' -+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl -+ case ${1} in -+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -+ *) func_lo2o_result=${1} ;; -+ esac]) - --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` --} -+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -+fi - --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$[@]"` --} -+if test x"$lt_shell_append" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` --} -+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl -+ func_quote_for_eval "${2}" -+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ -+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - --_LT_EOF --esac -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi - --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -+if test x"$_lt_function_replace_fail" = x":"; then -+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -+fi -+]) - --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]+=\$[2]" --} --_LT_EOF -+# _LT_PATH_CONVERSION_FUNCTIONS -+# ----------------------------- -+# Determine which file name conversion functions should be used by -+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -+# for certain cross-compile configurations and native mingw. -+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -+[AC_REQUIRE([AC_CANONICAL_HOST])dnl -+AC_REQUIRE([AC_CANONICAL_BUILD])dnl -+AC_MSG_CHECKING([how to convert $build file names to $host format]) -+AC_CACHE_VAL(lt_cv_to_host_file_cmd, -+[case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac - ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]=\$$[1]\$[2]" --} -- --_LT_EOF -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac - ;; -- esac -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+]) -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], -+ [0], [convert $build file names to $host format])dnl -+ -+AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -+AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -+[#assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac - ]) -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], -+ [0], [convert $build files to toolchain format])dnl -+])# _LT_PATH_CONVERSION_FUNCTIONS -diff --git a/ltmain.sh b/ltmain.sh -index 9503ec85d7..70e856e065 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -1,10 +1,9 @@ --# Generated from ltmain.m4sh. - --# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# libtool (GNU libtool) 2.4 - # Written by Gordon Matzigkeit , 1996 - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, --# 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - # This is free software; see the source for copying conditions. There is NO - # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -@@ -38,7 +37,6 @@ - # -n, --dry-run display commands without modifying any files - # --features display basic configuration information and exit - # --mode=MODE use operation mode MODE --# --no-finish let install mode avoid finish commands - # --preserve-dup-deps don't remove duplicate dependency libraries - # --quiet, --silent don't print informational messages - # --no-quiet, --no-silent -@@ -71,17 +69,19 @@ - # compiler: $LTCC - # compiler flags: $LTCFLAGS - # linker: $LD (gnu? $with_gnu_ld) --# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# $progname: (GNU libtool) 2.4 - # automake: $automake_version - # autoconf: $autoconf_version - # - # Report bugs to . -+# GNU libtool home page: . -+# General help using GNU software: . - - PROGRAM=libtool - PACKAGE=libtool --VERSION=2.2.7a --TIMESTAMP=" 1.3134 2009-11-29" --package_revision=1.3134 -+VERSION=2.4 -+TIMESTAMP="" -+package_revision=1.3293 - - # Be Bourne compatible - if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -@@ -106,9 +106,6 @@ _LTECHO_EOF' - } - - # NLS nuisances: We save the old values to restore during execute mode. --# Only set LANG and LC_ALL to C if already set. --# These must not be set unconditionally because not all systems understand --# e.g. LANG=C (notably SCO). - lt_user_locale= - lt_safe_locale= - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -@@ -121,15 +118,13 @@ do - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" - done -+LC_ALL=C -+LANGUAGE=C -+export LANGUAGE LC_ALL - - $lt_unset CDPATH - - -- -- -- -- -- - # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh - # is ksh but when the shell is invoked as "sh" and the current value of - # the _XPG environment variable is not equal to 1 (one), the special -@@ -140,7 +135,7 @@ progpath="$0" - - - : ${CP="cp -f"} --: ${ECHO=$as_echo} -+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} - : ${EGREP="/bin/grep -E"} - : ${FGREP="/bin/grep -F"} - : ${GREP="/bin/grep"} -@@ -149,7 +144,7 @@ progpath="$0" - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} --: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} -+: ${SED="/bin/sed"} - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} - -@@ -169,6 +164,27 @@ IFS=" $lt_nl" - dirname="s,/[^/]*$,," - basename="s,^.*/,," - -+# func_dirname file append nondir_replacement -+# Compute the dirname of FILE. If nonempty, add APPEND to the result, -+# otherwise set result to NONDIR_REPLACEMENT. -+func_dirname () -+{ -+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+} # func_dirname may be replaced by extended shell implementation -+ -+ -+# func_basename file -+func_basename () -+{ -+ func_basename_result=`$ECHO "${1}" | $SED "$basename"` -+} # func_basename may be replaced by extended shell implementation -+ -+ - # func_dirname_and_basename file append nondir_replacement - # perform func_basename and func_dirname in a single function - # call: -@@ -183,17 +199,31 @@ basename="s,^.*/,," - # those functions but instead duplicate the functionality here. - func_dirname_and_basename () - { -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi -- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` --} -+ # Extract subdirectory from the argument. -+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -+} # func_dirname_and_basename may be replaced by extended shell implementation -+ -+ -+# func_stripname prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# func_strip_suffix prefix name -+func_stripname () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname may be replaced by extended shell implementation - --# Generated shell functions inserted here. - - # These SED scripts presuppose an absolute path with a trailing slash. - pathcar='s,^/\([^/]*\).*$,\1,' -@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - # Same as above, but do not quote variable references. - double_quote_subst='s/\(["`\\]\)/\\\1/g' - -+# Sed substitution that turns a string into a regex matching for the -+# string literally. -+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -+ -+# Sed substitution that converts a w32 file name or path -+# which contains forward slashes, into one that contains -+# (escaped) backslashes. A very naive implementation. -+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -+ - # Re-`\' parameter expansions in output of double_quote_subst that were - # `\'-ed in input to the same. If an odd number of `\' preceded a '$' - # in input to double_quote_subst, that '$' was protected from expansion. -@@ -404,7 +443,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname${mode+: }$mode: $*" -+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" - } - - # func_verbose arg... -@@ -430,14 +469,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 - } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -@@ -656,19 +695,35 @@ func_show_eval_locale () - fi - } - -- -- -+# func_tr_sh -+# Turn $1 into a string suitable for a shell variable name. -+# Result is stored in $func_tr_sh_result. All characters -+# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -+# if $1 begins with a digit, a '_' is prepended as well. -+func_tr_sh () -+{ -+ case $1 in -+ [0-9]* | *[!a-zA-Z0-9_]*) -+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` -+ ;; -+ * ) -+ func_tr_sh_result=$1 -+ ;; -+ esac -+} - - - # func_version - # Echo version message to standard output and exit. - func_version () - { -+ $opt_debug -+ - $SED -n '/(C)/!b go - :more - /\./!{ - N -- s/\n# // -+ s/\n# / / - b more - } - :go -@@ -685,7 +740,9 @@ func_version () - # Echo short help message to standard output and exit. - func_usage () - { -- $SED -n '/^# Usage:/,/^# *-h/ { -+ $opt_debug -+ -+ $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ -@@ -701,7 +758,10 @@ func_usage () - # unless 'noexit' is passed as argument. - func_help () - { -+ $opt_debug -+ - $SED -n '/^# Usage:/,/# Report bugs to/ { -+ :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* -@@ -714,7 +774,11 @@ func_help () - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p -- }' < "$progpath" -+ d -+ } -+ /^# .* home page:/b print -+ /^# General help using/b print -+ ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret -@@ -726,12 +790,39 @@ func_help () - # exit_cmd. - func_missing_arg () - { -- func_error "missing argument for $1" -+ $opt_debug -+ -+ func_error "missing argument for $1." - exit_cmd=exit - } - --exit_cmd=: - -+# func_split_short_opt shortopt -+# Set func_split_short_opt_name and func_split_short_opt_arg shell -+# variables after splitting SHORTOPT after the 2nd character. -+func_split_short_opt () -+{ -+ my_sed_short_opt='1s/^\(..\).*$/\1/;q' -+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' -+ -+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` -+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -+} # func_split_short_opt may be replaced by extended shell implementation -+ -+ -+# func_split_long_opt longopt -+# Set func_split_long_opt_name and func_split_long_opt_arg shell -+# variables after splitting LONGOPT at the `=' sign. -+func_split_long_opt () -+{ -+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' -+ my_sed_long_arg='1s/^--[^=]*=//' -+ -+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` -+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -+} # func_split_long_opt may be replaced by extended shell implementation -+ -+exit_cmd=: - - - -@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" - magic_exe="%%%MAGIC EXE variable%%%" - - # Global variables. --# $mode is unset - nonopt= --execute_dlfiles= - preserve_args= - lo2o="s/\\.lo\$/.${objext}/" - o2lo="s/\\.${objext}\$/.lo/" - extracted_archives= - extracted_serial=0 - --opt_dry_run=false --opt_finish=: --opt_duplicate_deps=false --opt_silent=false --opt_debug=: -- - # If this variable is set in any of the actions, the command in it - # will be execed at the end. This prevents here-documents from being - # left over by shells. - exec_cmd= - -+# func_append var value -+# Append VALUE to the end of shell variable VAR. -+func_append () -+{ -+ eval "${1}=\$${1}\${2}" -+} # func_append may be replaced by extended shell implementation -+ -+# func_append_quoted var value -+# Quote VALUE and append to the end of shell variable VAR, separated -+# by a space. -+func_append_quoted () -+{ -+ func_quote_for_eval "${2}" -+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -+} # func_append_quoted may be replaced by extended shell implementation -+ -+ -+# func_arith arithmetic-term... -+func_arith () -+{ -+ func_arith_result=`expr "${@}"` -+} # func_arith may be replaced by extended shell implementation -+ -+ -+# func_len string -+# STRING may not start with a hyphen. -+func_len () -+{ -+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -+} # func_len may be replaced by extended shell implementation -+ -+ -+# func_lo2o object -+func_lo2o () -+{ -+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -+} # func_lo2o may be replaced by extended shell implementation -+ -+ -+# func_xform libobj-or-source -+func_xform () -+{ -+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -+} # func_xform may be replaced by extended shell implementation -+ -+ - # func_fatal_configuration arg... - # Echo program name prefixed message to standard error, followed by - # a configuration failure hint, and exit. -@@ -850,130 +979,204 @@ func_enable_tag () - esac - } - --# Parse options once, thoroughly. This comes as soon as possible in --# the script to make things like `libtool --version' happen quickly. -+# func_check_version_match -+# Ensure that we are using m4 macros, and libtool script from the same -+# release of libtool. -+func_check_version_match () - { -+ if test "$package_revision" != "$macro_revision"; then -+ if test "$VERSION" != "$macro_version"; then -+ if test -z "$macro_version"; then -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from an older release. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ fi -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -+$progname: but the definition of this LT_INIT comes from revision $macro_revision. -+$progname: You should recreate aclocal.m4 with macros from revision $package_revision -+$progname: of $PACKAGE $VERSION and run autoconf again. -+_LT_EOF -+ fi - -- # Shorthand for --mode=foo, only valid as the first argument -- case $1 in -- clean|clea|cle|cl) -- shift; set dummy --mode clean ${1+"$@"}; shift -- ;; -- compile|compil|compi|comp|com|co|c) -- shift; set dummy --mode compile ${1+"$@"}; shift -- ;; -- execute|execut|execu|exec|exe|ex|e) -- shift; set dummy --mode execute ${1+"$@"}; shift -- ;; -- finish|finis|fini|fin|fi|f) -- shift; set dummy --mode finish ${1+"$@"}; shift -- ;; -- install|instal|insta|inst|ins|in|i) -- shift; set dummy --mode install ${1+"$@"}; shift -- ;; -- link|lin|li|l) -- shift; set dummy --mode link ${1+"$@"}; shift -- ;; -- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -- shift; set dummy --mode uninstall ${1+"$@"}; shift -- ;; -- esac -+ exit $EXIT_MISMATCH -+ fi -+} -+ -+ -+# Shorthand for --mode=foo, only valid as the first argument -+case $1 in -+clean|clea|cle|cl) -+ shift; set dummy --mode clean ${1+"$@"}; shift -+ ;; -+compile|compil|compi|comp|com|co|c) -+ shift; set dummy --mode compile ${1+"$@"}; shift -+ ;; -+execute|execut|execu|exec|exe|ex|e) -+ shift; set dummy --mode execute ${1+"$@"}; shift -+ ;; -+finish|finis|fini|fin|fi|f) -+ shift; set dummy --mode finish ${1+"$@"}; shift -+ ;; -+install|instal|insta|inst|ins|in|i) -+ shift; set dummy --mode install ${1+"$@"}; shift -+ ;; -+link|lin|li|l) -+ shift; set dummy --mode link ${1+"$@"}; shift -+ ;; -+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -+ shift; set dummy --mode uninstall ${1+"$@"}; shift -+ ;; -+esac - -- # Parse non-mode specific arguments: -- while test "$#" -gt 0; do -+ -+ -+# Option defaults: -+opt_debug=: -+opt_dry_run=false -+opt_config=false -+opt_preserve_dup_deps=false -+opt_features=false -+opt_finish=false -+opt_help=false -+opt_help_all=false -+opt_silent=: -+opt_verbose=: -+opt_silent=false -+opt_verbose=false -+ -+ -+# Parse options once, thoroughly. This comes as soon as possible in the -+# script to make things like `--version' happen as quickly as we can. -+{ -+ # this just eases exit handling -+ while test $# -gt 0; do - opt="$1" - shift -- - case $opt in -- --config) func_config ;; -- -- --debug) preserve_args="$preserve_args $opt" -+ --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" -- opt_debug='set -x' - $opt_debug - ;; -- -- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break -- execute_dlfiles="$execute_dlfiles $1" -- shift -+ --dry-run|--dryrun|-n) -+ opt_dry_run=: - ;; -- -- --dry-run | -n) opt_dry_run=: ;; -- --features) func_features ;; -- --finish) mode="finish" ;; -- --no-finish) opt_finish=false ;; -- -- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break -- case $1 in -- # Valid mode arguments: -- clean) ;; -- compile) ;; -- execute) ;; -- finish) ;; -- install) ;; -- link) ;; -- relink) ;; -- uninstall) ;; -- -- # Catch anything else as an error -- *) func_error "invalid argument for $opt" -- exit_cmd=exit -- break -- ;; -- esac -- -- mode="$1" -+ --config) -+ opt_config=: -+func_config -+ ;; -+ --dlopen|-dlopen) -+ optarg="$1" -+ opt_dlopen="${opt_dlopen+$opt_dlopen -+}$optarg" - shift - ;; -- - --preserve-dup-deps) -- opt_duplicate_deps=: ;; -- -- --quiet|--silent) preserve_args="$preserve_args $opt" -- opt_silent=: -- opt_verbose=false -+ opt_preserve_dup_deps=: - ;; -- -- --no-quiet|--no-silent) -- preserve_args="$preserve_args $opt" -- opt_silent=false -+ --features) -+ opt_features=: -+func_features - ;; -- -- --verbose| -v) preserve_args="$preserve_args $opt" -+ --finish) -+ opt_finish=: -+set dummy --mode finish ${1+"$@"}; shift -+ ;; -+ --help) -+ opt_help=: -+ ;; -+ --help-all) -+ opt_help_all=: -+opt_help=': help-all' -+ ;; -+ --mode) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_mode="$optarg" -+case $optarg in -+ # Valid mode arguments: -+ clean|compile|execute|finish|install|link|relink|uninstall) ;; -+ -+ # Catch anything else as an error -+ *) func_error "invalid argument for $opt" -+ exit_cmd=exit -+ break -+ ;; -+esac -+ shift -+ ;; -+ --no-silent|--no-quiet) - opt_silent=false -- opt_verbose=: -+func_append preserve_args " $opt" - ;; -- -- --no-verbose) preserve_args="$preserve_args $opt" -+ --no-verbose) - opt_verbose=false -+func_append preserve_args " $opt" - ;; -- -- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break -- preserve_args="$preserve_args $opt $1" -- func_enable_tag "$1" # tagname is set here -+ --silent|--quiet) -+ opt_silent=: -+func_append preserve_args " $opt" -+ opt_verbose=false -+ ;; -+ --verbose|-v) -+ opt_verbose=: -+func_append preserve_args " $opt" -+opt_silent=false -+ ;; -+ --tag) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_tag="$optarg" -+func_append preserve_args " $opt $optarg" -+func_enable_tag "$optarg" - shift - ;; - -+ -\?|-h) func_usage ;; -+ --help) func_help ;; -+ --version) func_version ;; -+ - # Separate optargs to long options: -- -dlopen=*|--mode=*|--tag=*) -- func_opt_split "$opt" -- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} -+ --*=*) -+ func_split_long_opt "$opt" -+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - -- -\?|-h) func_usage ;; -- --help) opt_help=: ;; -- --help-all) opt_help=': help-all' ;; -- --version) func_version ;; -- -- -*) func_fatal_help "unrecognized option \`$opt'" ;; -- -- *) nonopt="$opt" -- break -+ # Separate non-argument short options: -+ -\?*|-h*|-n*|-v*) -+ func_split_short_opt "$opt" -+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} -+ shift - ;; -+ -+ --) break ;; -+ -*) func_fatal_help "unrecognized option \`$opt'" ;; -+ *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - -+ # Validate options: -+ -+ # save first non-option argument -+ if test "$#" -gt 0; then -+ nonopt="$opt" -+ shift -+ fi -+ -+ # preserve --debug -+ test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* ) -@@ -981,82 +1184,44 @@ func_enable_tag () - opt_duplicate_compiler_generated_deps=: - ;; - *) -- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps -+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - -- # Having warned about all mis-specified options, bail out if -- # anything was wrong. -- $exit_cmd $EXIT_FAILURE --} -+ $opt_help || { -+ # Sanity checks first: -+ func_check_version_match - --# func_check_version_match --# Ensure that we are using m4 macros, and libtool script from the same --# release of libtool. --func_check_version_match () --{ -- if test "$package_revision" != "$macro_revision"; then -- if test "$VERSION" != "$macro_version"; then -- if test -z "$macro_version"; then -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from an older release. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- fi -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, --$progname: but the definition of this LT_INIT comes from revision $macro_revision. --$progname: You should recreate aclocal.m4 with macros from revision $package_revision --$progname: of $PACKAGE $VERSION and run autoconf again. --_LT_EOF -+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -+ func_fatal_configuration "not configured to build any kind of library" - fi - -- exit $EXIT_MISMATCH -- fi --} -- -+ # Darwin sucks -+ eval std_shrext=\"$shrext_cmds\" - --## ----------- ## --## Main. ## --## ----------- ## -- --$opt_help || { -- # Sanity checks first: -- func_check_version_match -- -- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -- func_fatal_configuration "not configured to build any kind of library" -- fi -+ # Only execute mode is allowed to have -dlopen flags. -+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then -+ func_error "unrecognized option \`-dlopen'" -+ $ECHO "$help" 1>&2 -+ exit $EXIT_FAILURE -+ fi - -- test -z "$mode" && func_fatal_error "error: you must specify a MODE." -+ # Change the help message to a mode-specific one. -+ generic_help="$help" -+ help="Try \`$progname --help --mode=$opt_mode' for more information." -+ } - - -- # Darwin sucks -- eval "std_shrext=\"$shrext_cmds\"" -+ # Bail if the options were screwed -+ $exit_cmd $EXIT_FAILURE -+} - - -- # Only execute mode is allowed to have -dlopen flags. -- if test -n "$execute_dlfiles" && test "$mode" != execute; then -- func_error "unrecognized option \`-dlopen'" -- $ECHO "$help" 1>&2 -- exit $EXIT_FAILURE -- fi - -- # Change the help message to a mode-specific one. -- generic_help="$help" -- help="Try \`$progname --help --mode=$mode' for more information." --} - -+## ----------- ## -+## Main. ## -+## ----------- ## - - # func_lalib_p file - # True iff FILE is a libtool `.la' library or `.lo' object file. -@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () - # temporary ltwrapper_script. - func_ltwrapper_scriptname () - { -- func_ltwrapper_scriptname_result="" -- if func_ltwrapper_executable_p "$1"; then -- func_dirname_and_basename "$1" "" "." -- func_stripname '' '.exe' "$func_basename_result" -- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -- fi -+ func_dirname_and_basename "$1" "" "." -+ func_stripname '' '.exe' "$func_basename_result" -+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - } - - # func_ltwrapper_p file -@@ -1149,7 +1311,7 @@ func_execute_cmds () - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -@@ -1172,6 +1334,37 @@ func_source () - } - - -+# func_resolve_sysroot PATH -+# Replace a leading = in PATH with a sysroot. Store the result into -+# func_resolve_sysroot_result -+func_resolve_sysroot () -+{ -+ func_resolve_sysroot_result=$1 -+ case $func_resolve_sysroot_result in -+ =*) -+ func_stripname '=' '' "$func_resolve_sysroot_result" -+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result -+ ;; -+ esac -+} -+ -+# func_replace_sysroot PATH -+# If PATH begins with the sysroot, replace it with = and -+# store the result into func_replace_sysroot_result. -+func_replace_sysroot () -+{ -+ case "$lt_sysroot:$1" in -+ ?*:"$lt_sysroot"*) -+ func_stripname "$lt_sysroot" '' "$1" -+ func_replace_sysroot_result="=$func_stripname_result" -+ ;; -+ *) -+ # Including no sysroot. -+ func_replace_sysroot_result=$1 -+ ;; -+ esac -+} -+ - # func_infer_tag arg - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. -@@ -1184,8 +1377,7 @@ func_infer_tag () - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1204,8 +1396,7 @@ func_infer_tag () - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1274,6 +1465,486 @@ EOF - } - } - -+ -+################################################## -+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # -+################################################## -+ -+# func_convert_core_file_wine_to_w32 ARG -+# Helper function used by file name conversion functions when $build is *nix, -+# and $host is mingw, cygwin, or some other w32 environment. Relies on a -+# correctly configured wine environment available, with the winepath program -+# in $build's $PATH. -+# -+# ARG is the $build file name to be converted to w32 format. -+# Result is available in $func_convert_core_file_wine_to_w32_result, and will -+# be empty on error (or when ARG is empty) -+func_convert_core_file_wine_to_w32 () -+{ -+ $opt_debug -+ func_convert_core_file_wine_to_w32_result="$1" -+ if test -n "$1"; then -+ # Unfortunately, winepath does not exit with a non-zero error code, so we -+ # are forced to check the contents of stdout. On the other hand, if the -+ # command is not found, the shell will set an exit code of 127 and print -+ # *an error message* to stdout. So we must check for both error code of -+ # zero AND non-empty stdout, which explains the odd construction: -+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` -+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then -+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | -+ $SED -e "$lt_sed_naive_backslashify"` -+ else -+ func_convert_core_file_wine_to_w32_result= -+ fi -+ fi -+} -+# end: func_convert_core_file_wine_to_w32 -+ -+ -+# func_convert_core_path_wine_to_w32 ARG -+# Helper function used by path conversion functions when $build is *nix, and -+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -+# configured wine environment available, with the winepath program in $build's -+# $PATH. Assumes ARG has no leading or trailing path separator characters. -+# -+# ARG is path to be converted from $build format to win32. -+# Result is available in $func_convert_core_path_wine_to_w32_result. -+# Unconvertible file (directory) names in ARG are skipped; if no directory names -+# are convertible, then the result may be empty. -+func_convert_core_path_wine_to_w32 () -+{ -+ $opt_debug -+ # unfortunately, winepath doesn't convert paths, only file names -+ func_convert_core_path_wine_to_w32_result="" -+ if test -n "$1"; then -+ oldIFS=$IFS -+ IFS=: -+ for func_convert_core_path_wine_to_w32_f in $1; do -+ IFS=$oldIFS -+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" -+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then -+ if test -z "$func_convert_core_path_wine_to_w32_result"; then -+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" -+ else -+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" -+ fi -+ fi -+ done -+ IFS=$oldIFS -+ fi -+} -+# end: func_convert_core_path_wine_to_w32 -+ -+ -+# func_cygpath ARGS... -+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -+# (2), returns the Cygwin file name or path in func_cygpath_result (input -+# file name or path is assumed to be in w32 format, as previously converted -+# from $build's *nix or MSYS format). In case (3), returns the w32 file name -+# or path in func_cygpath_result (input file name or path is assumed to be in -+# Cygwin format). Returns an empty string on error. -+# -+# ARGS are passed to cygpath, with the last one being the file name or path to -+# be converted. -+# -+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -+# environment variable; do not put it in $PATH. -+func_cygpath () -+{ -+ $opt_debug -+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then -+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` -+ if test "$?" -ne 0; then -+ # on failure, ensure result is empty -+ func_cygpath_result= -+ fi -+ else -+ func_cygpath_result= -+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" -+ fi -+} -+#end: func_cygpath -+ -+ -+# func_convert_core_msys_to_w32 ARG -+# Convert file name or path ARG from MSYS format to w32 format. Return -+# result in func_convert_core_msys_to_w32_result. -+func_convert_core_msys_to_w32 () -+{ -+ $opt_debug -+ # awkward: cmd appends spaces to result -+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | -+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -+} -+#end: func_convert_core_msys_to_w32 -+ -+ -+# func_convert_file_check ARG1 ARG2 -+# Verify that ARG1 (a file name in $build format) was converted to $host -+# format in ARG2. Otherwise, emit an error message, but continue (resetting -+# func_to_host_file_result to ARG1). -+func_convert_file_check () -+{ -+ $opt_debug -+ if test -z "$2" && test -n "$1" ; then -+ func_error "Could not determine host file name corresponding to" -+ func_error " \`$1'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback: -+ func_to_host_file_result="$1" -+ fi -+} -+# end func_convert_file_check -+ -+ -+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -+# Verify that FROM_PATH (a path in $build format) was converted to $host -+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -+# func_to_host_file_result to a simplistic fallback value (see below). -+func_convert_path_check () -+{ -+ $opt_debug -+ if test -z "$4" && test -n "$3"; then -+ func_error "Could not determine the host path corresponding to" -+ func_error " \`$3'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback. This is a deliberately simplistic "conversion" and -+ # should not be "improved". See libtool.info. -+ if test "x$1" != "x$2"; then -+ lt_replace_pathsep_chars="s|$1|$2|g" -+ func_to_host_path_result=`echo "$3" | -+ $SED -e "$lt_replace_pathsep_chars"` -+ else -+ func_to_host_path_result="$3" -+ fi -+ fi -+} -+# end func_convert_path_check -+ -+ -+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -+# and appending REPL if ORIG matches BACKPAT. -+func_convert_path_front_back_pathsep () -+{ -+ $opt_debug -+ case $4 in -+ $1 ) func_to_host_path_result="$3$func_to_host_path_result" -+ ;; -+ esac -+ case $4 in -+ $2 ) func_append func_to_host_path_result "$3" -+ ;; -+ esac -+} -+# end func_convert_path_front_back_pathsep -+ -+ -+################################################## -+# $build to $host FILE NAME CONVERSION FUNCTIONS # -+################################################## -+# invoked via `$to_host_file_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# Result will be available in $func_to_host_file_result. -+ -+ -+# func_to_host_file ARG -+# Converts the file name ARG from $build format to $host format. Return result -+# in func_to_host_file_result. -+func_to_host_file () -+{ -+ $opt_debug -+ $to_host_file_cmd "$1" -+} -+# end func_to_host_file -+ -+ -+# func_to_tool_file ARG LAZY -+# converts the file name ARG from $build format to toolchain format. Return -+# result in func_to_tool_file_result. If the conversion in use is listed -+# in (the comma separated) LAZY, no conversion takes place. -+func_to_tool_file () -+{ -+ $opt_debug -+ case ,$2, in -+ *,"$to_tool_file_cmd",*) -+ func_to_tool_file_result=$1 -+ ;; -+ *) -+ $to_tool_file_cmd "$1" -+ func_to_tool_file_result=$func_to_host_file_result -+ ;; -+ esac -+} -+# end func_to_tool_file -+ -+ -+# func_convert_file_noop ARG -+# Copy ARG to func_to_host_file_result. -+func_convert_file_noop () -+{ -+ func_to_host_file_result="$1" -+} -+# end func_convert_file_noop -+ -+ -+# func_convert_file_msys_to_w32 ARG -+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_file_result. -+func_convert_file_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_msys_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_w32 -+ -+ -+# func_convert_file_cygwin_to_w32 ARG -+# Convert file name ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_file_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use -+ # LT_CYGPATH in this case. -+ func_to_host_file_result=`cygpath -m "$1"` -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_cygwin_to_w32 -+ -+ -+# func_convert_file_nix_to_w32 ARG -+# Convert file name ARG from *nix to w32 format. Requires a wine environment -+# and a working winepath. Returns result in func_to_host_file_result. -+func_convert_file_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_file_wine_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_w32 -+ -+ -+# func_convert_file_msys_to_cygwin ARG -+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_file_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_msys_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_cygwin -+ -+ -+# func_convert_file_nix_to_cygwin ARG -+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -+# in func_to_host_file_result. -+func_convert_file_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. -+ func_convert_core_file_wine_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_cygwin -+ -+ -+############################################# -+# $build to $host PATH CONVERSION FUNCTIONS # -+############################################# -+# invoked via `$to_host_path_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# The result will be available in $func_to_host_path_result. -+# -+# Path separators are also converted from $build format to $host format. If -+# ARG begins or ends with a path separator character, it is preserved (but -+# converted to $host format) on output. -+# -+# All path conversion functions are named using the following convention: -+# file name conversion function : func_convert_file_X_to_Y () -+# path conversion function : func_convert_path_X_to_Y () -+# where, for any given $build/$host combination the 'X_to_Y' value is the -+# same. If conversion functions are added for new $build/$host combinations, -+# the two new functions must follow this pattern, or func_init_to_host_path_cmd -+# will break. -+ -+ -+# func_init_to_host_path_cmd -+# Ensures that function "pointer" variable $to_host_path_cmd is set to the -+# appropriate value, based on the value of $to_host_file_cmd. -+to_host_path_cmd= -+func_init_to_host_path_cmd () -+{ -+ $opt_debug -+ if test -z "$to_host_path_cmd"; then -+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" -+ to_host_path_cmd="func_convert_path_${func_stripname_result}" -+ fi -+} -+ -+ -+# func_to_host_path ARG -+# Converts the path ARG from $build format to $host format. Return result -+# in func_to_host_path_result. -+func_to_host_path () -+{ -+ $opt_debug -+ func_init_to_host_path_cmd -+ $to_host_path_cmd "$1" -+} -+# end func_to_host_path -+ -+ -+# func_convert_path_noop ARG -+# Copy ARG to func_to_host_path_result. -+func_convert_path_noop () -+{ -+ func_to_host_path_result="$1" -+} -+# end func_convert_path_noop -+ -+ -+# func_convert_path_msys_to_w32 ARG -+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_path_result. -+func_convert_path_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from ARG. MSYS -+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; -+ # and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_msys_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_msys_to_w32 -+ -+ -+# func_convert_path_cygwin_to_w32 ARG -+# Convert path ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_path_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_cygwin_to_w32 -+ -+ -+# func_convert_path_nix_to_w32 ARG -+# Convert path ARG from *nix to w32 format. Requires a wine environment and -+# a working winepath. Returns result in func_to_host_file_result. -+func_convert_path_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_nix_to_w32 -+ -+ -+# func_convert_path_msys_to_cygwin ARG -+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_path_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_msys_to_cygwin -+ -+ -+# func_convert_path_nix_to_cygwin ARG -+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -+# func_to_host_file_result. -+func_convert_path_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from -+ # ARG. msys behavior is inconsistent here, cygpath turns them -+ # into '.;' and ';.', and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_nix_to_cygwin -+ -+ - # func_mode_compile arg... - func_mode_compile () - { -@@ -1314,12 +1985,12 @@ func_mode_compile () - ;; - - -pie | -fpie | -fPIE) -- pie_flag="$pie_flag $arg" -+ func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) -- later="$later $arg" -+ func_append later " $arg" - continue - ;; - -@@ -1340,15 +2011,14 @@ func_mode_compile () - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" -- func_quote_for_eval "$arg" -- lastarg="$lastarg $func_quote_for_eval_result" -+ func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. -- base_compile="$base_compile $lastarg" -+ func_append base_compile " $lastarg" - continue - ;; - -@@ -1364,8 +2034,7 @@ func_mode_compile () - esac # case $arg_mode - - # Aesthetically quote the previous argument. -- func_quote_for_eval "$lastarg" -- base_compile="$base_compile $func_quote_for_eval_result" -+ func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in -@@ -1496,17 +2165,16 @@ compiler." - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi -- removelist="$removelist $output_obj" -+ func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist -- removelist="$removelist $lockfile" -+ func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - -- if test -n "$fix_srcfile_path"; then -- eval "srcfile=\"$fix_srcfile_path\"" -- fi -+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 -+ srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - -@@ -1526,7 +2194,7 @@ compiler." - - if test -z "$output_obj"; then - # Place PIC objects in $objdir -- command="$command -o $lobj" -+ func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ -@@ -1573,11 +2241,11 @@ compiler." - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then -- command="$command -o $obj" -+ func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. -- command="$command$suppress_output" -+ func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - -@@ -1622,13 +2290,13 @@ compiler." - } - - $opt_help || { -- test "$mode" = compile && func_mode_compile ${1+"$@"} -+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} - } - - func_mode_help () - { - # We need to display help for each of the modes. -- case $mode in -+ case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. -@@ -1659,8 +2327,8 @@ This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes -- -prefer-pic try to building PIC objects only -- -prefer-non-pic try to building non-PIC objects only -+ -prefer-pic try to build PIC objects only -+ -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler -@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted using RM." - ;; - - *) -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - -@@ -1819,13 +2487,13 @@ if $opt_help; then - else - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done -@@ -1854,13 +2522,16 @@ func_mode_execute () - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. -- for file in $execute_dlfiles; do -+ for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" -@@ -1882,7 +2553,7 @@ func_mode_execute () - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then -- dir="$dir/$objdir" -+ func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" -@@ -1907,10 +2578,10 @@ func_mode_execute () - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. -- if eval test -z \"\$$shlibpath_var\"; then -- eval $shlibpath_var=\$dir -+ if eval "test -z \"\$$shlibpath_var\""; then -+ eval "$shlibpath_var=\"\$dir\"" - else -- eval $shlibpath_var=\$dir:\$$shlibpath_var -+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - -@@ -1939,8 +2610,7 @@ func_mode_execute () - ;; - esac - # Quote arguments (to preserve shell metacharacters). -- func_quote_for_eval "$file" -- args="$args $func_quote_for_eval_result" -+ func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then -@@ -1972,22 +2642,59 @@ func_mode_execute () - fi - } - --test "$mode" = execute && func_mode_execute ${1+"$@"} -+test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - - # func_mode_finish arg... - func_mode_finish () - { - $opt_debug -- libdirs="$nonopt" -+ libs= -+ libdirs= - admincmds= - -- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -- for dir -- do -- libdirs="$libdirs $dir" -- done -+ for opt in "$nonopt" ${1+"$@"} -+ do -+ if test -d "$opt"; then -+ func_append libdirs " $opt" - -+ elif test -f "$opt"; then -+ if func_lalib_unsafe_p "$opt"; then -+ func_append libs " $opt" -+ else -+ func_warning "\`$opt' is not a valid libtool archive" -+ fi -+ -+ else -+ func_fatal_error "invalid argument \`$opt'" -+ fi -+ done -+ -+ if test -n "$libs"; then -+ if test -n "$lt_sysroot"; then -+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` -+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" -+ else -+ sysroot_cmd= -+ fi -+ -+ # Remove sysroot references -+ if $opt_dry_run; then -+ for lib in $libs; do -+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" -+ done -+ else -+ tmpdir=`func_mktempdir` -+ for lib in $libs; do -+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ -+ > $tmpdir/tmp-la -+ mv -f $tmpdir/tmp-la $lib -+ done -+ ${RM}r "$tmpdir" -+ fi -+ fi -+ -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. -@@ -1997,7 +2704,7 @@ func_mode_finish () - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" -- $opt_dry_run || eval "$cmds" || admincmds="$admincmds -+ $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done -@@ -2006,53 +2713,55 @@ func_mode_finish () - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - -- echo "----------------------------------------------------------------------" -- echo "Libraries have been installed in:" -- for libdir in $libdirs; do -- $ECHO " $libdir" -- done -- echo -- echo "If you ever happen to want to link against installed libraries" -- echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -- echo "flag during linking and do at least one of the following:" -- if test -n "$shlibpath_var"; then -- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -- echo " during execution" -- fi -- if test -n "$runpath_var"; then -- echo " - add LIBDIR to the \`$runpath_var' environment variable" -- echo " during linking" -- fi -- if test -n "$hardcode_libdir_flag_spec"; then -- libdir=LIBDIR -- eval "flag=\"$hardcode_libdir_flag_spec\"" -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -+ echo "----------------------------------------------------------------------" -+ echo "Libraries have been installed in:" -+ for libdir in $libdirs; do -+ $ECHO " $libdir" -+ done -+ echo -+ echo "If you ever happen to want to link against installed libraries" -+ echo "in a given directory, LIBDIR, you must either use libtool, and" -+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -+ echo "flag during linking and do at least one of the following:" -+ if test -n "$shlibpath_var"; then -+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -+ echo " during execution" -+ fi -+ if test -n "$runpath_var"; then -+ echo " - add LIBDIR to the \`$runpath_var' environment variable" -+ echo " during linking" -+ fi -+ if test -n "$hardcode_libdir_flag_spec"; then -+ libdir=LIBDIR -+ eval flag=\"$hardcode_libdir_flag_spec\" - -- $ECHO " - use the \`$flag' linker flag" -- fi -- if test -n "$admincmds"; then -- $ECHO " - have your system administrator run these commands:$admincmds" -- fi -- if test -f /etc/ld.so.conf; then -- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -- fi -- echo -+ $ECHO " - use the \`$flag' linker flag" -+ fi -+ if test -n "$admincmds"; then -+ $ECHO " - have your system administrator run these commands:$admincmds" -+ fi -+ if test -f /etc/ld.so.conf; then -+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -+ fi -+ echo - -- echo "See any operating system documentation about shared libraries for" -- case $host in -- solaris2.[6789]|solaris2.1[0-9]) -- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -- echo "pages." -- ;; -- *) -- echo "more information, such as the ld(1) and ld.so(8) manual pages." -- ;; -- esac -- echo "----------------------------------------------------------------------" -+ echo "See any operating system documentation about shared libraries for" -+ case $host in -+ solaris2.[6789]|solaris2.1[0-9]) -+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -+ echo "pages." -+ ;; -+ *) -+ echo "more information, such as the ld(1) and ld.so(8) manual pages." -+ ;; -+ esac -+ echo "----------------------------------------------------------------------" -+ fi - exit $EXIT_SUCCESS - } - --test "$mode" = finish && func_mode_finish ${1+"$@"} -+test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - - # func_mode_install arg... -@@ -2077,7 +2786,7 @@ func_mode_install () - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" -- install_prog="$install_prog$func_quote_for_eval_result" -+ func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; -@@ -2097,7 +2806,7 @@ func_mode_install () - do - arg2= - if test -n "$dest"; then -- files="$files $dest" -+ func_append files " $dest" - dest=$arg - continue - fi -@@ -2135,11 +2844,11 @@ func_mode_install () - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" -- install_prog="$install_prog $func_quote_for_eval_result" -+ func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi -- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" -+ func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ -@@ -2151,7 +2860,7 @@ func_mode_install () - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" -- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" -+ func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - -@@ -2209,10 +2918,13 @@ func_mode_install () - case $file in - *.$libext) - # Do the static libraries later. -- staticlibs="$staticlibs $file" -+ func_append staticlibs " $file" - ;; - - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" -@@ -2226,23 +2938,30 @@ func_mode_install () - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; -- *) current_libdirs="$current_libdirs $libdir" ;; -+ *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; -- *) future_libdirs="$future_libdirs $libdir" ;; -+ *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" -- dir="$dir$objdir" -+ func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that -@@ -2315,7 +3034,7 @@ func_mode_install () - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. -- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" -+ test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) -@@ -2503,7 +3222,7 @@ func_mode_install () - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - -- if test -n "$current_libdirs" && $opt_finish; then -+ if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' -@@ -2512,7 +3231,7 @@ func_mode_install () - fi - } - --test "$mode" = install && func_mode_install ${1+"$@"} -+test "$opt_mode" = install && func_mode_install ${1+"$@"} - - - # func_generate_dlsyms outputname originator pic_p -@@ -2559,6 +3278,18 @@ extern \"C\" { - #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" - #endif - -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - /* External symbol declarations for the compiler. */\ - " - -@@ -2570,21 +3301,22 @@ extern \"C\" { - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do -- func_verbose "extracting global C symbols from \`$progfile'" -- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" -+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 -+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" -+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { -- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { -- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } - fi - -@@ -2593,23 +3325,23 @@ extern \"C\" { - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols -- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" -+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$export_symbols" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { -- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" -- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$nlist" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } -@@ -2620,10 +3352,52 @@ extern \"C\" { - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" -- $opt_dry_run || { -- $ECHO ": $name " >> "$nlist" -- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" -- } -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ # if an import library, we need to obtain dlname -+ if func_win32_import_lib_p "$dlprefile"; then -+ func_tr_sh "$dlprefile" -+ eval "curr_lafile=\$libfile_$func_tr_sh_result" -+ dlprefile_dlbasename="" -+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then -+ # Use subshell, to avoid clobbering current variable values -+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` -+ if test -n "$dlprefile_dlname" ; then -+ func_basename "$dlprefile_dlname" -+ dlprefile_dlbasename="$func_basename_result" -+ else -+ # no lafile. user explicitly requested -dlpreopen . -+ $sharedlib_from_linklib_cmd "$dlprefile" -+ dlprefile_dlbasename=$sharedlib_from_linklib_result -+ fi -+ fi -+ $opt_dry_run || { -+ if test -n "$dlprefile_dlbasename" ; then -+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' -+ else -+ func_warning "Could not compute DLL name from $name" -+ eval '$ECHO ": $name " >> "$nlist"' -+ fi -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | -+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" -+ } -+ else # not an import lib -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ fi -+ ;; -+ *) -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ ;; -+ esac - done - - $opt_dry_run || { -@@ -2661,26 +3435,9 @@ typedef struct { - const char *name; - void *address; - } lt_dlsymlist; --" -- case $host in -- *cygwin* | *mingw* | *cegcc* ) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* DATA imports from DLLs on WIN32 con't be const, because -- runtime relocations are performed -- see ld's documentation -- on pseudo-relocs. */" -- lt_dlsym_const= ;; -- *osf5*) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* This system does not cope well with relocations in const data */" -- lt_dlsym_const= ;; -- *) -- lt_dlsym_const=const ;; -- esac -- -- echo >> "$output_objdir/$my_dlsyms" "\ --extern $lt_dlsym_const lt_dlsymlist -+extern LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[]; --$lt_dlsym_const lt_dlsymlist -+LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[] = - {\ - { \"$my_originator\", (void *) 0 }," -@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() { - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; -- *) symtab_cflags="$symtab_cflags $arg" ;; -+ *) func_append symtab_cflags " $arg" ;; - esac - done - -@@ -2796,9 +3553,11 @@ func_win32_libid () - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static -- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | -- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -- win32_nmres=`$NM -f posix -A "$1" | -+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. -+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ -@@ -2827,6 +3586,131 @@ func_win32_libid () - $ECHO "$win32_libid_type" - } - -+# func_cygming_dll_for_implib ARG -+# -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib () -+{ -+ $opt_debug -+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -+} -+ -+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -+# -+# The is the core of a fallback implementation of a -+# platform-specific function to extract the name of the -+# DLL associated with the specified import library LIBNAME. -+# -+# SECTION_NAME is either .idata$6 or .idata$7, depending -+# on the platform and compiler that created the implib. -+# -+# Echos the name of the DLL associated with the -+# specified import library. -+func_cygming_dll_for_implib_fallback_core () -+{ -+ $opt_debug -+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` -+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | -+ $SED '/^Contents of section '"$match_literal"':/{ -+ # Place marker at beginning of archive member dllname section -+ s/.*/====MARK====/ -+ p -+ d -+ } -+ # These lines can sometimes be longer than 43 characters, but -+ # are always uninteresting -+ /:[ ]*file format pe[i]\{,1\}-/d -+ /^In archive [^:]*:/d -+ # Ensure marker is printed -+ /^====MARK====/p -+ # Remove all lines with less than 43 characters -+ /^.\{43\}/!d -+ # From remaining lines, remove first 43 characters -+ s/^.\{43\}//' | -+ $SED -n ' -+ # Join marker and all lines until next marker into a single line -+ /^====MARK====/ b para -+ H -+ $ b para -+ b -+ :para -+ x -+ s/\n//g -+ # Remove the marker -+ s/^====MARK====// -+ # Remove trailing dots and whitespace -+ s/[\. \t]*$// -+ # Print -+ /./p' | -+ # we now have a list, one entry per line, of the stringified -+ # contents of the appropriate section of all members of the -+ # archive which possess that section. Heuristic: eliminate -+ # all those which have a first or second character that is -+ # a '.' (that is, objdump's representation of an unprintable -+ # character.) This should work for all archives with less than -+ # 0x302f exports -- but will fail for DLLs whose name actually -+ # begins with a literal '.' or a single character followed by -+ # a '.'. -+ # -+ # Of those that remain, print the first one. -+ $SED -e '/^\./d;/^.\./d;q' -+} -+ -+# func_cygming_gnu_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is a GNU/binutils-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_gnu_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ 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)$'` -+ test -n "$func_cygming_gnu_implib_tmp" -+} -+ -+# func_cygming_ms_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is an MS-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_ms_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` -+ test -n "$func_cygming_ms_implib_tmp" -+} -+ -+# func_cygming_dll_for_implib_fallback ARG -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# -+# This fallback implementation is for use when $DLLTOOL -+# does not support the --identify-strict option. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib_fallback () -+{ -+ $opt_debug -+ if func_cygming_gnu_implib_p "$1" ; then -+ # binutils import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` -+ elif func_cygming_ms_implib_p "$1" ; then -+ # ms-generated import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` -+ else -+ # unknown -+ sharedlib_from_linklib_result="" -+ fi -+} - - - # func_extract_an_archive dir oldlib -@@ -2917,7 +3801,7 @@ func_extract_archives () - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do -- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ -@@ -2932,7 +3816,7 @@ func_extract_archives () - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac -- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -@@ -3014,7 +3898,110 @@ func_fallback_echo () - _LTECHO_EOF' - } - ECHO=\"$qECHO\" -- fi\ -+ fi -+ -+# Very basic option parsing. These options are (a) specific to -+# the libtool wrapper, (b) are identical between the wrapper -+# /script/ and the wrapper /executable/ which is used only on -+# windows platforms, and (c) all begin with the string "--lt-" -+# (application programs are unlikely to have options which match -+# this pattern). -+# -+# There are only two supported options: --lt-debug and -+# --lt-dump-script. There is, deliberately, no --lt-help. -+# -+# The first argument to this parsing function should be the -+# script's $0 value, followed by "$@". -+lt_option_debug= -+func_parse_lt_options () -+{ -+ lt_script_arg0=\$0 -+ shift -+ for lt_opt -+ do -+ case \"\$lt_opt\" in -+ --lt-debug) lt_option_debug=1 ;; -+ --lt-dump-script) -+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` -+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. -+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` -+ cat \"\$lt_dump_D/\$lt_dump_F\" -+ exit 0 -+ ;; -+ --lt-*) -+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 -+ exit 1 -+ ;; -+ esac -+ done -+ -+ # Print the debug banner immediately: -+ if test -n \"\$lt_option_debug\"; then -+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 -+ fi -+} -+ -+# Used when --lt-debug. Prints its arguments to stdout -+# (redirection is the responsibility of the caller) -+func_lt_dump_args () -+{ -+ lt_dump_args_N=1; -+ for lt_arg -+ do -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" -+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` -+ done -+} -+ -+# Core function for launching the target application -+func_exec_program_core () -+{ -+" -+ case $host in -+ # Backslashes separate directories on plain windows -+ *-*-mingw | *-*-os2* | *-cegcc*) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -+" -+ ;; -+ -+ *) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} -+" -+ ;; -+ esac -+ $ECHO "\ -+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -+ exit 1 -+} -+ -+# A function to encapsulate launching the target application -+# Strips options in the --lt-* namespace from \$@ and -+# launches target application with the remaining arguments. -+func_exec_program () -+{ -+ for lt_wr_arg -+ do -+ case \$lt_wr_arg in -+ --lt-*) ;; -+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; -+ esac -+ shift -+ done -+ func_exec_program_core \${1+\"\$@\"} -+} -+ -+ # Parse options -+ func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` -@@ -3078,7 +4065,7 @@ _LTECHO_EOF' - - # relink executable if necessary - if test -n \"\$relink_command\"; then -- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : -+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" -@@ -3102,6 +4089,18 @@ _LTECHO_EOF' - - if test -f \"\$progdir/\$program\"; then" - -+ # fixup the dll searchpath if we need to. -+ # -+ # Fix the DLL searchpath if we need to. Do this before prepending -+ # to shlibpath, because on Windows, both are PATH and uninstalled -+ # libraries must come first. -+ if test -n "$dllsearchpath"; then -+ $ECHO "\ -+ # Add the dll search path components to the executable PATH -+ PATH=$dllsearchpath:\$PATH -+" -+ fi -+ - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ -@@ -3116,35 +4115,10 @@ _LTECHO_EOF' - " - fi - -- # fixup the dll searchpath if we need to. -- if test -n "$dllsearchpath"; then -- $ECHO "\ -- # Add the dll search path components to the executable PATH -- PATH=$dllsearchpath:\$PATH --" -- fi -- - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. --" -- case $host in -- # Backslashes separate directories on plain windows -- *-*-mingw | *-*-os2* | *-cegcc*) -- $ECHO "\ -- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} --" -- ;; -- -- *) -- $ECHO "\ -- exec \"\$progdir/\$program\" \${1+\"\$@\"} --" -- ;; -- esac -- $ECHO "\ -- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -- exit 1 -+ func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. -@@ -3158,166 +4132,6 @@ fi\ - } - - --# func_to_host_path arg --# --# Convert paths to host format when used with build tools. --# Intended for use with "native" mingw (where libtool itself --# is running under the msys shell), or in the following cross- --# build environments: --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# where wine is equipped with the `winepath' executable. --# In the native mingw case, the (msys) shell automatically --# converts paths for any non-msys applications it launches, --# but that facility isn't available from inside the cwrapper. --# Similar accommodations are necessary for $host mingw and --# $build cygwin. Calling this function does no harm for other --# $host/$build combinations not listed above. --# --# ARG is the path (on $build) that should be converted to --# the proper representation for $host. The result is stored --# in $func_to_host_path_result. --func_to_host_path () --{ -- func_to_host_path_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- case $build in -- *mingw* ) # actually, msys -- # awkward: cmd appends spaces to result -- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_path_result=`cygpath -w "$1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # Unfortunately, winepath does not exit with a non-zero -- # error code, so we are forced to check the contents of -- # stdout. On the other hand, if the command is not -- # found, the shell will set an exit code of 127 and print -- # *an error message* to stdout. So we must check for both -- # error code of zero AND non-empty stdout, which explains -- # the odd construction: -- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` -- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then -- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- else -- # Allow warning below. -- func_to_host_path_result= -- fi -- ;; -- esac -- if test -z "$func_to_host_path_result" ; then -- func_error "Could not determine host path corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback: -- func_to_host_path_result="$1" -- fi -- ;; -- esac -- fi --} --# end: func_to_host_path -- --# func_to_host_pathlist arg --# --# Convert pathlists to host format when used with build tools. --# See func_to_host_path(), above. This function supports the --# following $build/$host combinations (but does no harm for --# combinations not listed here): --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# --# Path separators are also converted from $build format to --# $host format. If ARG begins or ends with a path separator --# character, it is preserved (but converted to $host format) --# on output. --# --# ARG is a pathlist (on $build) that should be converted to --# the proper representation on $host. The result is stored --# in $func_to_host_pathlist_result. --func_to_host_pathlist () --{ -- func_to_host_pathlist_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- # Remove leading and trailing path separator characters from -- # ARG. msys behavior is inconsistent here, cygpath turns them -- # into '.;' and ';.', and winepath ignores them completely. -- func_stripname : : "$1" -- func_to_host_pathlist_tmp1=$func_stripname_result -- case $build in -- *mingw* ) # Actually, msys. -- # Awkward: cmd appends spaces to result. -- func_to_host_pathlist_result=` -- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # unfortunately, winepath doesn't convert pathlists -- func_to_host_pathlist_result="" -- func_to_host_pathlist_oldIFS=$IFS -- IFS=: -- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do -- IFS=$func_to_host_pathlist_oldIFS -- if test -n "$func_to_host_pathlist_f" ; then -- func_to_host_path "$func_to_host_pathlist_f" -- if test -n "$func_to_host_path_result" ; then -- if test -z "$func_to_host_pathlist_result" ; then -- func_to_host_pathlist_result="$func_to_host_path_result" -- else -- func_append func_to_host_pathlist_result ";$func_to_host_path_result" -- fi -- fi -- fi -- done -- IFS=$func_to_host_pathlist_oldIFS -- ;; -- esac -- if test -z "$func_to_host_pathlist_result"; then -- func_error "Could not determine the host path(s) corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback. This may break if $1 contains DOS-style drive -- # specifications. The fix is not to complicate the expression -- # below, but for the user to provide a working wine installation -- # with winepath so that path translation in the cross-to-mingw -- # case works properly. -- lt_replace_pathsep_nix_to_dos="s|:|;|g" -- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ -- $SED -e "$lt_replace_pathsep_nix_to_dos"` -- fi -- # Now, add the leading and trailing path separators back -- case "$1" in -- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" -- ;; -- esac -- case "$1" in -- *: ) func_append func_to_host_pathlist_result ";" -- ;; -- esac -- ;; -- esac -- fi --} --# end: func_to_host_pathlist -- - # func_emit_cwrapperexe_src - # emit the source code for a wrapper executable on stdout - # Must ONLY be called from within func_mode_link because -@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () - - This wrapper executable should never be moved out of the build directory. - If it is, it will not operate correctly. -- -- Currently, it simply execs the wrapper *script* "$SHELL $output", -- but could eventually absorb all of the scripts functionality and -- exec $objdir/$outputname directly. - */ - EOF - cat <<"EOF" -@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, int); - if (stale) { free ((void *) stale); stale = 0; } \ - } while (0) - --#undef LTWRAPPER_DEBUGPRINTF --#if defined LT_DEBUGWRAPPER --# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args --static void --ltwrapper_debugprintf (const char *fmt, ...) --{ -- va_list args; -- va_start (args, fmt); -- (void) vfprintf (stderr, fmt, args); -- va_end (args); --} -+#if defined(LT_DEBUGWRAPPER) -+static int lt_debug = 1; - #else --# define LTWRAPPER_DEBUGPRINTF(args) -+static int lt_debug = 0; - #endif - --const char *program_name = NULL; -+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - - void *xmalloc (size_t num); - char *xstrdup (const char *string); -@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathspec); - int make_executable (const char *path); - int check_executable (const char *path); - char *strendzap (char *str, const char *pat); --void lt_fatal (const char *message, ...); -+void lt_debugprintf (const char *file, int line, const char *fmt, ...); -+void lt_fatal (const char *file, int line, const char *message, ...); -+static const char *nonnull (const char *s); -+static const char *nonempty (const char *s); - void lt_setenv (const char *name, const char *value); - char *lt_extend_str (const char *orig_value, const char *add, int to_end); - void lt_update_exe_path (const char *name, const char *value); -@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); - EOF - - cat <"))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", -+ nonnull (lt_argv_zero)); - for (i = 0; i < newargc; i++) - { -- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", -+ i, nonnull (newargz[i])); - } - - EOF -@@ -3706,7 +4529,9 @@ EOF - if (rval == -1) - { - /* failed to start process */ -- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(main) failed to launch target \"%s\": %s\n", -+ lt_argv_zero, nonnull (strerror (errno))); - return 127; - } - return rval; -@@ -3728,7 +4553,7 @@ xmalloc (size_t num) - { - void *p = (void *) malloc (num); - if (!p) -- lt_fatal ("Memory exhausted"); -+ lt_fatal (__FILE__, __LINE__, "memory exhausted"); - - return p; - } -@@ -3762,8 +4587,8 @@ check_executable (const char *path) - { - struct stat st; - -- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; - -@@ -3780,8 +4605,8 @@ make_executable (const char *path) - int rval = 0; - struct stat st; - -- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; - -@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) - int tmp_len; - char *concat_name; - -- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", -- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", -+ nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; -@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); -@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); -@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { -- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", -- tmp_pathspec)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "checking path component for symlinks: %s\n", -+ tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) -@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) - } - else - { -- char *errstr = strerror (errno); -- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); -+ lt_fatal (__FILE__, __LINE__, -+ "error accessing file \"%s\": %s", -+ tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); -@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { -- lt_fatal ("Could not follow symlinks for %s", pathspec); -+ lt_fatal (__FILE__, __LINE__, -+ "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); - #endif -@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) - return str; - } - -+void -+lt_debugprintf (const char *file, int line, const char *fmt, ...) -+{ -+ va_list args; -+ if (lt_debug) -+ { -+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); -+ va_start (args, fmt); -+ (void) vfprintf (stderr, fmt, args); -+ va_end (args); -+ } -+} -+ - static void --lt_error_core (int exit_status, const char *mode, -+lt_error_core (int exit_status, const char *file, -+ int line, const char *mode, - const char *message, va_list ap) - { -- fprintf (stderr, "%s: %s: ", program_name, mode); -+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - -@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const char *mode, - } - - void --lt_fatal (const char *message, ...) -+lt_fatal (const char *file, int line, const char *message, ...) - { - va_list ap; - va_start (ap, message); -- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); -+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); - } - -+static const char * -+nonnull (const char *s) -+{ -+ return s ? s : "(null)"; -+} -+ -+static const char * -+nonempty (const char *s) -+{ -+ return (s && !*s) ? "(empty)" : nonnull (s); -+} -+ - void - lt_setenv (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_setenv) setting '%s' to '%s'\n", -+ nonnull (name), nonnull (value)); - { - #ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ -@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) - void - lt_update_exe_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { -@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, const char *value) - void - lt_update_lib_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { -@@ -4222,7 +5078,7 @@ EOF - func_win32_import_lib_p () - { - $opt_debug -- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in -+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -@@ -4401,9 +5257,9 @@ func_mode_link () - ;; - *) - if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $arg" - else -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $arg" - fi - prev= - continue -@@ -4427,7 +5283,7 @@ func_mode_link () - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; -- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later -+ *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; -@@ -4446,7 +5302,7 @@ func_mode_link () - moreargs= - for fil in `cat "$save_arg"` - do --# moreargs="$moreargs $fil" -+# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - -@@ -4475,7 +5331,7 @@ func_mode_link () - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -4487,7 +5343,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= - fi - -@@ -4557,12 +5413,12 @@ func_mode_link () - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; -- *) rpath="$rpath $arg" ;; -+ *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; -- *) xrpath="$xrpath $arg" ;; -+ *) func_append xrpath " $arg" ;; - esac - fi - prev= -@@ -4574,28 +5430,28 @@ func_mode_link () - continue - ;; - weak) -- weak_libs="$weak_libs $arg" -+ func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) -- compiler_flags="$compiler_flags $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $wl$qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" -@@ -4686,15 +5542,16 @@ func_mode_link () - ;; - - -L*) -- func_stripname '-L' '' "$arg" -- dir=$func_stripname_result -- if test -z "$dir"; then -+ func_stripname "-L" '' "$arg" -+ if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -@@ -4706,10 +5563,16 @@ func_mode_link () - ;; - esac - case "$deplibs " in -- *" -L$dir "*) ;; -+ *" -L$dir "* | *" $arg "*) -+ # Will only happen for absolute or sysroot arguments -+ ;; - *) -- deplibs="$deplibs -L$dir" -- lib_search_path="$lib_search_path $dir" -+ # Preserve sysroot, but never include relative directories -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; -+ *) func_append deplibs " -L$dir" ;; -+ esac -+ func_append lib_search_path " $dir" - ;; - esac - case $host in -@@ -4718,12 +5581,12 @@ func_mode_link () - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; -- *) dllsearchpath="$dllsearchpath:$dir";; -+ *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -4747,7 +5610,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) -@@ -4758,9 +5621,6 @@ func_mode_link () - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; -- *-*-linux*) -- test "X$arg" = "X-lc" && continue -- ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in -@@ -4770,7 +5630,7 @@ func_mode_link () - ;; - esac - fi -- deplibs="$deplibs $arg" -+ func_append deplibs " $arg" - continue - ;; - -@@ -4782,8 +5642,8 @@ func_mode_link () - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. -- -model|-arch|-isysroot) -- compiler_flags="$compiler_flags $arg" -+ -model|-arch|-isysroot|--sysroot) -+ func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler -@@ -4791,12 +5651,12 @@ func_mode_link () - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -- compiler_flags="$compiler_flags $arg" -+ func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; -+ * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; -@@ -4863,13 +5723,17 @@ func_mode_link () - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -+ =*) -+ func_stripname '=' '' "$dir" -+ dir=$lt_sysroot$func_stripname_result -+ ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; - esac - continue - ;; -@@ -4922,8 +5786,8 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $func_quote_for_eval_result" -- compiler_flags="$compiler_flags $func_quote_for_eval_result" -+ func_append arg " $func_quote_for_eval_result" -+ func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4938,9 +5802,9 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $wl$func_quote_for_eval_result" -- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" -- linker_flags="$linker_flags $func_quote_for_eval_result" -+ func_append arg " $wl$func_quote_for_eval_result" -+ func_append compiler_flags " $wl$func_quote_for_eval_result" -+ func_append linker_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4968,24 +5832,27 @@ func_mode_link () - arg="$func_quote_for_eval_result" - ;; - -- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -- # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -- # +DA*, +DD* enable 64-bit mode on the HP compiler -- # -q* pass through compiler args for the IBM compiler -- # -m*, -t[45]*, -txscale* pass through architecture-specific -- # compiler args for GCC -- # -F/path gives path to uninstalled frameworks, gcc on darwin -- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC -- # @file GCC response files -- # -tp=* Portland pgcc target processor selection -+ # Flags to be passed through unchanged, with rationale: -+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler -+ # -r[0-9][0-9]* specify processor for the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler -+ # +DA*, +DD* enable 64-bit mode for the HP compiler -+ # -q* compiler args for the IBM compiler -+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC -+ # -F/path path to uninstalled frameworks, gcc on darwin -+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC -+ # @file GCC response files -+ # -tp=* Portland pgcc target processor selection -+ # --sysroot=* for sysroot support -+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" -- compiler_flags="$compiler_flags $arg" -+ func_append compiler_flags " $arg" - continue - ;; - -@@ -4997,7 +5864,7 @@ func_mode_link () - - *.$objext) - # A standard object. -- objs="$objs $arg" -+ func_append objs " $arg" - ;; - - *.lo) -@@ -5028,7 +5895,7 @@ func_mode_link () - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -5040,7 +5907,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= - fi - -@@ -5085,24 +5952,25 @@ func_mode_link () - - *.$libext) - # An archive. -- deplibs="$deplibs $arg" -- old_deplibs="$old_deplibs $arg" -+ func_append deplibs " $arg" -+ func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - -+ func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else -- deplibs="$deplibs $arg" -+ func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; -@@ -5127,7 +5995,7 @@ func_mode_link () - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -- eval "arg=\"$export_dynamic_flag_spec\"" -+ eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi -@@ -5144,11 +6012,13 @@ func_mode_link () - else - shlib_search_path= - fi -- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" -- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" -+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" -+ func_to_tool_file "$output_objdir/" -+ tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - -@@ -5169,12 +6039,12 @@ func_mode_link () - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- libs="$libs $deplib" -+ func_append libs " $deplib" - done - - if test "$linkmode" = lib; then -@@ -5187,9 +6057,9 @@ func_mode_link () - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in -- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; -+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac -- pre_post_deps="$pre_post_deps $pre_post_dep" -+ func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= -@@ -5256,8 +6126,9 @@ func_mode_link () - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= -+ func_resolve_sysroot "$lib" - case $lib in -- *.la) func_source "$lib" ;; -+ *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library -@@ -5267,7 +6138,7 @@ func_mode_link () - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; -- *) deplibs="$deplibs $deplib" ;; -+ *) func_append deplibs " $deplib" ;; - esac - done - done -@@ -5288,11 +6159,11 @@ func_mode_link () - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- compiler_flags="$compiler_flags $deplib" -+ func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi -@@ -5377,7 +6248,7 @@ func_mode_link () - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi -@@ -5390,7 +6261,8 @@ func_mode_link () - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then -@@ -5404,7 +6276,8 @@ func_mode_link () - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" -@@ -5415,17 +6288,21 @@ func_mode_link () - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" -- dir=$func_stripname_result -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; -- *.la) lib="$deplib" ;; -+ *.la) -+ func_resolve_sysroot "$deplib" -+ lib=$func_resolve_sysroot_result -+ ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" -@@ -5488,11 +6365,11 @@ func_mode_link () - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. -- newdlprefiles="$newdlprefiles $deplib" -+ func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- newdlfiles="$newdlfiles $deplib" -+ func_append newdlfiles " $deplib" - fi - fi - continue -@@ -5538,7 +6415,7 @@ func_mode_link () - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; -- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; -+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi -@@ -5546,8 +6423,8 @@ func_mode_link () - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then -- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" -- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" -+ test -n "$dlopen" && func_append dlfiles " $dlopen" -+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then -@@ -5558,20 +6435,20 @@ func_mode_link () - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. -- convenience="$convenience $ladir/$objdir/$old_library" -- old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ func_append convenience " $ladir/$objdir/$old_library" -+ func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv -@@ -5579,9 +6456,15 @@ func_mode_link () - - # Get the name of the library we link against. - linklib= -- for l in $old_library $library_names; do -- linklib="$l" -- done -+ if test -n "$old_library" && -+ { test "$prefer_static_libs" = yes || -+ test "$prefer_static_libs,$installed" = "built,no"; }; then -+ linklib=$old_library -+ else -+ for l in $old_library $library_names; do -+ linklib="$l" -+ done -+ fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi -@@ -5598,9 +6481,9 @@ func_mode_link () - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. -- dlprefiles="$dlprefiles $lib $dependency_libs" -+ func_append dlprefiles " $lib $dependency_libs" - else -- newdlfiles="$newdlfiles $lib" -+ func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen -@@ -5622,14 +6505,14 @@ func_mode_link () - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then -- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ dir="$lt_sysroot$libdir" -+ absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5637,12 +6520,12 @@ func_mode_link () - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" -@@ -5653,20 +6536,46 @@ func_mode_link () - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi -- # Prefer using a static library (so that no silly _DYNAMIC symbols -- # are required to link). -- if test -n "$old_library"; then -- newdlprefiles="$newdlprefiles $dir/$old_library" -- # Keep a list of preopened convenience libraries to check -- # that they are being used correctly in the link pass. -- test -z "$libdir" && \ -- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" -- # Otherwise, use the dlname, so that lt_dlopen finds it. -- elif test -n "$dlname"; then -- newdlprefiles="$newdlprefiles $dir/$dlname" -- else -- newdlprefiles="$newdlprefiles $dir/$linklib" -- fi -+ case "$host" in -+ # special handling for platforms with PE-DLLs. -+ *cygwin* | *mingw* | *cegcc* ) -+ # Linker will automatically link against shared library if both -+ # static and shared are present. Therefore, ensure we extract -+ # symbols from the import library if a shared library is present -+ # (otherwise, the dlopen module name will be incorrect). We do -+ # this by putting the import library name into $newdlprefiles. -+ # We recover the dlopen module name by 'saving' the la file -+ # name in a special purpose variable, and (later) extracting the -+ # dlname from the la file. -+ if test -n "$dlname"; then -+ func_tr_sh "$dir/$linklib" -+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" -+ func_append newdlprefiles " $dir/$linklib" -+ else -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ fi -+ ;; -+ * ) -+ # Prefer using a static library (so that no silly _DYNAMIC symbols -+ # are required to link). -+ if test -n "$old_library"; then -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ # Otherwise, use the dlname, so that lt_dlopen finds it. -+ elif test -n "$dlname"; then -+ func_append newdlprefiles " $dir/$dlname" -+ else -+ func_append newdlprefiles " $dir/$linklib" -+ fi -+ ;; -+ esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then -@@ -5684,7 +6593,7 @@ func_mode_link () - - - if test "$linkmode" = prog && test "$pass" != link; then -- newlib_search_path="$newlib_search_path $ladir" -+ func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no -@@ -5697,7 +6606,8 @@ func_mode_link () - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? -@@ -5708,12 +6618,12 @@ func_mode_link () - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... -@@ -5728,7 +6638,7 @@ func_mode_link () - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; -- *) temp_rpath="$temp_rpath$absdir:" ;; -+ *) func_append temp_rpath "$absdir:" ;; - esac - fi - -@@ -5740,7 +6650,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5749,7 +6659,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5774,12 +6684,12 @@ func_mode_link () - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; -@@ -5814,7 +6724,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5823,7 +6733,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5835,7 +6745,7 @@ func_mode_link () - shift - realname="$1" - shift -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" -@@ -5848,7 +6758,7 @@ func_mode_link () - versuffix="-$major" - ;; - esac -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -5877,7 +6787,7 @@ func_mode_link () - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - -- if test "$linkmode" = prog || test "$mode" != relink; then -+ if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= -@@ -5933,7 +6843,7 @@ func_mode_link () - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -5955,7 +6865,7 @@ func_mode_link () - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; -+ *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then -@@ -5969,13 +6879,13 @@ func_mode_link () - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - -- if test "$linkmode" = prog || test "$mode" = relink; then -+ if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= -@@ -5989,7 +6899,7 @@ func_mode_link () - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then -@@ -6001,12 +6911,12 @@ func_mode_link () - fi - else - # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" -+ add_dir="-L$lt_sysroot$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -6083,27 +6993,33 @@ func_mode_link () - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; -- *) xrpath="$xrpath $temp_xrpath";; -+ *) func_append xrpath " $temp_xrpath";; - esac;; -- *) temp_deplibs="$temp_deplibs $libdir";; -+ *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - -- newlib_search_path="$newlib_search_path $absdir" -+ func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" -- if $opt_duplicate_deps ; then -+ case $deplib in -+ -L*) func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result";; -+ *) func_resolve_sysroot "$deplib" ;; -+ esac -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $func_resolve_sysroot_result "*) -+ func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then -@@ -6113,8 +7029,10 @@ func_mode_link () - case $deplib in - -L*) path="$deplib" ;; - *.la) -+ func_resolve_sysroot "$deplib" -+ deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." -- dir="$func_dirname_result" -+ dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -@@ -6130,7 +7048,7 @@ func_mode_link () - case $host in - *-*-darwin*) - depdepl= -- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp -@@ -6141,8 +7059,8 @@ func_mode_link () - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi -- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" -+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi -@@ -6152,7 +7070,7 @@ func_mode_link () - ;; - esac - else -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ -@@ -6192,7 +7110,7 @@ func_mode_link () - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; -- *) lib_search_path="$lib_search_path $dir" ;; -+ *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= -@@ -6205,7 +7123,7 @@ func_mode_link () - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order -- eval tmp_libs=\$$var -+ eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so -@@ -6250,13 +7168,13 @@ func_mode_link () - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - done -- eval $var=\$tmp_libs -+ eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs -@@ -6269,7 +7187,7 @@ func_mode_link () - ;; - esac - if test -n "$i" ; then -- tmp_libs="$tmp_libs $i" -+ func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs -@@ -6310,7 +7228,7 @@ func_mode_link () - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" -- objs="$objs$old_deplibs" -+ func_append objs "$old_deplibs" - ;; - - lib) -@@ -6319,8 +7237,8 @@ func_mode_link () - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ -@@ -6330,8 +7248,8 @@ func_mode_link () - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result -@@ -6346,7 +7264,7 @@ func_mode_link () - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" -- libobjs="$libobjs $objs" -+ func_append libobjs " $objs" - fi - fi - -@@ -6544,7 +7462,7 @@ func_mode_link () - done - - # Make executables depend on our current version. -- verstring="$verstring:${current}.0" -+ func_append verstring ":${current}.0" - ;; - - qnx) -@@ -6612,10 +7530,10 @@ func_mode_link () - fi - - func_generate_dlsyms "$libname" "$libname" "yes" -- libobjs="$libobjs $symfileobj" -+ func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - -- if test "$mode" != relink; then -+ if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= -@@ -6631,7 +7549,7 @@ func_mode_link () - continue - fi - fi -- removelist="$removelist $p" -+ func_append removelist " $p" - ;; - *) ;; - esac -@@ -6642,7 +7560,7 @@ func_mode_link () - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then -- oldlibs="$oldlibs $output_objdir/$libname.$libext" -+ func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` -@@ -6659,10 +7577,11 @@ func_mode_link () - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do -- temp_xrpath="$temp_xrpath -R$libdir" -+ func_replace_sysroot "$libdir" -+ func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -@@ -6676,7 +7595,7 @@ func_mode_link () - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; -- *) dlfiles="$dlfiles $lib" ;; -+ *) func_append dlfiles " $lib" ;; - esac - done - -@@ -6686,7 +7605,7 @@ func_mode_link () - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; -- *) dlprefiles="$dlprefiles $lib" ;; -+ *) func_append dlprefiles " $lib" ;; - esac - done - -@@ -6698,7 +7617,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. -@@ -6715,7 +7634,7 @@ func_mode_link () - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then -- deplibs="$deplibs -lc" -+ func_append deplibs " -lc" - fi - ;; - esac -@@ -6764,18 +7683,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6789,7 +7708,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6807,18 +7726,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6840,7 +7759,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6857,15 +7776,27 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ if test -n "$file_magic_glob"; then -+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` -+ else -+ libnameglob=$libname -+ fi -+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -+ if test "$want_nocaseglob" = yes; then -+ shopt -s nocaseglob -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ $nocaseglob -+ else -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | -@@ -6885,10 +7816,10 @@ EOF - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done -- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | -+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6913,7 +7844,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -6929,20 +7860,20 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6967,7 +7898,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -7071,7 +8002,7 @@ EOF - *) - case " $deplibs " in - *" -L$path/$objdir "*) -- new_libs="$new_libs -L$path/$objdir" ;; -+ func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac -@@ -7081,10 +8012,10 @@ EOF - -L*) - case " $new_libs " in - *" $deplib "*) ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" -@@ -7101,10 +8032,12 @@ EOF - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -- test "$mode" != relink && rpath="$compile_rpath$rpath" -+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else -@@ -7113,18 +8046,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- dep_rpath="$dep_rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_apped perm_rpath " $libdir" ;; - esac - fi - done -@@ -7133,40 +8066,38 @@ EOF - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then -- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else -- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done -- eval $runpath_var=\$rpath\$$runpath_var -- export $runpath_var -+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" -- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then -- eval $shlibpath_var=\$shlibpath\$$shlibpath_var -- export $shlibpath_var -+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. -- eval "shared_ext=\"$shrext_cmds\"" -- eval "library_names=\"$library_names_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -7178,7 +8109,7 @@ EOF - linknames= - for link - do -- linknames="$linknames $link" -+ func_append linknames " $link" - done - - # Use standard objects if they are pic -@@ -7189,7 +8120,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" -- delfiles="$delfiles $export_symbols" -+ func_append delfiles " $export_symbols" - fi - - orig_export_symbols= -@@ -7220,13 +8151,45 @@ EOF - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -+ for cmd1 in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -- func_len " $cmd" -- len=$func_len_result -- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ # Take the normal branch if the nm_file_list_spec branch -+ # doesn't work or if tool conversion is not needed. -+ case $nm_file_list_spec~$to_tool_file_cmd in -+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) -+ try_normal_branch=yes -+ eval cmd=\"$cmd1\" -+ func_len " $cmd" -+ len=$func_len_result -+ ;; -+ *) -+ try_normal_branch=no -+ ;; -+ esac -+ if test "$try_normal_branch" = yes \ -+ && { test "$len" -lt "$max_cmd_len" \ -+ || test "$max_cmd_len" -le -1; } -+ then -+ func_show_eval "$cmd" 'exit $?' -+ skipped_export=false -+ elif test -n "$nm_file_list_spec"; then -+ func_basename "$output" -+ output_la=$func_basename_result -+ save_libobjs=$libobjs -+ save_output=$output -+ output=${output_objdir}/${output_la}.nm -+ func_to_tool_file "$output" -+ libobjs=$nm_file_list_spec$func_to_tool_file_result -+ func_append delfiles " $output" -+ func_verbose "creating $NM input file list: $output" -+ for obj in $save_libobjs; do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > "$output" -+ eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' -+ output=$save_output -+ libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. -@@ -7248,7 +8211,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then -@@ -7260,7 +8223,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7270,7 +8233,7 @@ EOF - case " $convenience " in - *" $test_deplib "*) ;; - *) -- tmp_deplibs="$tmp_deplibs $test_deplib" -+ func_append tmp_deplibs " $test_deplib" - ;; - esac - done -@@ -7286,43 +8249,43 @@ EOF - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $convenience -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then -- eval "flag=\"$thread_safe_flag_spec\"" -- linker_flags="$linker_flags $flag" -+ eval flag=\"$thread_safe_flag_spec\" -+ func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -- eval "test_cmds=\"$module_expsym_cmds\"" -+ eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else -- eval "test_cmds=\"$module_cmds\"" -+ eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval "test_cmds=\"$archive_expsym_cmds\"" -+ eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else -- eval "test_cmds=\"$archive_cmds\"" -+ eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi -@@ -7366,10 +8329,13 @@ EOF - echo 'INPUT (' > $output - for obj in $save_libobjs - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output -- delfiles="$delfiles $output" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" -@@ -7383,15 +8349,17 @@ EOF - fi - for obj - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done -- delfiles="$delfiles $output" -- output=$firstobj\"$file_list_spec$output\" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext -- eval "test_cmds=\"$reload_cmds\"" -+ eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -7411,12 +8379,12 @@ EOF - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist -- eval "concat_cmds=\"$reload_cmds\"" -+ eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 -@@ -7433,11 +8401,11 @@ EOF - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" -+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi -- delfiles="$delfiles $output" -+ func_append delfiles " $output" - - else - output= -@@ -7450,9 +8418,9 @@ EOF - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" -+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - -@@ -7471,7 +8439,7 @@ EOF - lt_exit=$? - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7492,7 +8460,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then -@@ -7504,7 +8472,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7515,7 +8483,7 @@ EOF - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the -@@ -7539,23 +8507,23 @@ EOF - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. -- eval "cmds=\"\$cmds~\$RM $delfiles\"" -+ eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" -@@ -7564,7 +8532,7 @@ EOF - lt_exit=$? - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7576,8 +8544,8 @@ EOF - IFS="$save_ifs" - - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then -@@ -7656,17 +8624,20 @@ EOF - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" -+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - -+ # If we're not building shared, we need to use non_pic_objs -+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" -+ - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - -@@ -7690,7 +8661,7 @@ EOF - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" -- # $opt_dry_run || echo timestamp > $libobj || exit $? -+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - -@@ -7740,8 +8711,8 @@ EOF - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) -- compile_command="$compile_command ${wl}-bind_at_load" -- finalize_command="$finalize_command ${wl}-bind_at_load" -+ func_append compile_command " ${wl}-bind_at_load" -+ func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi -@@ -7761,7 +8732,7 @@ EOF - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) -- new_libs="$new_libs -L$path/$objdir" ;; -+ func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac -@@ -7771,17 +8742,17 @@ EOF - -L*) - case " $new_libs " in - *" $deplib "*) ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - -- compile_command="$compile_command $compile_deplibs" -- finalize_command="$finalize_command $finalize_deplibs" -+ func_append compile_command " $compile_deplibs" -+ func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. -@@ -7789,7 +8760,7 @@ EOF - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - fi -@@ -7808,18 +8779,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in -@@ -7828,12 +8799,12 @@ EOF - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; -- *) dllsearchpath="$dllsearchpath:$libdir";; -+ *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -7842,7 +8813,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - -@@ -7859,18 +8830,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; -- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; -+ *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done -@@ -7878,7 +8849,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - -@@ -7921,6 +8892,12 @@ EOF - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' -@@ -7943,7 +8920,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7951,7 +8928,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7966,6 +8943,13 @@ EOF - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' -+ -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - exit $EXIT_SUCCESS - fi - -@@ -7999,6 +8983,12 @@ EOF - - func_show_eval "$link_command" 'exit $?' - -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output_objdir/$outputname" -+ 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'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - # Now create the wrapper script. - func_verbose "creating $output" - -@@ -8096,7 +9086,7 @@ EOF - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then -- oldobjs="$oldobjs $symfileobj" -+ func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" -@@ -8104,10 +9094,10 @@ EOF - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $addlibs -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. -@@ -8118,10 +9108,10 @@ EOF - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have -@@ -8139,7 +9129,7 @@ EOF - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= -@@ -8163,18 +9153,28 @@ EOF - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -- oldobjs="$oldobjs $gentop/$newobj" -+ func_append oldobjs " $gentop/$newobj" - ;; -- *) oldobjs="$oldobjs $obj" ;; -+ *) func_append oldobjs " $obj" ;; - esac - done - fi -- eval "cmds=\"$old_archive_cmds\"" -+ eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds -+ elif test -n "$archiver_list_spec"; then -+ func_verbose "using command file archive linking..." -+ for obj in $oldobjs -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > $output_objdir/$libname.libcmd -+ func_to_tool_file "$output_objdir/$libname.libcmd" -+ oldobjs=" $archiver_list_spec$func_to_tool_file_result" -+ cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." -@@ -8189,7 +9189,7 @@ EOF - do - last_oldobj=$obj - done -- eval "test_cmds=\"$old_archive_cmds\"" -+ eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -8208,7 +9208,7 @@ EOF - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi -@@ -8216,9 +9216,9 @@ EOF - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then -- eval "cmds=\"\$concat_cmds\"" -+ eval cmds=\"\$concat_cmds\" - else -- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi -@@ -8268,12 +9268,23 @@ EOF - *.la) - func_basename "$deplib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ func_resolve_sysroot "$deplib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" -- newdependency_libs="$newdependency_libs $libdir/$name" -+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ -L*) -+ func_stripname -L '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; -- *) newdependency_libs="$newdependency_libs $deplib" ;; -+ -R*) -+ func_stripname -R '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -R$func_replace_sysroot_result" -+ ;; -+ *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" -@@ -8284,12 +9295,14 @@ EOF - *.la) - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` -+ - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlfiles="$newdlfiles $libdir/$name" -+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; -- *) newdlfiles="$newdlfiles $lib" ;; -+ *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" -@@ -8303,10 +9316,11 @@ EOF - # the library: - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlprefiles="$newdlprefiles $libdir/$name" -+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done -@@ -8318,7 +9332,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlfiles="$newdlfiles $abs" -+ func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= -@@ -8327,7 +9341,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlprefiles="$newdlprefiles $abs" -+ func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi -@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" - exit $EXIT_SUCCESS - } - --{ test "$mode" = link || test "$mode" = relink; } && -+{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -@@ -8432,9 +9446,9 @@ func_mode_uninstall () - for arg - do - case $arg in -- -f) RM="$RM $arg"; rmforce=yes ;; -- -*) RM="$RM $arg" ;; -- *) files="$files $arg" ;; -+ -f) func_append RM " $arg"; rmforce=yes ;; -+ -*) func_append RM " $arg" ;; -+ *) func_append files " $arg" ;; - esac - done - -@@ -8443,24 +9457,23 @@ func_mode_uninstall () - - rmdirs= - -- origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then -- objdir="$origobjdir" -+ odir="$objdir" - else -- objdir="$dir/$origobjdir" -+ odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" -- test "$mode" = uninstall && objdir="$dir" -+ test "$opt_mode" = uninstall && odir="$dir" - -- # Remember objdir for removal later, being careful to avoid duplicates -- if test "$mode" = clean; then -+ # Remember odir for removal later, being careful to avoid duplicates -+ if test "$opt_mode" = clean; then - case " $rmdirs " in -- *" $objdir "*) ;; -- *) rmdirs="$rmdirs $objdir" ;; -+ *" $odir "*) ;; -+ *) func_append rmdirs " $odir" ;; - esac - fi - -@@ -8486,18 +9499,17 @@ func_mode_uninstall () - - # Delete the libtool libraries and symlinks. - for n in $library_names; do -- rmfiles="$rmfiles $objdir/$n" -+ func_append rmfiles " $odir/$n" - done -- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -+ test -n "$old_library" && func_append rmfiles " $odir/$old_library" - -- case "$mode" in -+ case "$opt_mode" in - clean) -- case " $library_names " in -- # " " in the beginning catches empty $dlname -+ case " $library_names " in - *" $dlname "*) ;; -- *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac -- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then -@@ -8525,19 +9537,19 @@ func_mode_uninstall () - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then -- rmfiles="$rmfiles $dir/$pic_object" -+ func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then -- rmfiles="$rmfiles $dir/$non_pic_object" -+ func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) -- if test "$mode" = clean ; then -+ if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) -@@ -8547,7 +9559,7 @@ func_mode_uninstall () - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe -- rmfiles="$rmfiles $file" -+ func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. -@@ -8556,7 +9568,7 @@ func_mode_uninstall () - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result -- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" -+ func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename -@@ -8564,12 +9576,12 @@ func_mode_uninstall () - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles -- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then -- rmfiles="$rmfiles $objdir/lt-$name" -+ func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then -- rmfiles="$rmfiles $objdir/lt-${noexename}.c" -+ func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi -@@ -8577,7 +9589,6 @@ func_mode_uninstall () - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done -- objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do -@@ -8589,16 +9600,16 @@ func_mode_uninstall () - exit $exit_status - } - --{ test "$mode" = uninstall || test "$mode" = clean; } && -+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - --test -z "$mode" && { -+test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" - } - - test -z "$exec_cmd" && \ -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" - - if test -n "$exec_cmd"; then - eval exec "$exec_cmd" -diff --git a/ltoptions.m4 b/ltoptions.m4 -index 5ef12ced2a..17cfd51c0b 100644 ---- a/ltoptions.m4 -+++ b/ltoptions.m4 -@@ -8,7 +8,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# serial 6 ltoptions.m4 -+# serial 7 ltoptions.m4 - - # This is to help aclocal find these macros, as it can't see m4_define. - AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -diff --git a/ltversion.m4 b/ltversion.m4 -index bf87f77132..9c7b5d4118 100644 ---- a/ltversion.m4 -+++ b/ltversion.m4 -@@ -7,17 +7,17 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# Generated from ltversion.in. -+# @configure_input@ - --# serial 3134 ltversion.m4 -+# serial 3293 ltversion.m4 - # This file is part of GNU Libtool - --m4_define([LT_PACKAGE_VERSION], [2.2.7a]) --m4_define([LT_PACKAGE_REVISION], [1.3134]) -+m4_define([LT_PACKAGE_VERSION], [2.4]) -+m4_define([LT_PACKAGE_REVISION], [1.3293]) - - AC_DEFUN([LTVERSION_VERSION], --[macro_version='2.2.7a' --macro_revision='1.3134' -+[macro_version='2.4' -+macro_revision='1.3293' - _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) - _LT_DECL(, macro_revision, 0) - ]) -diff --git a/lt~obsolete.m4 b/lt~obsolete.m4 -index bf92b5e079..c573da90c5 100644 ---- a/lt~obsolete.m4 -+++ b/lt~obsolete.m4 -@@ -7,7 +7,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# serial 4 lt~obsolete.m4 -+# serial 5 lt~obsolete.m4 - - # These exist entirely to fool aclocal when bootstrapping libtool. - # -diff --git a/opcodes/configure b/opcodes/configure -index 0b352a454d..7eaea7db73 100755 ---- a/opcodes/configure -+++ b/opcodes/configure -@@ -650,6 +650,9 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL -+ac_ct_AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -763,6 +766,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_targets - enable_werror -@@ -1423,6 +1427,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -5115,8 +5121,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -5156,7 +5162,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -5842,8 +5848,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -5892,6 +5898,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -5908,6 +5988,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -6076,7 +6161,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -6230,6 +6316,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -6245,9 +6346,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -6263,7 +6517,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6283,11 +6537,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -6303,7 +6561,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -6322,6 +6580,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -6333,16 +6595,72 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a - -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } - -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi - - - -@@ -6684,8 +7002,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -6721,6 +7039,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -6762,6 +7081,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -6773,7 +7104,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -6799,8 +7130,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -6810,8 +7141,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -6848,6 +7179,16 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ - - - -@@ -6869,6 +7210,45 @@ fi - - - -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ -+ -+ - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -@@ -7075,6 +7455,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -7638,6 +8135,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7803,7 +8302,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7892,7 +8392,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -8190,8 +8690,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -8357,6 +8855,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -8419,7 +8923,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -8476,13 +8980,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -8543,6 +9051,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8893,7 +9406,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8992,12 +9506,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -9011,8 +9525,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -9030,8 +9544,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9077,8 +9591,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -9208,7 +9722,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9221,22 +9741,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -9248,7 +9775,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -9261,22 +9794,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -9321,20 +9861,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9395,7 +9978,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -9403,7 +9986,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -9419,7 +10002,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -9443,10 +10026,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -9525,23 +10108,36 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -9626,7 +10222,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -9645,9 +10241,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -10223,8 +10819,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -10257,13 +10854,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -10355,7 +11010,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -11195,10 +11850,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11301,10 +11956,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -12543,7 +13198,7 @@ if test "$enable_shared" = "yes"; then - # since libbfd may not pull in the entirety of libiberty. - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - case "${host}" in -@@ -13518,13 +14173,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -13539,14 +14201,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -13579,12 +14244,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -13639,8 +14304,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -13650,12 +14320,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -13671,7 +14343,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -13707,6 +14378,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -14463,7 +15135,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -14566,19 +15239,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -14608,6 +15304,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -14617,6 +15319,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -14731,12 +15436,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -14823,9 +15528,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -14841,6 +15543,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -14873,210 +15578,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -diff --git a/opcodes/configure.ac b/opcodes/configure.ac -index b9f5eb8a4f..a31b66a2f0 100644 ---- a/opcodes/configure.ac -+++ b/opcodes/configure.ac -@@ -167,7 +167,7 @@ changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - changequote([,])dnl - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - case "${host}" in -diff --git a/zlib/configure b/zlib/configure -index bed9e3ea2b..caef0b674e 100755 ---- a/zlib/configure -+++ b/zlib/configure -@@ -614,8 +614,11 @@ OTOOL - LIPO - NMEDIT - DSYMUTIL -+MANIFEST_TOOL - RANLIB -+ac_ct_AR - AR -+DLLTOOL - OBJDUMP - LN_S - NM -@@ -737,6 +740,7 @@ enable_static - with_pic - enable_fast_install - with_gnu_ld -+with_libtool_sysroot - enable_libtool_lock - enable_host_shared - ' -@@ -1385,6 +1389,8 @@ Optional Packages: - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified). - - Some influential environment variables: - CC C compiler command -@@ -3910,8 +3916,8 @@ esac - - - --macro_version='2.2.7a' --macro_revision='1.3134' -+macro_version='2.4' -+macro_revision='1.3293' - - - -@@ -3951,7 +3957,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 - $as_echo_n "checking how to print strings... " >&6; } - # Test print first, because it will be a builtin if present. --if test "X`print -r -- -n 2>/dev/null`" = X-n && \ -+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' - elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -4767,8 +4773,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -4817,6 +4823,80 @@ esac - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -+$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -+if test "${lt_cv_to_host_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 -+ ;; -+ esac -+ ;; -+ *-*-cygwin* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin -+ ;; -+ *-*-cygwin* ) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+ * ) # otherwise, assume *nix -+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin -+ ;; -+ esac -+ ;; -+ * ) # unhandled hosts (and "normal" native builds) -+ lt_cv_to_host_file_cmd=func_convert_file_noop -+ ;; -+esac -+ -+fi -+ -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -+$as_echo "$lt_cv_to_host_file_cmd" >&6; } -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -+if test "${lt_cv_to_tool_file_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ #assume ordinary cross tools, or native build. -+lt_cv_to_tool_file_cmd=func_convert_file_noop -+case $host in -+ *-*-mingw* ) -+ case $build in -+ *-*-mingw* ) # actually msys -+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -+$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 - $as_echo_n "checking for $LD option to reload object files... " >&6; } - if test "${lt_cv_ld_reload_flag+set}" = set; then : -@@ -4833,6 +4913,11 @@ case $reload_flag in - esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ if test "$GCC" != yes; then -+ reload_cmds=false -+ fi -+ ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -5001,7 +5086,8 @@ mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -5155,6 +5241,21 @@ esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 - $as_echo "$lt_cv_deplibs_check_method" >&6; } -+ -+file_magic_glob= -+want_nocaseglob=no -+if test "$build" = "$host"; then -+ case $host_os in -+ mingw* | pw32*) -+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then -+ want_nocaseglob=yes -+ else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` -+ fi -+ ;; -+ esac -+fi -+ - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method - test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -5170,9 +5271,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -+set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$DLLTOOL"; then -+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+DLLTOOL=$ac_cv_prog_DLLTOOL -+if test -n "$DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -+$as_echo "$DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_DLLTOOL"; then -+ ac_ct_DLLTOOL=$DLLTOOL -+ # Extract the first word of "dlltool", so it can be a program name with args. -+set dummy dlltool; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_DLLTOOL"; then -+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_DLLTOOL="dlltool" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -+if test -n "$ac_ct_DLLTOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -+$as_echo "$ac_ct_DLLTOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_DLLTOOL" = x; then -+ DLLTOOL="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ DLLTOOL=$ac_ct_DLLTOOL -+ fi -+else -+ DLLTOOL="$ac_cv_prog_DLLTOOL" -+fi -+ -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -+$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_sharedlib_from_linklib_cmd='unknown' -+ -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_AR+set}" = set; then : -@@ -5188,7 +5443,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -5208,11 +5463,15 @@ $as_echo "no" >&6; } - fi - - -+ test -n "$AR" && break -+ done - fi --if test -z "$ac_cv_prog_AR"; then -+if test -z "$AR"; then - ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 -+ for ac_prog in ar -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : -@@ -5228,7 +5487,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_AR="ar" -+ ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -5247,6 +5506,10 @@ else - $as_echo "no" >&6; } - fi - -+ -+ test -n "$ac_ct_AR" && break -+done -+ - if test "x$ac_ct_AR" = x; then - AR="false" - else -@@ -5258,16 +5521,72 @@ ac_tool_warned=yes ;; - esac - AR=$ac_ct_AR - fi --else -- AR="$ac_cv_prog_AR" - fi - --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -+$as_echo_n "checking for archiver @FILE support... " >&6; } -+if test "${lt_cv_ar_at_file+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_ar_at_file=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -+ (eval $lt_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a - -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -+$as_echo "$lt_cv_ar_at_file" >&6; } - -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= -+else -+ archiver_list_spec=$lt_cv_ar_at_file -+fi - - - -@@ -5609,8 +5928,8 @@ esac - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --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'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -+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'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -5646,6 +5965,7 @@ for ac_symprfx in "" "_"; do - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi -+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no -@@ -5687,6 +6007,18 @@ _LT_EOF - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -5698,7 +6030,7 @@ _LT_EOF - cat <<_LT_EOF >> conftest.$ac_ext - - /* The mapping between symbol names and symbols. */ --const struct { -+LT_DLSYM_CONST struct { - const char *name; - void *address; - } -@@ -5724,8 +6056,8 @@ static const void *lt_preloaded_setup() { - _LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -+ lt_globsym_save_LIBS=$LIBS -+ lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 -@@ -5735,8 +6067,8 @@ _LT_EOF - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -+ LIBS=$lt_globsym_save_LIBS -+ CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi -@@ -5773,6 +6105,19 @@ else - $as_echo "ok" >&6; } - fi - -+# Response file support. -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then -+ nm_file_list_spec='@' -+fi -+ -+ -+ -+ -+ -+ -+ - - - -@@ -5793,6 +6138,41 @@ fi - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -+$as_echo_n "checking for sysroot... " >&6; } -+ -+# Check whether --with-libtool-sysroot was given. -+if test "${with_libtool_sysroot+set}" = set; then : -+ withval=$with_libtool_sysroot; -+else -+ with_libtool_sysroot=no -+fi -+ -+ -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 -+$as_echo "${with_libtool_sysroot}" >&6; } -+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 -+ ;; -+esac -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -+$as_echo "${lt_sysroot:-no}" >&6; } -+ -+ -+ - - - # Check whether --enable-libtool-lock was given. -@@ -6004,6 +6384,123 @@ esac - - need_locks="$enable_libtool_lock" - -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -+set dummy ${ac_tool_prefix}mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$MANIFEST_TOOL"; then -+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -+if test -n "$MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -+$as_echo "$MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then -+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL -+ # Extract the first word of "mt", so it can be a program name with args. -+set dummy mt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_MANIFEST_TOOL"; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -+if test -n "$ac_ct_MANIFEST_TOOL"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_MANIFEST_TOOL" = x; then -+ MANIFEST_TOOL=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL -+ fi -+else -+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -+fi -+ -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -+if test "${lt_cv_path_mainfest_tool+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&5 -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -+$as_echo "$lt_cv_path_mainfest_tool" >&6; } -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+ -+ -+ -+ -+ - - case $host_os in - rhapsody* | darwin*) -@@ -6570,6 +7067,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 -+ echo "$RANLIB libconftest.a" >&5 -+ $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -7033,7 +7532,8 @@ fi - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - - - -@@ -7122,7 +7622,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -7420,8 +7920,6 @@ fi - lt_prog_compiler_pic= - lt_prog_compiler_static= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 --$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' -@@ -7587,6 +8085,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -7649,7 +8153,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; -@@ -7706,13 +8210,17 @@ case $host_os in - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 --$as_echo "$lt_prog_compiler_pic" >&6; } -- -- -- -- - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -+$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -+if test "${lt_cv_prog_compiler_pic+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -+$as_echo "$lt_cv_prog_compiler_pic" >&6; } -+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - - # - # Check to make sure the PIC flag actually works. -@@ -7773,6 +8281,11 @@ fi - - - -+ -+ -+ -+ -+ - # - # Check to make sure the static flag actually works. - # -@@ -8123,7 +8636,8 @@ _LT_EOF - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ 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' -+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -8222,12 +8736,12 @@ _LT_EOF - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' -- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -8241,8 +8755,8 @@ _LT_EOF - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -8260,8 +8774,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -8307,8 +8821,8 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -8438,7 +8952,13 @@ _LT_EOF - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- if test x$gcc_no_link = xyes; then -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test x$gcc_no_link = xyes; then - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -8454,22 +8974,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - 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" -@@ -8481,7 +9008,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - # Determine the default libpath from the value encoded in an - # empty executable. -- if test x$gcc_no_link = xyes; then -+ if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ if test "${lt_cv_aix_libpath_+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test x$gcc_no_link = xyes; then - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -8497,22 +9030,29 @@ main () - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi -+ lt_aix_libpath_sed=' -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }' -+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+ if test -z "$lt_cv_aix_libpath_"; then -+ lt_cv_aix_libpath_="/usr/lib:/lib" -+ fi -+ -+fi -+ -+ aix_libpath=$lt_cv_aix_libpath_ -+fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, -@@ -8557,20 +9097,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_from_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ file_list_spec='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' -+ enable_shared_with_static_runtimes=yes -+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -+ # Don't use ranlib -+ old_postinstall_cmds='chmod 644 $oldlib' -+ postlink_cmds='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # Assume MSVC wrapper -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -8631,7 +9214,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no -@@ -8639,7 +9222,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux9*) - if test "$GCC" = yes; then -- 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' -+ 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' - else - 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' - fi -@@ -8655,7 +9238,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -8679,10 +9262,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8761,26 +9344,39 @@ fi - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then -- 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' -+ 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' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- if test x$gcc_no_link = xyes; then -+ # This should be the same for all languages, so no per-tag cache variable. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -+if test "${lt_cv_irix_exported_symbol+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ if test x$gcc_no_link = xyes; then - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int foo(void) {} -+int foo (void) { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- 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' -- -+ lt_cv_irix_exported_symbol=yes -+else -+ lt_cv_irix_exported_symbol=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -+$as_echo "$lt_cv_irix_exported_symbol" >&6; } -+ if test "$lt_cv_irix_exported_symbol" = yes; then -+ 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' -+ fi - else - 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' - 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' -@@ -8865,7 +9461,7 @@ rm -f core conftest.err conftest.$ac_objext \ - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- 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' -+ 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -@@ -8884,9 +9480,9 @@ rm -f core conftest.err conftest.$ac_objext \ - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) -@@ -9462,8 +10058,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -9496,13 +10093,71 @@ cygwin* | mingw* | pw32* | cegcc*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; -+ -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' -+ -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac -+ -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -9594,7 +10249,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -10452,10 +11107,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -10558,10 +11213,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -11992,13 +12647,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' - lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' - lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' - lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' - reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' - reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' - OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' - deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' - file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' - AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' - AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' - STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' - RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' - old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -@@ -12013,14 +12675,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - 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"`' -+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' --lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' - lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' - need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' - DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' - NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' - LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -@@ -12053,12 +12718,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q - hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' - inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' - link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' --fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' - always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' - export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' - exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' - include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' - prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' - file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' - variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' - need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -@@ -12113,8 +12778,13 @@ reload_flag \ - OBJDUMP \ - deplibs_check_method \ - file_magic_cmd \ -+file_magic_glob \ -+want_nocaseglob \ -+DLLTOOL \ -+sharedlib_from_linklib_cmd \ - AR \ - AR_FLAGS \ -+archiver_list_spec \ - STRIP \ - RANLIB \ - CC \ -@@ -12124,12 +12794,14 @@ lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+nm_file_list_spec \ - lt_prog_compiler_no_builtin_flag \ --lt_prog_compiler_wl \ - lt_prog_compiler_pic \ -+lt_prog_compiler_wl \ - lt_prog_compiler_static \ - lt_cv_prog_compiler_c_o \ - need_locks \ -+MANIFEST_TOOL \ - DSYMUTIL \ - NMEDIT \ - LIPO \ -@@ -12145,7 +12817,6 @@ no_undefined_flag \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ --fix_srcfile_path \ - exclude_expsyms \ - include_expsyms \ - file_list_spec \ -@@ -12181,6 +12852,7 @@ module_cmds \ - module_expsym_cmds \ - export_symbols_cmds \ - prelink_cmds \ -+postlink_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ -@@ -12770,7 +13442,8 @@ $as_echo X"$file" | - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -12873,19 +13546,42 @@ SP2NL=$lt_lt_SP2NL - # turn newlines into spaces. - NL2SP=$lt_lt_NL2SP - -+# convert \$build file names to \$host format. -+to_host_file_cmd=$lt_cv_to_host_file_cmd -+ -+# convert \$build files to toolchain format. -+to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+ - # An object symbol dumper. - OBJDUMP=$lt_OBJDUMP - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - --# Command to use when deplibs_check_method == "file_magic". -+# Command to use when deplibs_check_method = "file_magic". - file_magic_cmd=$lt_file_magic_cmd - -+# How to find potential files when deplibs_check_method = "file_magic". -+file_magic_glob=$lt_file_magic_glob -+ -+# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -+want_nocaseglob=$lt_want_nocaseglob -+ -+# DLL creation program. -+DLLTOOL=$lt_DLLTOOL -+ -+# Command to associate shared and link libraries. -+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd -+ - # The archiver. - AR=$lt_AR -+ -+# Flags to create an archive. - AR_FLAGS=$lt_AR_FLAGS - -+# How to feed a file listing to the archiver. -+archiver_list_spec=$lt_archiver_list_spec -+ - # A symbol stripping program. - STRIP=$lt_STRIP - -@@ -12915,6 +13611,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# Specify filename containing input files for \$NM. -+nm_file_list_spec=$lt_nm_file_list_spec -+ -+# The root where to search for dependent libraries,and in which our libraries should be installed. -+lt_sysroot=$lt_sysroot -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -12924,6 +13626,9 @@ MAGIC_CMD=$MAGIC_CMD - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - -+# Manifest tool. -+MANIFEST_TOOL=$lt_MANIFEST_TOOL -+ - # Tool to manipulate archived DWARF debug symbol files on Mac OS X. - DSYMUTIL=$lt_DSYMUTIL - -@@ -13038,12 +13743,12 @@ with_gcc=$GCC - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic - -+# How to pass a linker flag through the compiler. -+wl=$lt_lt_prog_compiler_wl -+ - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static - -@@ -13130,9 +13835,6 @@ inherit_rpath=$inherit_rpath - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs - --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path=$lt_fix_srcfile_path -- - # Set to "yes" if exported symbols are required. - always_export_symbols=$always_export_symbols - -@@ -13148,6 +13850,9 @@ include_expsyms=$lt_include_expsyms - # Commands necessary for linking programs (against libraries) with templates. - prelink_cmds=$lt_prelink_cmds - -+# Commands necessary for finishing linking programs. -+postlink_cmds=$lt_postlink_cmds -+ - # Specify filename containing input files. - file_list_spec=$lt_file_list_spec - -@@ -13180,210 +13885,169 @@ ltmain="$ac_aux_dir/ltmain.sh" - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $* )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "${1}" | $SED "$basename"` --} -- -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[^=]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$@"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1+=\$2" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$1=\$$1\$2" --} -- --_LT_EOF -- ;; -- esac -- -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) -+ -+ if test x"$xsi_shell" = xyes; then -+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -+func_dirname ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_basename ()$/,/^} # func_basename /c\ -+func_basename ()\ -+{\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -+func_dirname_and_basename ()\ -+{\ -+\ case ${1} in\ -+\ */*) func_dirname_result="${1%/*}${2}" ;;\ -+\ * ) func_dirname_result="${3}" ;;\ -+\ esac\ -+\ func_basename_result="${1##*/}"\ -+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -+func_stripname ()\ -+{\ -+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -+\ # positional parameters, so assign one to ordinary parameter first.\ -+\ func_stripname_result=${3}\ -+\ func_stripname_result=${func_stripname_result#"${1}"}\ -+\ func_stripname_result=${func_stripname_result%"${2}"}\ -+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -+func_split_long_opt ()\ -+{\ -+\ func_split_long_opt_name=${1%%=*}\ -+\ func_split_long_opt_arg=${1#*=}\ -+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -+func_split_short_opt ()\ -+{\ -+\ func_split_short_opt_arg=${1#??}\ -+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -+func_lo2o ()\ -+{\ -+\ case ${1} in\ -+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -+\ *) func_lo2o_result=${1} ;;\ -+\ esac\ -+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_xform ()$/,/^} # func_xform /c\ -+func_xform ()\ -+{\ -+ func_xform_result=${1%.*}.lo\ -+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_arith ()$/,/^} # func_arith /c\ -+func_arith ()\ -+{\ -+ func_arith_result=$(( $* ))\ -+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_len ()$/,/^} # func_len /c\ -+func_len ()\ -+{\ -+ func_len_result=${#1}\ -+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+fi -+ -+if test x"$lt_shell_append" = xyes; then -+ sed -e '/^func_append ()$/,/^} # func_append /c\ -+func_append ()\ -+{\ -+ eval "${1}+=\\${2}"\ -+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -+func_append_quoted ()\ -+{\ -+\ func_quote_for_eval "${2}"\ -+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+ -+ -+ # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+else -+ # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+ test 0 -eq $? || _lt_function_replace_fail=: -+fi -+ -+if test x"$_lt_function_replace_fail" = x":"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -+fi -+ -+ -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch deleted file mode 100644 index 449225a36..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9c313e8a15a7e7c5c0f2906e3218ed211563ac2a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:37:10 +0000 -Subject: [PATCH 08/15] Add the armv5e architecture to binutils - -Binutils has a comment that indicates it is supposed to match gcc for -all of the support "-march=" settings, but it was lacking the armv5e setting. -This was a simple way to add it, as thumb instructions shouldn't be generated -by the compiler anyway. - -Upstream-Status: Denied -Upstream maintainer indicated that we should not be using armv5e, even -though it is a legal archicture defined by our gcc. - -Signed-off-by: Mark Hatle -Signed-off-by: Khem Raj ---- - gas/config/tc-arm.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c -index 60bda51070..eb6d0afd6e 100644 ---- a/gas/config/tc-arm.c -+++ b/gas/config/tc-arm.c -@@ -25633,6 +25633,7 @@ static const struct arm_arch_option_table arm_archs[] = - ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA), - ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA), - ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP), -+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP), - ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP), - ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP), - ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP), --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch new file mode 100644 index 000000000..30a22b504 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch @@ -0,0 +1,35 @@ +From 331443a87a31ec504e5652fc099d9129a9a4deb8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:39:01 +0000 +Subject: [PATCH 08/15] don't let the distro compiler point to the wrong + installation location + +Thanks to RP for helping find the source code causing the issue. + +2010/08/13 +Nitin A Kamble + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Khem Raj +--- + libiberty/Makefile.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 25cfa29ad5..ce67a710e3 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -364,7 +364,8 @@ install-strip: install + # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the + # default multilib, so we have to take CFLAGS into account as well, + # since it will be passed the multilib flags. +-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++MULTIOSDIR = "" + install_to_libdir: all + if test -n "${target_header_dir}"; then \ + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch deleted file mode 100644 index 1c4059392..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 2be9b44a4a308e3ea42a027c4c3211170f10c9c0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:39:01 +0000 -Subject: [PATCH 09/15] don't let the distro compiler point to the wrong - installation location - -Thanks to RP for helping find the source code causing the issue. - -2010/08/13 -Nitin A Kamble - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Khem Raj ---- - libiberty/Makefile.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in -index 0ff9e45e45..42c32642b2 100644 ---- a/libiberty/Makefile.in -+++ b/libiberty/Makefile.in -@@ -366,7 +366,8 @@ install-strip: install - # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the - # default multilib, so we have to take CFLAGS into account as well, - # since it will be passed the multilib flags. --MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` -+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` -+MULTIOSDIR = "" - install_to_libdir: all - if test -n "${target_header_dir}"; then \ - ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch new file mode 100644 index 000000000..e0e257880 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch @@ -0,0 +1,273 @@ +From 0a4afdcf0700efd45963568e2d0049127cdf4434 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 15 Jan 2016 06:31:09 +0000 +Subject: [PATCH 09/15] warn for uses of system directories when cross linking + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.in (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +Signed-off-by: Khem Raj +--- + ld/config.in | 3 +++ + ld/configure | 16 ++++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texinfo | 12 ++++++++++++ + ld/ldfile.c | 17 +++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 16 ++++++++++++++++ + 9 files changed, 86 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index a846743da6..df3cd5fb60 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -27,6 +27,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index 4e71511bd1..71c6ad1fd1 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -789,6 +789,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1448,6 +1449,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -16315,6 +16318,19 @@ fi + + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Check whether --enable-gold was given. + if test "${enable_gold+set}" = set; then : + enableval=$enable_gold; case "${enableval}" in +diff --git a/ld/configure.ac b/ld/configure.ac +index 00080f85fd..3aa98e37fb 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index c6fa1247f0..01c373498f 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -174,6 +174,14 @@ typedef struct + in the linker script. */ + bfd_boolean force_group_allocation; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index ebe7e7b7bd..33aa2c62fa 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2480,6 +2480,18 @@ string identifying the original linked file does not change. + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 3b37a0a3e2..5c85b01849 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) + new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 5aa7f6bc3e..cb655e0399 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -147,6 +147,8 @@ enum option_values + OPTION_REQUIRE_DEFINED_SYMBOL, + OPTION_ORPHAN_HANDLING, + OPTION_FORCE_GROUP_ALLOCATION, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index 2b09f20413..89e2a3a805 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -261,6 +261,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index effa277b16..e4929607e9 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -538,6 +538,14 @@ static const struct ld_option ld_options[] = + { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, + '\0', N_("=MODE"), N_("Control how orphan sections are handled."), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -1568,6 +1576,14 @@ parse_args (unsigned argc, char **argv) + einfo (_("%P%F: invalid argument to option" + " \"--orphan-handling\"\n")); + break; ++ ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; + } + } + +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch new file mode 100644 index 000000000..496242efa --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch @@ -0,0 +1,52 @@ +From 88fac08f1c472c612f381cbb9408756f2f58b4ff Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:42:38 +0000 +Subject: [PATCH 10/15] Fix rpath in libtool when sysroot is enabled + +Enabling sysroot support in libtool exposed a bug where the final +library had an RPATH encoded into it which still pointed to the +sysroot. This works around the issue until it gets sorted out +upstream. + +Fix suggested by Richard Purdie + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Scott Garman +Signed-off-by: Khem Raj +--- + ltmain.sh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 70e856e065..11ee684ccc 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -8035,9 +8035,11 @@ EOF + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then +- func_replace_sysroot "$libdir" +- libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -8770,6 +8772,10 @@ EOF + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch deleted file mode 100644 index 0774ad6f0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch +++ /dev/null @@ -1,273 +0,0 @@ -From b1ab17abe4128684f19775448545176fb2a5e27e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 15 Jan 2016 06:31:09 +0000 -Subject: [PATCH 10/15] warn for uses of system directories when cross linking - -2008-07-02 Joseph Myers - - ld/ - * ld.h (args_type): Add error_poison_system_directories. - * ld.texinfo (--error-poison-system-directories): Document. - * ldfile.c (ldfile_add_library_path): Check - command_line.error_poison_system_directories. - * ldmain.c (main): Initialize - command_line.error_poison_system_directories. - * lexsup.c (enum option_values): Add - OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. - (ld_options): Add --error-poison-system-directories. - (parse_args): Handle new option. - -2007-06-13 Joseph Myers - - ld/ - * config.in: Regenerate. - * ld.h (args_type): Add poison_system_directories. - * ld.texinfo (--no-poison-system-directories): Document. - * ldfile.c (ldfile_add_library_path): Check - command_line.poison_system_directories. - * ldmain.c (main): Initialize - command_line.poison_system_directories. - * lexsup.c (enum option_values): Add - OPTION_NO_POISON_SYSTEM_DIRECTORIES. - (ld_options): Add --no-poison-system-directories. - (parse_args): Handle new option. - -2007-04-20 Joseph Myers - - Merge from Sourcery G++ binutils 2.17: - - 2007-03-20 Joseph Myers - Based on patch by Mark Hatle . - ld/ - * configure.in (--enable-poison-system-directories): New option. - * configure, config.in: Regenerate. - * ldfile.c (ldfile_add_library_path): If - ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, - /usr/lib, /usr/local/lib or /usr/X11R6/lib. - -Signed-off-by: Mark Hatle -Signed-off-by: Scott Garman -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - ld/config.in | 3 +++ - ld/configure | 16 ++++++++++++++++ - ld/configure.ac | 10 ++++++++++ - ld/ld.h | 8 ++++++++ - ld/ld.texinfo | 12 ++++++++++++ - ld/ldfile.c | 17 +++++++++++++++++ - ld/ldlex.h | 2 ++ - ld/ldmain.c | 2 ++ - ld/lexsup.c | 16 ++++++++++++++++ - 9 files changed, 86 insertions(+) - -diff --git a/ld/config.in b/ld/config.in -index 2c6d698b6c..d3cb7e882d 100644 ---- a/ld/config.in -+++ b/ld/config.in -@@ -17,6 +17,9 @@ - language is requested. */ - #undef ENABLE_NLS - -+/* Define to warn for use of native system library directories */ -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+ - /* Additional extension a shared object might have. */ - #undef EXTRA_SHLIB_EXTENSION - -diff --git a/ld/configure b/ld/configure -index 4277b74bad..63109644b6 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -793,6 +793,7 @@ with_lib_path - enable_targets - enable_64_bit_bfd - with_sysroot -+enable_poison_system_directories - enable_gold - enable_got - enable_compressed_debug_sections -@@ -1450,6 +1451,8 @@ Optional Features: - --disable-largefile omit support for large files - --enable-targets alternative target configurations - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) -+ --enable-poison-system-directories -+ warn for use of native system library directories - --enable-gold[=ARG] build gold [ARG={default,yes,no}] - --enable-got= GOT handling scheme (target, single, negative, - multigot) -@@ -16314,6 +16317,19 @@ fi - - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Check whether --enable-gold was given. - if test "${enable_gold+set}" = set; then : - enableval=$enable_gold; case "${enableval}" in -diff --git a/ld/configure.ac b/ld/configure.ac -index 36a9f5083a..47f1d33fa5 100644 ---- a/ld/configure.ac -+++ b/ld/configure.ac -@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) - AC_SUBST(TARGET_SYSTEM_ROOT) - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system library directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system library directories]) -+fi -+ - dnl Use --enable-gold to decide if this linker should be the default. - dnl "install_as_default" is set to false if gold is the default linker. - dnl "installed_linker" is the installed BFD linker name. -diff --git a/ld/ld.h b/ld/ld.h -index 104bb8e237..74c914bdd5 100644 ---- a/ld/ld.h -+++ b/ld/ld.h -@@ -172,6 +172,14 @@ typedef struct - /* If set, display the target memory usage (per memory region). */ - bfd_boolean print_memory_usage; - -+ /* If TRUE (the default) warn for uses of system directories when -+ cross linking. */ -+ bfd_boolean poison_system_directories; -+ -+ /* If TRUE (default FALSE) give an error for uses of system -+ directories when cross linking instead of a warning. */ -+ bfd_boolean error_poison_system_directories; -+ - /* Big or little endian as set on command line. */ - enum endian_enum endian; - -diff --git a/ld/ld.texinfo b/ld/ld.texinfo -index d393acdd94..ba995b1e3a 100644 ---- a/ld/ld.texinfo -+++ b/ld/ld.texinfo -@@ -2403,6 +2403,18 @@ string identifying the original linked file does not change. - - Passing @code{none} for @var{style} disables the setting from any - @code{--build-id} options earlier on the command line. -+ -+@kindex --no-poison-system-directories -+@item --no-poison-system-directories -+Do not warn for @option{-L} options using system directories such as -+@file{/usr/lib} when cross linking. This option is intended for use -+in chroot environments when such directories contain the correct -+libraries for the target system rather than the host. -+ -+@kindex --error-poison-system-directories -+@item --error-poison-system-directories -+Give an error instead of a warning for @option{-L} options using -+system directories when cross linking. - @end table - - @c man end -diff --git a/ld/ldfile.c b/ld/ldfile.c -index 0943bb2dfa..95874c75de 100644 ---- a/ld/ldfile.c -+++ b/ld/ldfile.c -@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) - new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); - else - new_dirs->name = xstrdup (name); -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (command_line.poison_system_directories -+ && ((!strncmp (name, "/lib", 4)) -+ || (!strncmp (name, "/usr/lib", 8)) -+ || (!strncmp (name, "/usr/local/lib", 14)) -+ || (!strncmp (name, "/usr/X11R6/lib", 14)))) -+ { -+ if (command_line.error_poison_system_directories) -+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " -+ "cross-compilation\n"), name); -+ else -+ einfo (_("%P: warning: library search path \"%s\" is unsafe for " -+ "cross-compilation\n"), name); -+ } -+#endif -+ - } - - /* Try to open a BFD for a lang_input_statement. */ -diff --git a/ld/ldlex.h b/ld/ldlex.h -index 3ecac2bc86..34117f43a5 100644 ---- a/ld/ldlex.h -+++ b/ld/ldlex.h -@@ -146,6 +146,8 @@ enum option_values - OPTION_PRINT_MEMORY_USAGE, - OPTION_REQUIRE_DEFINED_SYMBOL, - OPTION_ORPHAN_HANDLING, -+ OPTION_NO_POISON_SYSTEM_DIRECTORIES, -+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, - }; - - /* The initial parser states. */ -diff --git a/ld/ldmain.c b/ld/ldmain.c -index 1e48b1a2db..21f27bacf1 100644 ---- a/ld/ldmain.c -+++ b/ld/ldmain.c -@@ -270,6 +270,8 @@ main (int argc, char **argv) - command_line.warn_mismatch = TRUE; - command_line.warn_search_mismatch = TRUE; - command_line.check_section_addresses = -1; -+ command_line.poison_system_directories = TRUE; -+ command_line.error_poison_system_directories = FALSE; - - /* We initialize DEMANGLING based on the environment variable - COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the -diff --git a/ld/lexsup.c b/ld/lexsup.c -index 0b7d4976ac..dedc07a143 100644 ---- a/ld/lexsup.c -+++ b/ld/lexsup.c -@@ -535,6 +535,14 @@ static const struct ld_option ld_options[] = - { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, - '\0', N_("=MODE"), N_("Control how orphan sections are handled."), - TWO_DASHES }, -+ { {"no-poison-system-directories", no_argument, NULL, -+ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, -+ '\0', NULL, N_("Do not warn for -L options using system directories"), -+ TWO_DASHES }, -+ { {"error-poison-system-directories", no_argument, NULL, -+ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, -+ '\0', NULL, N_("Give an error for -L options using system directories"), -+ TWO_DASHES }, - }; - - #define OPTION_COUNT ARRAY_SIZE (ld_options) -@@ -1562,6 +1570,14 @@ parse_args (unsigned argc, char **argv) - einfo (_("%P%F: invalid argument to option" - " \"--orphan-handling\"\n")); - break; -+ -+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: -+ command_line.poison_system_directories = FALSE; -+ break; -+ -+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: -+ command_line.error_poison_system_directories = TRUE; -+ break; - } - } - --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 000000000..ac87a2d1d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,59 @@ +From 497660bdbeb6788786553a5d733105f7f898dc62 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:44:14 +0000 +Subject: [PATCH 11/15] Change default emulation for mips64*-*-linux + +we change the default emulations to be N64 instead of N32 + +Upstream-Status: Inappropriate [ OE configuration Specific] + +Signed-off-by: Khem Raj +--- + bfd/config.bfd | 8 ++++---- + ld/configure.tgt | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/bfd/config.bfd b/bfd/config.bfd +index dc24aabad5..4511024f22 100644 +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1186,12 +1186,12 @@ case "${targ}" in + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_be_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +diff --git a/ld/configure.tgt b/ld/configure.tgt +index 47c719cd05..fe7b9238b2 100644 +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -530,11 +530,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks + mips*-*-vxworks*) targ_emul=elf32ebmipvxworks + targ_extra_emuls="elf32elmipvxworks" ;; + mips*-*-windiss) targ_emul=elf32mipswindiss ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip + targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch deleted file mode 100644 index 949ef51bd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 4fe13a36997253a5c91bcb086aeb392ab2095f67 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:42:38 +0000 -Subject: [PATCH 11/15] Fix rpath in libtool when sysroot is enabled - -Enabling sysroot support in libtool exposed a bug where the final -library had an RPATH encoded into it which still pointed to the -sysroot. This works around the issue until it gets sorted out -upstream. - -Fix suggested by Richard Purdie - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Scott Garman -Signed-off-by: Khem Raj ---- - ltmain.sh | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/ltmain.sh b/ltmain.sh -index 70e856e065..11ee684ccc 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -8035,9 +8035,11 @@ EOF - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result - if test -n "$hardcode_libdir_separator"; then -- func_replace_sysroot "$libdir" -- libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else -@@ -8770,6 +8772,10 @@ EOF - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch new file mode 100644 index 000000000..dc5e58073 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch @@ -0,0 +1,393 @@ +From 8c60a55d3678589d93739bd27fec216911d80968 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 14 Feb 2016 17:06:19 +0000 +Subject: [PATCH 12/15] Add support for Netlogic XLP + +Patch From: Nebu Philips + +Using the mipsisa64r2nlm target, add support for XLP from +Netlogic. Also, update vendor name to NLM wherever applicable. + +Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been +assigned to INSN_OCTEON3 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Baoshan Pang +Signed-off-by: Mark Hatle +--- + bfd/aoutx.h | 1 + + bfd/archures.c | 1 + + bfd/bfd-in2.h | 1 + + bfd/config.bfd | 5 +++++ + bfd/cpu-mips.c | 6 ++++-- + bfd/elfxx-mips.c | 8 ++++++++ + binutils/readelf.c | 1 + + gas/config/tc-mips.c | 4 +++- + gas/configure | 3 +++ + include/elf/mips.h | 1 + + include/opcode/mips.h | 6 ++++++ + ld/configure.tgt | 2 ++ + opcodes/mips-dis.c | 12 +++++------- + opcodes/mips-opc.c | 31 ++++++++++++++++++++----------- + 14 files changed, 61 insertions(+), 21 deletions(-) + +diff --git a/bfd/aoutx.h b/bfd/aoutx.h +index 3d38fda14b..0aec49bbb3 100644 +--- a/bfd/aoutx.h ++++ b/bfd/aoutx.h +@@ -814,6 +814,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, + case bfd_mach_mipsisa64r6: + case bfd_mach_mips_sb1: + case bfd_mach_mips_xlr: ++ case bfd_mach_mips_xlp: + /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */ + arch_flags = M_MIPS2; + break; +diff --git a/bfd/archures.c b/bfd/archures.c +index 433b95fa08..063b7943a1 100644 +--- a/bfd/archures.c ++++ b/bfd/archures.c +@@ -201,6 +201,7 @@ DESCRIPTION + .#define bfd_mach_mips_octeon3 6503 + .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *} + .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2' *} ++.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *} + .#define bfd_mach_mipsisa32 32 + .#define bfd_mach_mipsisa32r2 33 + .#define bfd_mach_mipsisa32r3 34 +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index d126aed086..2b753b3a93 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -2060,6 +2060,7 @@ enum bfd_architecture + #define bfd_mach_mips_octeon3 6503 + #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ + #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2' */ ++#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */ + #define bfd_mach_mipsisa32 32 + #define bfd_mach_mipsisa32r2 33 + #define bfd_mach_mipsisa32r3 34 +diff --git a/bfd/config.bfd b/bfd/config.bfd +index 4511024f22..f0f9072f10 100644 +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1169,6 +1169,11 @@ case "${targ}" in + targ_defvec=mips_elf32_le_vec + targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec" + ;; ++ mipsisa64*-*-elf*) ++ targ_defvec=mips_elf32_trad_be_vec ++ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ want64=true ++ ;; + mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none) + targ_defvec=mips_elf32_be_vec + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" +diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c +index 2493094bef..8375d1ae96 100644 +--- a/bfd/cpu-mips.c ++++ b/bfd/cpu-mips.c +@@ -105,7 +105,8 @@ enum + I_mipsocteon3, + I_xlr, + I_interaptiv_mr2, +- I_micromips ++ I_micromips, ++ I_xlp + }; + + #define NN(index) (&arch_info_struct[(index) + 1]) +@@ -158,7 +159,8 @@ static const bfd_arch_info_type arch_info_struct[] = + N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), + N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE, + NN(I_interaptiv_mr2)), +- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0) ++ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)), ++ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, 0) + }; + + /* The default architecture is mips:3000, but with a machine number of +diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c +index fddf68c816..354c85d00b 100644 +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -6796,6 +6796,9 @@ _bfd_elf_mips_mach (flagword flags) + case E_MIPS_MACH_IAMR2: + return bfd_mach_mips_interaptiv_mr2; + ++ case E_MIPS_MACH_XLP: ++ return bfd_mach_mips_xlp; ++ + default: + switch (flags & EF_MIPS_ARCH) + { +@@ -11956,6 +11959,10 @@ mips_set_isa_flags (bfd *abfd) + val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2; + break; + ++ case bfd_mach_mips_xlp: ++ val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP; ++ break; ++ + case bfd_mach_mipsisa32: + val = E_MIPS_ARCH_32; + break; +@@ -13989,6 +13996,7 @@ static const struct mips_mach_extension mips_mach_extensions[] = + { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, + { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, + { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 }, ++ { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 }, + + /* MIPS64 extensions. */ + { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 }, +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 2b15f0f2cb..092744708e 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -3335,6 +3335,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) + case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break; + case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break; + case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break; ++ case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break; + case 0: + /* We simply ignore the field in this case to avoid confusion: + MIPS ELF does not specify EF_MIPS_MACH, it is a GNU +diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c +index 3804df2958..9576c986db 100644 +--- a/gas/config/tc-mips.c ++++ b/gas/config/tc-mips.c +@@ -552,6 +552,7 @@ static int mips_32bitmode = 0; + || mips_opts.arch == CPU_RM7000 \ + || mips_opts.arch == CPU_VR5500 \ + || mips_opts.micromips \ ++ || mips_opts.arch == CPU_XLP \ + ) + + /* Whether the processor uses hardware interlocks to protect reads +@@ -581,6 +582,7 @@ static int mips_32bitmode = 0; + && mips_opts.isa != ISA_MIPS3) \ + || mips_opts.arch == CPU_R4300 \ + || mips_opts.micromips \ ++ || mips_opts.arch == CPU_XLP \ + ) + + /* Whether the processor uses hardware interlocks to protect reads +@@ -19738,7 +19740,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] = + /* Broadcom XLP. + XLP is mostly like XLR, with the prominent exception that it is + MIPS64R2 rather than MIPS64. */ +- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR }, ++ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP }, + + /* MIPS 64 Release 6 */ + { "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6}, +diff --git a/gas/configure b/gas/configure +index 81dd4cbd97..95bdf3b19b 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -12989,6 +12989,9 @@ _ACEOF + mipsisa64r6 | mipsisa64r6el) + mips_cpu=mips64r6 + ;; ++ mipsisa64r2nlm | mipsisa64r2nlmel) ++ mips_cpu=xlp ++ ;; + mipstx39 | mipstx39el) + mips_cpu=r3900 + ;; +diff --git a/include/elf/mips.h b/include/elf/mips.h +index a4bea43ff8..73d904e25f 100644 +--- a/include/elf/mips.h ++++ b/include/elf/mips.h +@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext) + #define E_MIPS_MACH_SB1 0x008a0000 + #define E_MIPS_MACH_OCTEON 0x008b0000 + #define E_MIPS_MACH_XLR 0x008c0000 ++#define E_MIPS_MACH_XLP 0x008f0000 + #define E_MIPS_MACH_OCTEON2 0x008d0000 + #define E_MIPS_MACH_OCTEON3 0x008e0000 + #define E_MIPS_MACH_5400 0x00910000 +diff --git a/include/opcode/mips.h b/include/opcode/mips.h +index ceae9ec50a..276ee3c6c1 100644 +--- a/include/opcode/mips.h ++++ b/include/opcode/mips.h +@@ -1259,6 +1259,8 @@ static const unsigned int mips_isa_table[] = { + #define INSN_XLR 0x00000020 + /* Imagination interAptiv MR2. */ + #define INSN_INTERAPTIV_MR2 0x04000000 ++/* Netlogic XlP instruction */ ++#define INSN_XLP 0x00000080 + + /* DSP ASE */ + #define ASE_DSP 0x00000001 +@@ -1365,6 +1367,7 @@ static const unsigned int mips_isa_table[] = { + #define CPU_OCTEON3 6503 + #define CPU_XLR 887682 /* decimal 'XLR' */ + #define CPU_INTERAPTIV_MR2 736550 /* decimal 'IA2' */ ++#define CPU_XLP 887680 /* decimal 'XLP' */ + + /* Return true if the given CPU is included in INSN_* mask MASK. */ + +@@ -1445,6 +1448,9 @@ cpu_is_member (int cpu, unsigned int mask) + return ((mask & INSN_ISA_MASK) == INSN_ISA32R6) + || ((mask & INSN_ISA_MASK) == INSN_ISA64R6); + ++ case CPU_XLP: ++ return (mask & INSN_XLP) != 0; ++ + default: + return FALSE; + } +diff --git a/ld/configure.tgt b/ld/configure.tgt +index fe7b9238b2..2adf108b17 100644 +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -516,6 +516,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*) + mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) + targ_emul=elf32btsmip + targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;; ++mipsisa64*-*-elf*) targ_emul=elf32btsmip ++ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;; + mips64*el-ps2-elf*) targ_emul=elf32lr5900n32 + targ_extra_emuls="elf32lr5900" + targ_extra_libpath=$targ_extra_emuls ;; +diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c +index 45195007c1..4a80a05d19 100644 +--- a/opcodes/mips-dis.c ++++ b/opcodes/mips-dis.c +@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] = + mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), + mips_cp1_names_mips3264, mips_hwr_names_numeric }, + +- /* XLP is mostly like XLR, with the prominent exception it is being +- MIPS64R2. */ +- { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR, +- ISA_MIPS64R2 | INSN_XLR, 0, +- mips_cp0_names_xlr, +- mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), +- mips_cp1_names_mips3264, mips_hwr_names_numeric }, ++ { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP, ++ ISA_MIPS64R2 | INSN_XLP, 0, ++ mips_cp0_names_mips3264r2, ++ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2), ++ mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 }, + + /* This entry, mips16, is here only for ISA/processor selection; do + not print its name. */ +diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c +index 19fca408c9..d02069c528 100644 +--- a/opcodes/mips-opc.c ++++ b/opcodes/mips-opc.c +@@ -328,6 +328,7 @@ decode_mips_operand (const char *p) + #define IOCT3 INSN_OCTEON3 + #define XLR INSN_XLR + #define IAMR2 INSN_INTERAPTIV_MR2 ++#define XLP INSN_XLP + #define IVIRT ASE_VIRT + #define IVIRT64 ASE_VIRT64 + +@@ -966,6 +967,7 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, + {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 }, + {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, ++{"crc", "d,s,t", 0x7000001c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, + /* ctc0 is at the bottom of the table. */ + {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, + {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, +@@ -998,12 +1000,13 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 }, + {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 }, + {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 }, +-{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR, 0, 0 }, ++{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR|XLP, 0, 0 }, + {"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5, 0, 0 }, + {"dclo", "d,s", 0x00000053, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 }, + {"dclo", "U,s", 0x70000025, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 }, + {"dclz", "d,s", 0x00000052, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 }, + {"dclz", "U,s", 0x70000024, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 }, ++{"dcrc", "d,s,t", 0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, + /* dctr and dctw are used on the r5000. */ + {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, + {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, +@@ -1075,6 +1078,7 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 }, + {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, + {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, ++{"dmfur", "t,d", 0x7000001e, 0xffe007ff, WR_1, 0, XLP, 0, 0 }, + {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 }, + {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 }, + {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE }, +@@ -1090,6 +1094,8 @@ const struct mips_opcode mips_builtin_opcodes[] = + /* dmfc3 is at the bottom of the table. */ + /* dmtc3 is at the bottom of the table. */ + {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, ++{"dmtur", "t,d", 0x7000001f, 0xffe007ff, RD_1, 0, XLP, 0, 0 }, ++{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, + {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, + {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 }, + {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 }, +@@ -1243,9 +1249,9 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 }, + {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 }, + {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 }, +-{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, +-{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, +-{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, ++{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, ++{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, ++{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, + {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, + {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, + {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF }, +@@ -1410,7 +1416,7 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 }, + {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 }, + {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 }, +-{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1|RD_2, 0, XLR, 0, 0 }, ++{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR|XLP, 0, 0 }, + {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 }, + {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 }, + {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 }, +@@ -1455,10 +1461,13 @@ const struct mips_opcode mips_builtin_opcodes[] = + /* move is at the top of the table. */ + {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 }, + {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 }, ++{"msgsnds", "d,t", 0x4a000001, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, + {"msgld", "", 0, (int) M_MSGLD, INSN_MACRO, 0, XLR, 0, 0 }, + {"msgld", "t", 0, (int) M_MSGLD_T, INSN_MACRO, 0, XLR, 0, 0 }, +-{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR, 0, 0 }, +-{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR, 0, 0 }, ++{"msglds", "d,t", 0x4a000002, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, ++{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR|XLP, 0, 0 }, ++{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR|XLP, 0, 0 }, ++{"msgsync", "", 0x4a000004, 0xffffffff,0, 0, XLP, 0, 0 }, + {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 }, + {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 }, + {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 }, +@@ -1508,7 +1517,7 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 }, + {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 }, + {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 }, +-{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 }, ++{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 }, + {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, + {"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 }, + {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, +@@ -1945,9 +1954,9 @@ const struct mips_opcode mips_builtin_opcodes[] = + {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37}, + {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 }, + {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 }, +-{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, +-{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, +-{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, ++{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, ++{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, ++{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, + {"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, + {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, + {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 }, +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 2ac101c95..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f43f832e0009caea6a3d5bcaa8f0a64d943072ea Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:44:14 +0000 -Subject: [PATCH 12/15] Change default emulation for mips64*-*-linux - -we change the default emulations to be N64 instead of N32 - -Upstream-Status: Inappropriate [ OE configuration Specific] - -Signed-off-by: Khem Raj ---- - bfd/config.bfd | 8 ++++---- - ld/configure.tgt | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/bfd/config.bfd b/bfd/config.bfd -index 1b28016b91..63596c2ebc 100644 ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -1183,12 +1183,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_be_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec -diff --git a/ld/configure.tgt b/ld/configure.tgt -index b85c6bb35a..4e77383a19 100644 ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -518,11 +518,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch deleted file mode 100644 index b03e04608..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch +++ /dev/null @@ -1,399 +0,0 @@ -From fc6fa6a6e6e9e6e5ad7080785af31b4ea68f60c4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 14 Feb 2016 17:06:19 +0000 -Subject: [PATCH 13/15] Add support for Netlogic XLP - -Patch From: Nebu Philips - -Using the mipsisa64r2nlm target, add support for XLP from -Netlogic. Also, update vendor name to NLM wherever applicable. - -Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been -assigned to INSN_OCTEON3 - -Signed-off-by: Khem Raj -Signed-off-by: Baoshan Pang -Signed-off-by: Mark Hatle ---- -Upstream-Status: Pending - - bfd/aoutx.h | 1 + - bfd/archures.c | 1 + - bfd/bfd-in2.h | 1 + - bfd/config.bfd | 5 +++++ - bfd/cpu-mips.c | 6 ++++-- - bfd/elfxx-mips.c | 8 ++++++++ - binutils/readelf.c | 1 + - gas/config/tc-mips.c | 4 +++- - gas/configure | 3 +++ - include/elf/mips.h | 1 + - include/opcode/mips.h | 10 ++++++++-- - ld/configure.tgt | 2 ++ - opcodes/mips-dis.c | 12 +++++------- - opcodes/mips-opc.c | 33 +++++++++++++++++++++------------ - 14 files changed, 64 insertions(+), 24 deletions(-) - -diff --git a/bfd/aoutx.h b/bfd/aoutx.h -index d30e8b8fbc..913b499744 100644 ---- a/bfd/aoutx.h -+++ b/bfd/aoutx.h -@@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, - case bfd_mach_mipsisa64r6: - case bfd_mach_mips_sb1: - case bfd_mach_mips_xlr: -+ case bfd_mach_mips_xlp: - /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */ - arch_flags = M_MIPS2; - break; -diff --git a/bfd/archures.c b/bfd/archures.c -index 6f35a5b2a7..d12cdf609a 100644 ---- a/bfd/archures.c -+++ b/bfd/archures.c -@@ -197,6 +197,7 @@ DESCRIPTION - .#define bfd_mach_mips_octeon2 6502 - .#define bfd_mach_mips_octeon3 6503 - .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *} -+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *} - .#define bfd_mach_mipsisa32 32 - .#define bfd_mach_mipsisa32r2 33 - .#define bfd_mach_mipsisa32r3 34 -diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h -index 6288c3bb4a..e9f9859a7b 100644 ---- a/bfd/bfd-in2.h -+++ b/bfd/bfd-in2.h -@@ -2041,6 +2041,7 @@ enum bfd_architecture - #define bfd_mach_mips_octeon2 6502 - #define bfd_mach_mips_octeon3 6503 - #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ -+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */ - #define bfd_mach_mipsisa32 32 - #define bfd_mach_mipsisa32r2 33 - #define bfd_mach_mipsisa32r3 34 -diff --git a/bfd/config.bfd b/bfd/config.bfd -index 63596c2ebc..6e923fb0ed 100644 ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -1166,6 +1166,11 @@ case "${targ}" in - targ_defvec=mips_elf32_le_vec - targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec" - ;; -+ mipsisa64*-*-elf*) -+ targ_defvec=mips_elf32_trad_be_vec -+ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ want64=true -+ ;; - mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none) - targ_defvec=mips_elf32_be_vec - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" -diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c -index b9ecdd6e55..df1bffc25b 100644 ---- a/bfd/cpu-mips.c -+++ b/bfd/cpu-mips.c -@@ -104,7 +104,8 @@ enum - I_mipsocteon2, - I_mipsocteon3, - I_xlr, -- I_micromips -+ I_micromips, -+ I_xlp - }; - - #define NN(index) (&arch_info_struct[(index) + 1]) -@@ -155,7 +156,8 @@ static const bfd_arch_info_type arch_info_struct[] = - N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)), - N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)), - N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), -- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0) -+ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)), -+ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, 0) - }; - - /* The default architecture is mips:3000, but with a machine number of -diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c -index 723853f821..7b464211c3 100644 ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -6787,6 +6787,9 @@ _bfd_elf_mips_mach (flagword flags) - case E_MIPS_MACH_XLR: - return bfd_mach_mips_xlr; - -+ case E_MIPS_MACH_XLP: -+ return bfd_mach_mips_xlp; -+ - default: - switch (flags & EF_MIPS_ARCH) - { -@@ -12106,6 +12109,10 @@ mips_set_isa_flags (bfd *abfd) - val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2; - break; - -+ case bfd_mach_mips_xlp: -+ val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP; -+ break; -+ - case bfd_mach_mipsisa32: - val = E_MIPS_ARCH_32; - break; -@@ -14135,6 +14142,7 @@ static const struct mips_mach_extension mips_mach_extensions[] = - { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, - { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, - { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 }, -+ { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 }, - - /* MIPS64 extensions. */ - { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 }, -diff --git a/binutils/readelf.c b/binutils/readelf.c -index 8dca490226..b5f577f5a1 100644 ---- a/binutils/readelf.c -+++ b/binutils/readelf.c -@@ -3261,6 +3261,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) - case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break; - case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break; - case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break; -+ case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break; - case 0: - /* We simply ignore the field in this case to avoid confusion: - MIPS ELF does not specify EF_MIPS_MACH, it is a GNU -diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c -index e24e84df54..baf84e419d 100644 ---- a/gas/config/tc-mips.c -+++ b/gas/config/tc-mips.c -@@ -552,6 +552,7 @@ static int mips_32bitmode = 0; - || mips_opts.arch == CPU_RM7000 \ - || mips_opts.arch == CPU_VR5500 \ - || mips_opts.micromips \ -+ || mips_opts.arch == CPU_XLP \ - ) - - /* Whether the processor uses hardware interlocks to protect reads -@@ -581,6 +582,7 @@ static int mips_32bitmode = 0; - && mips_opts.isa != ISA_MIPS3) \ - || mips_opts.arch == CPU_R4300 \ - || mips_opts.micromips \ -+ || mips_opts.arch == CPU_XLP \ - ) - - /* Whether the processor uses hardware interlocks to protect reads -@@ -19409,7 +19411,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] = - /* Broadcom XLP. - XLP is mostly like XLR, with the prominent exception that it is - MIPS64R2 rather than MIPS64. */ -- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR }, -+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP }, - - /* MIPS 64 Release 6 */ - { "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6}, -diff --git a/gas/configure b/gas/configure -index a36f1ae161..99f0a94e20 100755 ---- a/gas/configure -+++ b/gas/configure -@@ -12989,6 +12989,9 @@ _ACEOF - mipsisa64r6 | mipsisa64r6el) - mips_cpu=mips64r6 - ;; -+ mipsisa64r2nlm | mipsisa64r2nlmel) -+ mips_cpu=xlp -+ ;; - mipstx39 | mipstx39el) - mips_cpu=r3900 - ;; -diff --git a/include/elf/mips.h b/include/elf/mips.h -index 3e27b05122..81ea78a817 100644 ---- a/include/elf/mips.h -+++ b/include/elf/mips.h -@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext) - #define E_MIPS_MACH_SB1 0x008a0000 - #define E_MIPS_MACH_OCTEON 0x008b0000 - #define E_MIPS_MACH_XLR 0x008c0000 -+#define E_MIPS_MACH_XLP 0x008f0000 - #define E_MIPS_MACH_OCTEON2 0x008d0000 - #define E_MIPS_MACH_OCTEON3 0x008e0000 - #define E_MIPS_MACH_5400 0x00910000 -diff --git a/include/opcode/mips.h b/include/opcode/mips.h -index 0d043d9520..450e9c2d67 100644 ---- a/include/opcode/mips.h -+++ b/include/opcode/mips.h -@@ -1244,8 +1244,10 @@ static const unsigned int mips_isa_table[] = { - #define INSN_LOONGSON_2F 0x80000000 - /* Loongson 3A. */ - #define INSN_LOONGSON_3A 0x00000400 --/* RMI Xlr instruction */ --#define INSN_XLR 0x00000020 -+/* Netlogic Xlr instruction */ -+#define INSN_XLR 0x00000020 -+/* Netlogic XlP instruction */ -+#define INSN_XLP 0x00000080 - - /* DSP ASE */ - #define ASE_DSP 0x00000001 -@@ -1344,6 +1346,7 @@ static const unsigned int mips_isa_table[] = { - #define CPU_OCTEON2 6502 - #define CPU_OCTEON3 6503 - #define CPU_XLR 887682 /* decimal 'XLR' */ -+#define CPU_XLP 887680 /* decimal 'XLP' */ - - /* Return true if the given CPU is included in INSN_* mask MASK. */ - -@@ -1421,6 +1424,9 @@ cpu_is_member (int cpu, unsigned int mask) - return ((mask & INSN_ISA_MASK) == INSN_ISA32R6) - || ((mask & INSN_ISA_MASK) == INSN_ISA64R6); - -+ case CPU_XLP: -+ return (mask & INSN_XLP) != 0; -+ - default: - return FALSE; - } -diff --git a/ld/configure.tgt b/ld/configure.tgt -index 4e77383a19..8a81f7ac39 100644 ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -504,6 +504,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*) - mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) - targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;; -+mipsisa64*-*-elf*) targ_emul=elf32btsmip -+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;; - mips64*el-ps2-elf*) targ_emul=elf32lr5900n32 - targ_extra_emuls="elf32lr5900" - targ_extra_libpath=$targ_extra_emuls ;; -diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c -index bb9912e462..70ecc51717 100644 ---- a/opcodes/mips-dis.c -+++ b/opcodes/mips-dis.c -@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] = - mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), - mips_cp1_names_mips3264, mips_hwr_names_numeric }, - -- /* XLP is mostly like XLR, with the prominent exception it is being -- MIPS64R2. */ -- { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR, -- ISA_MIPS64R2 | INSN_XLR, 0, -- mips_cp0_names_xlr, -- mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), -- mips_cp1_names_mips3264, mips_hwr_names_numeric }, -+ { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP, -+ ISA_MIPS64R2 | INSN_XLP, 0, -+ mips_cp0_names_mips3264r2, -+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2), -+ mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 }, - - /* This entry, mips16, is here only for ISA/processor selection; do - not print its name. */ -diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c -index 5cb8e7365f..f2074856a2 100644 ---- a/opcodes/mips-opc.c -+++ b/opcodes/mips-opc.c -@@ -320,7 +320,8 @@ decode_mips_operand (const char *p) - #define IOCTP (INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3) - #define IOCT2 (INSN_OCTEON2 | INSN_OCTEON3) - #define IOCT3 INSN_OCTEON3 --#define XLR INSN_XLR -+#define XLR INSN_XLR -+#define XLP INSN_XLP - #define IVIRT ASE_VIRT - #define IVIRT64 ASE_VIRT64 - -@@ -958,6 +959,7 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, - {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 }, - {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, -+{"crc", "d,s,t", 0x7000001c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, - /* ctc0 is at the bottom of the table. */ - {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, - {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, -@@ -990,12 +992,13 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 }, - {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 }, - {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 }, --{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR, 0, 0 }, -+{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR|XLP, 0, 0 }, - {"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5, 0, 0 }, - {"dclo", "d,s", 0x00000053, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 }, - {"dclo", "U,s", 0x70000025, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 }, - {"dclz", "d,s", 0x00000052, 0xfc1f07ff, WR_1|RD_2, 0, I69, 0, 0 }, - {"dclz", "U,s", 0x70000024, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, I69 }, -+{"dcrc", "d,s,t", 0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, - /* dctr and dctw are used on the r5000. */ - {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, - {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, -@@ -1067,6 +1070,7 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 }, - {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, - {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, -+{"dmfur", "t,d", 0x7000001e, 0xffe007ff, WR_1, 0, XLP, 0, 0 }, - {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 }, - {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 }, - {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE }, -@@ -1082,6 +1086,8 @@ const struct mips_opcode mips_builtin_opcodes[] = - /* dmfc3 is at the bottom of the table. */ - /* dmtc3 is at the bottom of the table. */ - {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, -+{"dmtur", "t,d", 0x7000001f, 0xffe007ff, RD_1, 0, XLP, 0, 0 }, -+{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, - {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, - {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 }, - {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 }, -@@ -1235,9 +1241,9 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 }, - {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 }, - {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 }, --{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, --{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, --{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, -+{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, -+{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, -+{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, - {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, - {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, - {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF }, -@@ -1402,7 +1408,7 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 }, - {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 }, - {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 }, --{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1|RD_2, 0, XLR, 0, 0 }, -+{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR|XLP, 0, 0 }, - {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 }, - {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 }, - {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 }, -@@ -1447,10 +1453,13 @@ const struct mips_opcode mips_builtin_opcodes[] = - /* move is at the top of the table. */ - {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 }, - {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 }, -+{"msgsnds", "d,t", 0x4a000001, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, - {"msgld", "", 0, (int) M_MSGLD, INSN_MACRO, 0, XLR, 0, 0 }, - {"msgld", "t", 0, (int) M_MSGLD_T, INSN_MACRO, 0, XLR, 0, 0 }, --{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR, 0, 0 }, --{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR, 0, 0 }, -+{"msglds", "d,t", 0x4a000002, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, -+{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR|XLP, 0, 0 }, -+{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR|XLP, 0, 0 }, -+{"msgsync", "", 0x4a000004, 0xffffffff,0, 0, XLP, 0, 0 }, - {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 }, - {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 }, - {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 }, -@@ -1500,7 +1509,7 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 }, - {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 }, - {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 }, --{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 }, -+{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 }, - {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, - {"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 }, - {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, -@@ -1937,9 +1946,9 @@ const struct mips_opcode mips_builtin_opcodes[] = - {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37}, - {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 }, - {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 }, --{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, --{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, --{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM, 0, XLR, 0, 0 }, -+{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, -+{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, -+{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, - {"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, - {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, - {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 }, --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch new file mode 100644 index 000000000..247376b7e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch @@ -0,0 +1,36 @@ +From e46202becab625c6c08caf91e08ccbbc1bf799c4 Mon Sep 17 00:00:00 2001 +From: Zhenhua Luo +Date: Sat, 11 Jun 2016 22:08:29 -0500 +Subject: [PATCH 13/15] fix the incorrect assembling for ppc wait mnemonic + +Signed-off-by: Zhenhua Luo + +Upstream-Status: Pending +--- + opcodes/ppc-opc.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c +index 426261ab21..0d35916cdd 100644 +--- a/opcodes/ppc-opc.c ++++ b/opcodes/ppc-opc.c +@@ -4881,7 +4881,6 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}}, + + {"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}}, +-{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}}, + + {"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}}, + +@@ -4935,7 +4934,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { + + {"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}}, + {"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}}, +-{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}}, ++{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}}, + + {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}}, + +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch new file mode 100644 index 000000000..42b1065f8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch @@ -0,0 +1,50 @@ +From bf20d5823662d1f2eb47de2cdfd173627a205b17 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 31 Mar 2017 11:42:03 -0700 +Subject: [PATCH 14/15] Detect 64-bit MIPS targets + +Add mips64 target triplets and default to N64 + +Upstream-Status: Submitted +https://sourceware.org/ml/binutils/2016-08/msg00048.html + +Signed-off-by: Khem Raj +--- + gold/configure.tgt | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/gold/configure.tgt b/gold/configure.tgt +index 3d63027297..c1f92a1360 100644 +--- a/gold/configure.tgt ++++ b/gold/configure.tgt +@@ -153,6 +153,13 @@ aarch64*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*el*-*-*|mips*64*le*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS_RS3_LE ++ targ_size=64 ++ targ_big_endian=false ++ targ_extra_big_endian=true ++ ;; + mips*el*-*-*|mips*le*-*-*) + targ_obj=mips + targ_machine=EM_MIPS_RS3_LE +@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS ++ targ_size=64 ++ targ_big_endian=true ++ targ_extra_big_endian=false ++ ;; + mips*-*-*) + targ_obj=mips + targ_machine=EM_MIPS +-- +2.14.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch deleted file mode 100644 index bb95a0cb0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a9177150f808d7e6285e1011c85d0ce89037b553 Mon Sep 17 00:00:00 2001 -From: Zhenhua Luo -Date: Sat, 11 Jun 2016 22:08:29 -0500 -Subject: [PATCH 14/15] fix the incorrect assembling for ppc wait mnemonic - -Signed-off-by: Zhenhua Luo - -Upstream-Status: Pending ---- - opcodes/ppc-opc.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c -index 30fd789182..f2708e2276 100644 ---- a/opcodes/ppc-opc.c -+++ b/opcodes/ppc-opc.c -@@ -4876,7 +4876,6 @@ const struct powerpc_opcode powerpc_opcodes[] = { - {"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}}, - - {"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}}, --{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}}, - - {"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}}, - -@@ -4930,7 +4929,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - - {"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}}, - {"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}}, --{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}}, -+{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}}, - - {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}}, - --- -2.12.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch index 1559038e5..2c8900cb6 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch @@ -1,4 +1,4 @@ -From 58cdb28ed71cb57b4a0ea1b412a708fdb0f84c27 Mon Sep 17 00:00:00 2001 +From 9b456a0e4f284fd41ac36595144ed44dc82410ee Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 6 Mar 2017 23:33:27 -0800 Subject: [PATCH 15/15] sync with OE libtool changes @@ -85,5 +85,5 @@ index 11ee684ccc..3b19ac1532 100644 elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in -- -2.12.0 +2.14.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch deleted file mode 100644 index 1b2eb8485..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c3ebde5d8cc3b0092966b4d725cad7cfd074fd8d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 31 Mar 2017 11:42:03 -0700 -Subject: [PATCH 16/16] Detect 64-bit MIPS targets - -Add mips64 target triplets and default to N64 - -Upstream-Status: Submitted -https://sourceware.org/ml/binutils/2016-08/msg00048.html - -Signed-off-by: Khem Raj ---- - gold/configure.tgt | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/gold/configure.tgt b/gold/configure.tgt -index 3d63027297..c1f92a1360 100644 ---- a/gold/configure.tgt -+++ b/gold/configure.tgt -@@ -153,6 +153,13 @@ aarch64*-*) - targ_big_endian=false - targ_extra_big_endian=true - ;; -+mips*64*el*-*-*|mips*64*le*-*-*) -+ targ_obj=mips -+ targ_machine=EM_MIPS_RS3_LE -+ targ_size=64 -+ targ_big_endian=false -+ targ_extra_big_endian=true -+ ;; - mips*el*-*-*|mips*le*-*-*) - targ_obj=mips - targ_machine=EM_MIPS_RS3_LE -@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*) - targ_big_endian=false - targ_extra_big_endian=true - ;; -+mips*64*-*-*) -+ targ_obj=mips -+ targ_machine=EM_MIPS -+ targ_size=64 -+ targ_big_endian=true -+ targ_extra_big_endian=false -+ ;; - mips*-*-*) - targ_obj=mips - targ_machine=EM_MIPS --- -2.12.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch deleted file mode 100644 index 23ad10ab4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 3239a4231ff79bf8b67b8faaf414b1667486167c Mon Sep 17 00:00:00 2001 -From: Andrew Burgess -Date: Mon, 19 Dec 2016 15:27:59 +0000 -Subject: [PATCH] bfd: Improve lookup of file / line information for errors - -When looking up file and line information (used from the linker to -report error messages) if no symbol is passed in, then use the symbol -list to look for a matching symbol. - -If a matching symbol is found then use this to look up the file / line -information. - -This should improve errors when looking up file / line information for -data sections. Hopefully we should find a matching data symbol, which -should, in turn (we hope) match a DW_TAG_variable in the DWARF, this -should allow us to give accurate file / line errors for data symbols. - -As the hope is to find a matching DW_TAG_variable in the DWARF then we -ignore section symbols, and prefer global symbols to locals. - -CVE: CVE-2017-8392 -Upstream-Status: Accepted - -Signed-off-by: Fan Xin ---- - bfd/dwarf2.c | 32 ++++++++++++++++++++++++++++++++ - 1 files changed, 32 insertions(+) - - -diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c -index 03447a9..9bb8126 100644 ---- a/bfd/dwarf2.c -+++ b/bfd/dwarf2.c -@@ -4155,6 +4155,38 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, - { - BFD_ASSERT (section != NULL && functionname_ptr != NULL); - addr = offset; -+ -+ /* If we have no SYMBOL but the section we're looking at is not a -+ code section, then take a look through the list of symbols to see -+ if we have a symbol at the address we're looking for. If we do -+ then use this to look up line information. This will allow us to -+ give file and line results for data symbols. We exclude code -+ symbols here, if we look up a function symbol and then look up the -+ line information we'll actually return the line number for the -+ opening '{' rather than the function definition line. This is -+ because looking up by symbol uses the line table, in which the -+ first line for a function is usually the opening '{', while -+ looking up the function by section + offset uses the -+ DW_AT_decl_line from the function DW_TAG_subprogram for the line, -+ which will be the line of the function name. */ -+ if ((section->flags & SEC_CODE) == 0) -+ { -+ asymbol **tmp; -+ -+ for (tmp = symbols; (*tmp) != NULL; ++tmp) -+ if ((*tmp)->the_bfd == abfd -+ && (*tmp)->section == section -+ && (*tmp)->value == offset -+ && ((*tmp)->flags & BSF_SECTION_SYM) == 0) -+ { -+ symbol = *tmp; -+ do_line = TRUE; -+ /* For local symbols, keep going in the hope we find a -+ global. */ -+ if ((symbol->flags & BSF_GLOBAL) != 0) -+ break; -+ } -+ } - } - - if (section->output_section) --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch deleted file mode 100644 index acb37df16..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 97e83a100aa8250be783304bfe0429761c6e6b6b Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sun, 23 Apr 2017 13:55:49 +0930 -Subject: [PATCH] PR 21409, segfault in _bfd_dwarf2_find_nearest_line - - PR 21409 - * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when - no symbols. - -CVE: CVE-2017-8392 -Upstream-Status: Accepted - -Signed-off-by: Fan Xin ---- - bfd/dwarf2.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletion(-) - -diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c -index 132a674..0ef3e1f 100644 ---- a/bfd/dwarf2.c -+++ b/bfd/dwarf2.c -@@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, - looking up the function by section + offset uses the - DW_AT_decl_line from the function DW_TAG_subprogram for the line, - which will be the line of the function name. */ -- if ((section->flags & SEC_CODE) == 0) -+ if (symbols != NULL && (section->flags & SEC_CODE) == 0) - { - asymbol **tmp; - --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch deleted file mode 100644 index 1334c9444..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch +++ /dev/null @@ -1,124 +0,0 @@ -From bdc5166c274b842f83f8328e7cfaaf80fd29934e Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 13 Feb 2017 13:08:32 +0000 -Subject: [PATCH 1/2] Fix readelf writing to illegal addresses whilst - processing corrupt input files containing symbol-difference relocations. - - PR binutils/21137 - * readelf.c (target_specific_reloc_handling): Add end parameter. - Check for buffer overflow before writing relocated values. - (apply_relocations): Pass end to target_specific_reloc_handling. - -(cherry pick from commit 03f7786e2f440b9892b1c34a58fb26222ce1b493) -Upstream-Status: Backport [master] -CVE: CVE-2017-6965 - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 7 +++++++ - binutils/readelf.c | 30 +++++++++++++++++++++++++----- - 2 files changed, 32 insertions(+), 5 deletions(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index f21867f98c..e789a3b99b 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,10 @@ -+2017-02-13 Nick Clifton -+ -+ PR binutils/21137 -+ * readelf.c (target_specific_reloc_handling): Add end parameter. -+ Check for buffer overflow before writing relocated values. -+ (apply_relocations): Pass end to target_specific_reloc_handling. -+ - 2017-03-02 Tristan Gingold - - * configure: Regenerate. -diff --git a/binutils/readelf.c b/binutils/readelf.c -index b5f577f5a1..8cdaae3b8c 100644 ---- a/binutils/readelf.c -+++ b/binutils/readelf.c -@@ -11585,6 +11585,7 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED) - static bfd_boolean - target_specific_reloc_handling (Elf_Internal_Rela * reloc, - unsigned char * start, -+ unsigned char * end, - Elf_Internal_Sym * symtab) - { - unsigned int reloc_type = get_reloc_type (reloc->r_info); -@@ -11625,13 +11626,19 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - handle_sym_diff: - if (saved_sym != NULL) - { -+ int reloc_size = reloc_type == 1 ? 4 : 2; - bfd_vma value; - - value = reloc->r_addend - + (symtab[get_reloc_symindex (reloc->r_info)].st_value - - saved_sym->st_value); - -- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2); -+ if (start + reloc->r_offset + reloc_size >= end) -+ /* PR 21137 */ -+ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + reloc_size, end); -+ else -+ byte_put (start + reloc->r_offset, value, reloc_size); - - saved_sym = NULL; - return TRUE; -@@ -11662,13 +11669,18 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - case 2: /* R_MN10300_16 */ - if (saved_sym != NULL) - { -+ int reloc_size = reloc_type == 1 ? 4 : 2; - bfd_vma value; - - value = reloc->r_addend - + (symtab[get_reloc_symindex (reloc->r_info)].st_value - - saved_sym->st_value); - -- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2); -+ if (start + reloc->r_offset + reloc_size >= end) -+ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + reloc_size, end); -+ else -+ byte_put (start + reloc->r_offset, value, reloc_size); - - saved_sym = NULL; - return TRUE; -@@ -11703,12 +11715,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - break; - - case 0x41: /* R_RL78_ABS32. */ -- byte_put (start + reloc->r_offset, value, 4); -+ if (start + reloc->r_offset + 4 >= end) -+ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + 2, end); -+ else -+ byte_put (start + reloc->r_offset, value, 4); - value = 0; - return TRUE; - - case 0x43: /* R_RL78_ABS16. */ -- byte_put (start + reloc->r_offset, value, 2); -+ if (start + reloc->r_offset + 2 >= end) -+ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + 2, end); -+ else -+ byte_put (start + reloc->r_offset, value, 2); - value = 0; - return TRUE; - -@@ -12325,7 +12345,7 @@ apply_relocations (void * file, - - reloc_type = get_reloc_type (rp->r_info); - -- if (target_specific_reloc_handling (rp, start, symtab)) -+ if (target_specific_reloc_handling (rp, start, end, symtab)) - continue; - else if (is_none_reloc (reloc_type)) - continue; --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch deleted file mode 100644 index dd58df5fb..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch +++ /dev/null @@ -1,241 +0,0 @@ -From 383ec757d27652448d1511169e1133f486abf54f Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 13 Feb 2017 14:03:22 +0000 -Subject: [PATCH] Fix read-after-free error in readelf when processing - multiple, relocated sections in an MSP430 binary. - - PR binutils/21139 - * readelf.c (target_specific_reloc_handling): Add num_syms - parameter. Check for symbol table overflow before accessing - symbol value. If reloc pointer is NULL, discard all saved state. - (apply_relocations): Pass num_syms to target_specific_reloc_handling. - Call target_specific_reloc_handling with a NULL reloc pointer - after processing all of the relocs. - -(cherry pick from commit f84ce13b6708801ca1d6289b7c4003e2f5a6d7f9) -Upstream-Status: Backport [master] -CVE: CVE-2017-6966 - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 10 +++++ - binutils/readelf.c | 109 +++++++++++++++++++++++++++++++++++++++++------------ - 2 files changed, 94 insertions(+), 25 deletions(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index e789a3b99b..bd63c8a0d8 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,5 +1,15 @@ - 2017-02-13 Nick Clifton - -+ PR binutils/21139 -+ * readelf.c (target_specific_reloc_handling): Add num_syms -+ parameter. Check for symbol table overflow before accessing -+ symbol value. If reloc pointer is NULL, discard all saved state. -+ (apply_relocations): Pass num_syms to target_specific_reloc_handling. -+ Call target_specific_reloc_handling with a NULL reloc pointer -+ after processing all of the relocs. -+ -+2017-02-13 Nick Clifton -+ - PR binutils/21137 - * readelf.c (target_specific_reloc_handling): Add end parameter. - Check for buffer overflow before writing relocated values. -diff --git a/binutils/readelf.c b/binutils/readelf.c -index 8cdaae3b8c..7c158c6342 100644 ---- a/binutils/readelf.c -+++ b/binutils/readelf.c -@@ -11580,15 +11580,27 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED) - - /* Check to see if the given reloc needs to be handled in a target specific - manner. If so then process the reloc and return TRUE otherwise return -- FALSE. */ -+ FALSE. -+ -+ If called with reloc == NULL, then this is a signal that reloc processing -+ for the current section has finished, and any saved state should be -+ discarded. */ - - static bfd_boolean - target_specific_reloc_handling (Elf_Internal_Rela * reloc, - unsigned char * start, - unsigned char * end, -- Elf_Internal_Sym * symtab) -+ Elf_Internal_Sym * symtab, -+ unsigned long num_syms) - { -- unsigned int reloc_type = get_reloc_type (reloc->r_info); -+ unsigned int reloc_type = 0; -+ unsigned long sym_index = 0; -+ -+ if (reloc) -+ { -+ reloc_type = get_reloc_type (reloc->r_info); -+ sym_index = get_reloc_symindex (reloc->r_info); -+ } - - switch (elf_header.e_machine) - { -@@ -11597,6 +11609,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - { - static Elf_Internal_Sym * saved_sym = NULL; - -+ if (reloc == NULL) -+ { -+ saved_sym = NULL; -+ return TRUE; -+ } -+ - switch (reloc_type) - { - case 10: /* R_MSP430_SYM_DIFF */ -@@ -11604,7 +11622,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - break; - /* Fall through. */ - case 21: /* R_MSP430X_SYM_DIFF */ -- saved_sym = symtab + get_reloc_symindex (reloc->r_info); -+ /* PR 21139. */ -+ if (sym_index >= num_syms) -+ error (_("MSP430 SYM_DIFF reloc contains invalid symbol index %lu\n"), -+ sym_index); -+ else -+ saved_sym = symtab + sym_index; - return TRUE; - - case 1: /* R_MSP430_32 or R_MSP430_ABS32 */ -@@ -11629,16 +11652,21 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - int reloc_size = reloc_type == 1 ? 4 : 2; - bfd_vma value; - -- value = reloc->r_addend -- + (symtab[get_reloc_symindex (reloc->r_info)].st_value -- - saved_sym->st_value); -- -- if (start + reloc->r_offset + reloc_size >= end) -- /* PR 21137 */ -- error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), -- start + reloc->r_offset + reloc_size, end); -+ if (sym_index >= num_syms) -+ error (_("MSP430 reloc contains invalid symbol index %lu\n"), -+ sym_index); - else -- byte_put (start + reloc->r_offset, value, reloc_size); -+ { -+ value = reloc->r_addend + (symtab[sym_index].st_value -+ - saved_sym->st_value); -+ -+ if (start + reloc->r_offset + reloc_size >= end) -+ /* PR 21137 */ -+ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + reloc_size, end); -+ else -+ byte_put (start + reloc->r_offset, value, reloc_size); -+ } - - saved_sym = NULL; - return TRUE; -@@ -11658,13 +11686,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - { - static Elf_Internal_Sym * saved_sym = NULL; - -+ if (reloc == NULL) -+ { -+ saved_sym = NULL; -+ return TRUE; -+ } -+ - switch (reloc_type) - { - case 34: /* R_MN10300_ALIGN */ - return TRUE; - case 33: /* R_MN10300_SYM_DIFF */ -- saved_sym = symtab + get_reloc_symindex (reloc->r_info); -+ if (sym_index >= num_syms) -+ error (_("MN10300_SYM_DIFF reloc contains invalid symbol index %lu\n"), -+ sym_index); -+ else -+ saved_sym = symtab + sym_index; - return TRUE; -+ - case 1: /* R_MN10300_32 */ - case 2: /* R_MN10300_16 */ - if (saved_sym != NULL) -@@ -11672,15 +11711,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - int reloc_size = reloc_type == 1 ? 4 : 2; - bfd_vma value; - -- value = reloc->r_addend -- + (symtab[get_reloc_symindex (reloc->r_info)].st_value -- - saved_sym->st_value); -- -- if (start + reloc->r_offset + reloc_size >= end) -- error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), -- start + reloc->r_offset + reloc_size, end); -+ if (sym_index >= num_syms) -+ error (_("MN10300 reloc contains invalid symbol index %lu\n"), -+ sym_index); - else -- byte_put (start + reloc->r_offset, value, reloc_size); -+ { -+ value = reloc->r_addend + (symtab[sym_index].st_value -+ - saved_sym->st_value); -+ -+ if (start + reloc->r_offset + reloc_size >= end) -+ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), -+ start + reloc->r_offset + reloc_size, end); -+ else -+ byte_put (start + reloc->r_offset, value, reloc_size); -+ } - - saved_sym = NULL; - return TRUE; -@@ -11700,12 +11744,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, - static bfd_vma saved_sym2 = 0; - static bfd_vma value; - -+ if (reloc == NULL) -+ { -+ saved_sym1 = saved_sym2 = 0; -+ return TRUE; -+ } -+ - switch (reloc_type) - { - case 0x80: /* R_RL78_SYM. */ - saved_sym1 = saved_sym2; -- saved_sym2 = symtab[get_reloc_symindex (reloc->r_info)].st_value; -- saved_sym2 += reloc->r_addend; -+ if (sym_index >= num_syms) -+ error (_("RL78_SYM reloc contains invalid symbol index %lu\n"), -+ sym_index); -+ else -+ { -+ saved_sym2 = symtab[sym_index].st_value; -+ saved_sym2 += reloc->r_addend; -+ } - return TRUE; - - case 0x83: /* R_RL78_OPsub. */ -@@ -12345,7 +12401,7 @@ apply_relocations (void * file, - - reloc_type = get_reloc_type (rp->r_info); - -- if (target_specific_reloc_handling (rp, start, end, symtab)) -+ if (target_specific_reloc_handling (rp, start, end, symtab, num_syms)) - continue; - else if (is_none_reloc (reloc_type)) - continue; -@@ -12441,6 +12497,9 @@ apply_relocations (void * file, - } - - free (symtab); -+ /* Let the target specific reloc processing code know that -+ we have finished with these relocs. */ -+ target_specific_reloc_handling (NULL, NULL, NULL, NULL, 0); - - if (relocs_return) - { --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch deleted file mode 100644 index ed5403430..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 1d9a2696903fc59d6a936f4ab4e4407ef329d066 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 17 Feb 2017 15:59:45 +0000 -Subject: Fix illegal memory accesses in readelf when parsing - a corrupt binary. - - PR binutils/21156 - * readelf.c (find_section_in_set): Test for invalid section - indicies. - -CVE: CVE-2017-6969 -Upstream-Status: Backport [master] - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 6 ++++++ - binutils/readelf.c | 10 ++++++++-- - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index bd63c8a0d8..1d840b42f9 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,9 @@ -+2017-02-17 Nick Clifton -+ -+ PR binutils/21156 -+ * readelf.c (find_section_in_set): Test for invalid section -+ indicies. -+ - 2017-02-13 Nick Clifton - - PR binutils/21139 -diff --git a/binutils/readelf.c b/binutils/readelf.c -index 7c158c6342..4960491c5c 100644 ---- a/binutils/readelf.c -+++ b/binutils/readelf.c -@@ -675,8 +675,14 @@ find_section_in_set (const char * name, unsigned int * set) - if (set != NULL) - { - while ((i = *set++) > 0) -- if (streq (SECTION_NAME (section_headers + i), name)) -- return section_headers + i; -+ { -+ /* See PR 21156 for a reproducer. */ -+ if (i >= elf_header.e_shnum) -+ continue; /* FIXME: Should we issue an error message ? */ -+ -+ if (streq (SECTION_NAME (section_headers + i), name)) -+ return section_headers + i; -+ } - } - - return find_section (name); --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch deleted file mode 100644 index 59a5dec67..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch +++ /dev/null @@ -1,122 +0,0 @@ -From ef81126314f67472a46db9581530fbf5ccb6b3f2 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 20 Feb 2017 14:40:39 +0000 -Subject: Fix another memory access error in readelf when - parsing a corrupt binary. - - PR binutils/21156 - * dwarf.c (cu_tu_indexes_read): Move into... - (load_cu_tu_indexes): ... here. Change the variable into - tri-state. Change the function into boolean, returning - false if the indicies could not be loaded. - (find_cu_tu_set): Return NULL if the indicies could not be - loaded. - -CVE: CVE-2017-6969 -Upstream-Status: Backport [master] - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 10 ++++++++++ - binutils/dwarf.c | 34 ++++++++++++++++++++-------------- - 2 files changed, 30 insertions(+), 14 deletions(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index 1d840b42f9..53352c1801 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,13 @@ -+2017-02-20 Nick Clifton -+ -+ PR binutils/21156 -+ * dwarf.c (cu_tu_indexes_read): Move into... -+ (load_cu_tu_indexes): ... here. Change the variable into -+ tri-state. Change the function into boolean, returning -+ false if the indicies could not be loaded. -+ (find_cu_tu_set): Return NULL if the indicies could not be -+ loaded. -+ - 2017-02-17 Nick Clifton - - PR binutils/21156 -diff --git a/binutils/dwarf.c b/binutils/dwarf.c -index 0184a7ab2e..6d879c9b61 100644 ---- a/binutils/dwarf.c -+++ b/binutils/dwarf.c -@@ -76,7 +76,6 @@ int dwarf_check = 0; - as a zero-terminated list of section indexes comprising one set of debug - sections from a .dwo file. */ - --static int cu_tu_indexes_read = 0; - static unsigned int *shndx_pool = NULL; - static unsigned int shndx_pool_size = 0; - static unsigned int shndx_pool_used = 0; -@@ -99,7 +98,7 @@ static int tu_count = 0; - static struct cu_tu_set *cu_sets = NULL; - static struct cu_tu_set *tu_sets = NULL; - --static void load_cu_tu_indexes (void *file); -+static bfd_boolean load_cu_tu_indexes (void *); - - /* Values for do_debug_lines. */ - #define FLAG_DEBUG_LINES_RAW 1 -@@ -2715,7 +2714,7 @@ load_debug_info (void * file) - return num_debug_info_entries; - - /* If this is a DWARF package file, load the CU and TU indexes. */ -- load_cu_tu_indexes (file); -+ (void) load_cu_tu_indexes (file); - - if (load_debug_section (info, file) - && process_debug_info (&debug_displays [info].section, file, abbrev, 1, 0)) -@@ -7378,21 +7377,27 @@ process_cu_tu_index (struct dwarf_section *section, int do_display) - section sets that we can use to associate a .debug_info.dwo section - with its associated .debug_abbrev.dwo section in a .dwp file. */ - --static void -+static bfd_boolean - load_cu_tu_indexes (void *file) - { -+ static int cu_tu_indexes_read = -1; /* Tri-state variable. */ -+ - /* If we have already loaded (or tried to load) the CU and TU indexes - then do not bother to repeat the task. */ -- if (cu_tu_indexes_read) -- return; -- -- if (load_debug_section (dwp_cu_index, file)) -- process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0); -- -- if (load_debug_section (dwp_tu_index, file)) -- process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0); -+ if (cu_tu_indexes_read == -1) -+ { -+ cu_tu_indexes_read = TRUE; -+ -+ if (load_debug_section (dwp_cu_index, file)) -+ if (! process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0)) -+ cu_tu_indexes_read = FALSE; -+ -+ if (load_debug_section (dwp_tu_index, file)) -+ if (! process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0)) -+ cu_tu_indexes_read = FALSE; -+ } - -- cu_tu_indexes_read = 1; -+ return (bfd_boolean) cu_tu_indexes_read; - } - - /* Find the set of sections that includes section SHNDX. */ -@@ -7402,7 +7407,8 @@ find_cu_tu_set (void *file, unsigned int shndx) - { - unsigned int i; - -- load_cu_tu_indexes (file); -+ if (! load_cu_tu_indexes (file)) -+ return NULL; - - /* Find SHNDX in the shndx pool. */ - for (i = 0; i < shndx_pool_used; i++) --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch deleted file mode 100644 index 2357a1283..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b2706ceadac7239e7b02d43f05100fc6538b0d65 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 13 Feb 2017 15:04:37 +0000 -Subject: Fix invalid read of section contents whilst processing a corrupt binary. - - PR binutils/21135 - * readelf.c (dump_section_as_bytes): Handle the case where - uncompress_section_contents returns false. - -CVE: CVE-2017-7209 -Upstream-Status: Backport[master] - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 6 ++++++ - binutils/readelf.c | 16 ++++++++++++---- - 2 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index 53352c1801..cf92744c12 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,9 @@ -+2017-02-13 Nick Clifton -+ -+ PR binutils/21135 -+ * readelf.c (dump_section_as_bytes): Handle the case where -+ uncompress_section_contents returns false. -+ - 2017-02-20 Nick Clifton - - PR binutils/21156 -diff --git a/binutils/readelf.c b/binutils/readelf.c -index 4960491c5c..f0e7b080e8 100644 ---- a/binutils/readelf.c -+++ b/binutils/readelf.c -@@ -12803,10 +12803,18 @@ dump_section_as_bytes (Elf_Internal_Shdr * section, - new_size -= 12; - } - -- if (uncompressed_size -- && uncompress_section_contents (& start, uncompressed_size, -- & new_size)) -- section_size = new_size; -+ if (uncompressed_size) -+ { -+ if (uncompress_section_contents (& start, uncompressed_size, -+ & new_size)) -+ section_size = new_size; -+ else -+ { -+ error (_("Unable to decompress section %s\n"), -+ printable_section_name (section)); -+ return; -+ } -+ } - } - - if (relocate) --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch deleted file mode 100644 index 8791792c7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4da598a472e1d298825035e452e3bc68f714311c Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Tue, 14 Feb 2017 14:07:29 +0000 -Subject: Fix handling of corrupt STABS enum type strings. - - PR binutils/21157 - * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE - pairs. - (parse_number): Exit early if passed an empty string. - -CVE: CVE-2017-7210 -Upstream-Status: Backport [master] - -Signed-off-by: Yuanjie Huang ---- - binutils/ChangeLog | 7 +++++++ - binutils/stabs.c | 14 +++++++++++++- - 2 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index cf92744c12..0045fbaaa6 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,10 @@ -+2017-02-14 Nick Clifton -+ -+ PR binutils/21157 -+ * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE -+ pairs. -+ (parse_number): Exit early if passed an empty string. -+ - 2017-02-13 Nick Clifton - - PR binutils/21135 -diff --git a/binutils/stabs.c b/binutils/stabs.c -index f5c5d2d8e0..5d013cc361 100644 ---- a/binutils/stabs.c -+++ b/binutils/stabs.c -@@ -232,6 +232,10 @@ parse_number (const char **pp, bfd_boolean *poverflow) - - orig = *pp; - -+ /* Stop early if we are passed an empty string. */ -+ if (*orig == 0) -+ return (bfd_vma) 0; -+ - errno = 0; - ul = strtoul (*pp, (char **) pp, 0); - if (ul + 1 != 0 || errno == 0) -@@ -1975,9 +1979,17 @@ parse_stab_enum_type (void *dhandle, const char **pp) - bfd_signed_vma val; - - p = *pp; -- while (*p != ':') -+ while (*p != ':' && *p != 0) - ++p; - -+ if (*p == 0) -+ { -+ bad_stab (orig); -+ free (names); -+ free (values); -+ return DEBUG_TYPE_NULL; -+ } -+ - name = savestring (*pp, p - *pp); - - *pp = p + 1; --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch deleted file mode 100644 index c78c8bf00..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 69ace2200106348a1b00d509a6a234337c104c17 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 1 Dec 2016 15:20:19 +0000 -Subject: [PATCH] Fix seg fault attempting to unget an EOF character. - - PR gas/20898 - * app.c (do_scrub_chars): Do not attempt to unget EOF. - -Affects: <= 2.28 -Upstream-Status: Backport -CVE: CVE-2017-7223 -Signed-off-by: Armin Kuster - ---- - gas/ChangeLog | 3 +++ - gas/app.c | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -Index: git/gas/ChangeLog -=================================================================== ---- git.orig/gas/ChangeLog -+++ git/gas/ChangeLog -@@ -1,3 +1,8 @@ -+2016-12-01 Nick Clifton -+ -+ PR gas/20898 -+ * app.c (do_scrub_chars): Do not attempt to unget EOF. -+ - 2017-03-02 Tristan Gingold - - * configure: Regenerate. -@@ -198,7 +203,6 @@ - * config/tc-pru.c (md_number_to_chars): Fix parameter to be - valueT, as declared in tc.h. - (md_apply_fix): Fix to work on 32-bit hosts. -->>>>>>> 0115611... RISC-V/GAS: Correct branch relaxation for weak symbols. - - 2017-01-02 Alan Modra - -Index: git/gas/app.c -=================================================================== ---- git.orig/gas/app.c -+++ git/gas/app.c -@@ -1350,7 +1350,7 @@ do_scrub_chars (size_t (*get) (char *, s - PUT (ch); - break; - } -- else -+ else if (ch2 != EOF) - { - state = 9; - if (ch == EOF || !IS_SYMBOL_COMPONENT (ch)) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch deleted file mode 100644 index be8631ab7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch +++ /dev/null @@ -1,103 +0,0 @@ -From ad32986fdf9da1c8748e47b8b45100398223dba8 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Tue, 4 Apr 2017 11:23:36 +0100 -Subject: [PATCH] Fix null pointer dereferences when using a link built with - clang. - - PR binutils/21342 - * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer - dereference. - (bfd_elf_final_link): Only initialize the extended symbol index - section if there are extended symbol tables to list. - -Upstream-Status: Backport -CVE: CVE-2017-7614 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 8 ++++++++ - bfd/elflink.c | 35 +++++++++++++++++++++-------------- - 2 files changed, 29 insertions(+), 14 deletions(-) - -Index: git/bfd/elflink.c -=================================================================== ---- git.orig/bfd/elflink.c -+++ git/bfd/elflink.c -@@ -119,15 +119,18 @@ _bfd_elf_define_linkage_sym (bfd *abfd, - defined in shared libraries can't be overridden, because we - lose the link to the bfd which is via the symbol section. */ - h->root.type = bfd_link_hash_new; -+ bh = &h->root; - } -+ else -+ bh = NULL; - -- bh = &h->root; - bed = get_elf_backend_data (abfd); - if (!_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, - sec, 0, NULL, FALSE, bed->collect, - &bh)) - return NULL; - h = (struct elf_link_hash_entry *) bh; -+ BFD_ASSERT (h != NULL); - h->def_regular = 1; - h->non_elf = 0; - h->root.linker_def = 1; -@@ -11973,24 +11976,28 @@ bfd_elf_final_link (bfd *abfd, struct bf - { - /* Finish up and write out the symbol string table (.strtab) - section. */ -- Elf_Internal_Shdr *symstrtab_hdr; -+ Elf_Internal_Shdr *symstrtab_hdr = NULL; - file_ptr off = symtab_hdr->sh_offset + symtab_hdr->sh_size; - -- symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr; -- if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0) -+ if (elf_symtab_shndx_list (abfd)) - { -- symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; -- symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); -- symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); -- amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); -- symtab_shndx_hdr->sh_size = amt; -+ symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr; - -- off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, -- off, TRUE); -+ if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0) -+ { -+ symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; -+ symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); -+ symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); -+ amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); -+ symtab_shndx_hdr->sh_size = amt; - -- if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 -- || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) -- return FALSE; -+ off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, -+ off, TRUE); -+ -+ if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 -+ || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) -+ return FALSE; -+ } - } - - symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr; -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,11 @@ -+2017-04-04 Nick Clifton -+ -+ PR binutils/21342 -+ * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer -+ dereference. -+ (bfd_elf_final_link): Only initialize the extended symbol index -+ section if there are extended symbol tables to list. -+ - 2017-03-07 Alan Modra - - PR 21224 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch deleted file mode 100644 index 8500a03b1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch +++ /dev/null @@ -1,205 +0,0 @@ -From bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sun, 23 Apr 2017 11:03:34 +0930 -Subject: [PATCH] PR 21412, get_reloc_section assumes .rel/.rela name for - SHT_REL/RELA. - -This patch fixes an assumption made by code that runs for objcopy and -strip, that SHT_REL/SHR_RELA sections are always named starting with a -.rel/.rela prefix. I'm also modifying the interface for -elf_backend_get_reloc_section, so any backend function just needs to -handle name mapping. - - PR 21412 - * elf-bfd.h (struct elf_backend_data ): Change - parameters and comment. - (_bfd_elf_get_reloc_section): Delete. - (_bfd_elf_plt_get_reloc_section): Declare. - * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section): - New functions. Don't blindly skip over assumed .rel/.rela prefix. - Extracted from.. - (_bfd_elf_get_reloc_section): ..here. Delete. - (assign_section_numbers): Call elf_get_reloc_section. - * elf64-ppc.c (elf_backend_get_reloc_section): Define. - * elfxx-target.h (elf_backend_get_reloc_section): Update. - -Upstream-Status: Backport -CVE: CVE-2017-8393 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 15 ++++++++++++++ - bfd/elf-bfd.h | 8 ++++--- - bfd/elf.c | 61 +++++++++++++++++++++++++++++++----------------------- - bfd/elf64-ppc.c | 1 + - bfd/elfxx-target.h | 2 +- - 5 files changed, 57 insertions(+), 30 deletions(-) - -Index: git/bfd/elf-bfd.h -=================================================================== ---- git.orig/bfd/elf-bfd.h -+++ git/bfd/elf-bfd.h -@@ -1322,8 +1322,10 @@ struct elf_backend_data - bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec, - bfd_vma *code_off); - -- /* Return the section which RELOC_SEC applies to. */ -- asection *(*get_reloc_section) (asection *reloc_sec); -+ /* Given NAME, the name of a relocation section stripped of its -+ .rel/.rela prefix, return the section in ABFD to which the -+ relocations apply. */ -+ asection *(*get_reloc_section) (bfd *abfd, const char *name); - - /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which - has a type >= SHT_LOOS. Returns TRUE if the fields were initialised, -@@ -2392,7 +2394,7 @@ extern bfd_boolean _bfd_elf_is_function_ - extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *, - bfd_vma *); - --extern asection *_bfd_elf_get_reloc_section (asection *); -+extern asection *_bfd_elf_plt_get_reloc_section (bfd *, const char *); - - extern int bfd_elf_get_default_section_type (flagword); - -Index: git/bfd/elf.c -=================================================================== ---- git.orig/bfd/elf.c -+++ git/bfd/elf.c -@@ -3532,17 +3532,39 @@ bfd_elf_set_group_contents (bfd *abfd, a - H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc); - } - --/* Return the section which RELOC_SEC applies to. */ -+/* Given NAME, the name of a relocation section stripped of its -+ .rel/.rela prefix, return the section in ABFD to which the -+ relocations apply. */ - - asection * --_bfd_elf_get_reloc_section (asection *reloc_sec) -+_bfd_elf_plt_get_reloc_section (bfd *abfd, const char *name) -+{ -+ /* If a target needs .got.plt section, relocations in rela.plt/rel.plt -+ section likely apply to .got.plt or .got section. */ -+ if (get_elf_backend_data (abfd)->want_got_plt -+ && strcmp (name, ".plt") == 0) -+ { -+ asection *sec; -+ -+ name = ".got.plt"; -+ sec = bfd_get_section_by_name (abfd, name); -+ if (sec != NULL) -+ return sec; -+ name = ".got"; -+ } -+ -+ return bfd_get_section_by_name (abfd, name); -+} -+ -+/* Return the section to which RELOC_SEC applies. */ -+ -+static asection * -+elf_get_reloc_section (asection *reloc_sec) - { - const char *name; - unsigned int type; - bfd *abfd; -- -- if (reloc_sec == NULL) -- return NULL; -+ const struct elf_backend_data *bed; - - type = elf_section_data (reloc_sec)->this_hdr.sh_type; - if (type != SHT_REL && type != SHT_RELA) -@@ -3550,28 +3572,15 @@ _bfd_elf_get_reloc_section (asection *re - - /* We look up the section the relocs apply to by name. */ - name = reloc_sec->name; -- if (type == SHT_REL) -- name += 4; -- else -- name += 5; -+ if (strncmp (name, ".rel", 4) != 0) -+ return NULL; -+ name += 4; -+ if (type == SHT_RELA && *name++ != 'a') -+ return NULL; - -- /* If a target needs .got.plt section, relocations in rela.plt/rel.plt -- section apply to .got.plt section. */ - abfd = reloc_sec->owner; -- if (get_elf_backend_data (abfd)->want_got_plt -- && strcmp (name, ".plt") == 0) -- { -- /* .got.plt is a linker created input section. It may be mapped -- to some other output section. Try two likely sections. */ -- name = ".got.plt"; -- reloc_sec = bfd_get_section_by_name (abfd, name); -- if (reloc_sec != NULL) -- return reloc_sec; -- name = ".got"; -- } -- -- reloc_sec = bfd_get_section_by_name (abfd, name); -- return reloc_sec; -+ bed = get_elf_backend_data (abfd); -+ return bed->get_reloc_section (abfd, name); - } - - /* Assign all ELF section numbers. The dummy first section is handled here -@@ -3833,7 +3842,7 @@ assign_section_numbers (bfd *abfd, struc - if (s != NULL) - d->this_hdr.sh_link = elf_section_data (s)->this_idx; - -- s = get_elf_backend_data (abfd)->get_reloc_section (sec); -+ s = elf_get_reloc_section (sec); - if (s != NULL) - { - d->this_hdr.sh_info = elf_section_data (s)->this_idx; -Index: git/bfd/elf64-ppc.c -=================================================================== ---- git.orig/bfd/elf64-ppc.c -+++ git/bfd/elf64-ppc.c -@@ -121,6 +121,7 @@ static bfd_vma opd_entry_value - #define elf_backend_special_sections ppc64_elf_special_sections - #define elf_backend_merge_symbol_attribute ppc64_elf_merge_symbol_attribute - #define elf_backend_merge_symbol ppc64_elf_merge_symbol -+#define elf_backend_get_reloc_section bfd_get_section_by_name - - /* The name of the dynamic interpreter. This is put in the .interp - section. */ -Index: git/bfd/elfxx-target.h -=================================================================== ---- git.orig/bfd/elfxx-target.h -+++ git/bfd/elfxx-target.h -@@ -706,7 +706,7 @@ - #endif - - #ifndef elf_backend_get_reloc_section --#define elf_backend_get_reloc_section _bfd_elf_get_reloc_section -+#define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section - #endif - - #ifndef elf_backend_copy_special_section_fields -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,18 @@ -+2017-04-23 Alan Modra -+ -+ PR 21412 -+ * elf-bfd.h (struct elf_backend_data ): Change -+ parameters and comment. -+ (_bfd_elf_get_reloc_section): Delete. -+ (_bfd_elf_plt_get_reloc_section): Declare. -+ * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section): -+ New functions. Don't blindly skip over assumed .rel/.rela prefix. -+ Extracted from.. -+ (_bfd_elf_get_reloc_section): ..here. Delete. -+ (assign_section_numbers): Call elf_get_reloc_section. -+ * elf64-ppc.c (elf_backend_get_reloc_section): Define. -+ * elfxx-target.h (elf_backend_get_reloc_section): Update. -+ - 2017-04-04 Nick Clifton - - PR binutils/21342 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch deleted file mode 100644 index e6c6b17da..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 7eacd66b086cabb1daab20890d5481894d4f56b2 Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sun, 23 Apr 2017 15:21:11 +0930 -Subject: [PATCH] PR 21414, null pointer deref of _bfd_elf_large_com_section - sym - - PR 21414 - * section.c (GLOBAL_SYM_INIT): Make available in bfd.h. - * elf.c (lcomm_sym): New. - (_bfd_elf_large_com_section): Use lcomm_sym section symbol. - * bfd-in2.h: Regenerate. - -Upstream-Status: Backport -CVE: CVE-2017-8394 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 8 ++++++++ - bfd/bfd-in2.h | 12 ++++++++++++ - bfd/elf.c | 6 ++++-- - bfd/section.c | 24 ++++++++++++------------ - 4 files changed, 36 insertions(+), 14 deletions(-) - -Index: git/bfd/bfd-in2.h -=================================================================== ---- git.orig/bfd/bfd-in2.h -+++ git/bfd/bfd-in2.h -@@ -1838,6 +1838,18 @@ extern asection _bfd_std_section[4]; - { NULL }, { NULL } \ - } - -+/* We use a macro to initialize the static asymbol structures because -+ traditional C does not permit us to initialize a union member while -+ gcc warns if we don't initialize it. -+ the_bfd, name, value, attr, section [, udata] */ -+#ifdef __STDC__ -+#define GLOBAL_SYM_INIT(NAME, SECTION) \ -+ { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} -+#else -+#define GLOBAL_SYM_INIT(NAME, SECTION) \ -+ { 0, NAME, 0, BSF_SECTION_SYM, SECTION } -+#endif -+ - void bfd_section_list_clear (bfd *); - - asection *bfd_get_section_by_name (bfd *abfd, const char *name); -Index: git/bfd/elf.c -=================================================================== ---- git.orig/bfd/elf.c -+++ git/bfd/elf.c -@@ -11164,9 +11164,11 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd - - /* It is only used by x86-64 so far. - ??? This repeats *COM* id of zero. sec->id is supposed to be unique, -- but current usage would allow all of _bfd_std_section to be zero. t*/ -+ but current usage would allow all of _bfd_std_section to be zero. */ -+static const asymbol lcomm_sym -+ = GLOBAL_SYM_INIT ("LARGE_COMMON", &_bfd_elf_large_com_section); - asection _bfd_elf_large_com_section -- = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL, -+ = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym, - "LARGE_COMMON", 0, SEC_IS_COMMON); - - void -Index: git/bfd/section.c -=================================================================== ---- git.orig/bfd/section.c -+++ git/bfd/section.c -@@ -738,20 +738,20 @@ CODE_FRAGMENT - . { NULL }, { NULL } \ - . } - . -+.{* We use a macro to initialize the static asymbol structures because -+. traditional C does not permit us to initialize a union member while -+. gcc warns if we don't initialize it. -+. the_bfd, name, value, attr, section [, udata] *} -+.#ifdef __STDC__ -+.#define GLOBAL_SYM_INIT(NAME, SECTION) \ -+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} -+.#else -+.#define GLOBAL_SYM_INIT(NAME, SECTION) \ -+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION } -+.#endif -+. - */ - --/* We use a macro to initialize the static asymbol structures because -- traditional C does not permit us to initialize a union member while -- gcc warns if we don't initialize it. */ -- /* the_bfd, name, value, attr, section [, udata] */ --#ifdef __STDC__ --#define GLOBAL_SYM_INIT(NAME, SECTION) \ -- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} --#else --#define GLOBAL_SYM_INIT(NAME, SECTION) \ -- { 0, NAME, 0, BSF_SECTION_SYM, SECTION } --#endif -- - /* These symbols are global, not specific to any BFD. Therefore, anything - that tries to change them is broken, and should be repaired. */ - -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,4 +1,12 @@ -+ - 2017-04-23 Alan Modra -+ PR 21414 -+ * section.c (GLOBAL_SYM_INIT): Make available in bfd.h. -+ * elf.c (lcomm_sym): New. -+ (_bfd_elf_large_com_section): Use lcomm_sym section symbol. -+ * bfd-in2.h: Regenerate. -+ -++2017-04-23 Alan Modra - - PR 21412 - * elf-bfd.h (struct elf_backend_data ): Change diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch deleted file mode 100644 index 0a9bce337..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch +++ /dev/null @@ -1,72 +0,0 @@ -From e63d123268f23a4cbc45ee55fb6dbc7d84729da3 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 26 Apr 2017 13:07:49 +0100 -Subject: [PATCH] Fix seg-fault attempting to compress a debug section in a - corrupt binary. - - PR binutils/21431 - * compress.c (bfd_init_section_compress_status): Check the return - value from bfd_malloc. - -Upstream-Status: Backport -CVE: CVE-2017-8395 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/compress.c | 19 +++++++++---------- - 2 files changed, 15 insertions(+), 10 deletions(-) - -Index: git/bfd/compress.c -=================================================================== ---- git.orig/bfd/compress.c -+++ git/bfd/compress.c -@@ -542,7 +542,6 @@ bfd_init_section_compress_status (bfd *a - { - bfd_size_type uncompressed_size; - bfd_byte *uncompressed_buffer; -- bfd_boolean ret; - - /* Error if not opened for read. */ - if (abfd->direction != read_direction -@@ -558,18 +557,18 @@ bfd_init_section_compress_status (bfd *a - /* Read in the full section contents and compress it. */ - uncompressed_size = sec->size; - uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); -+ /* PR 21431 */ -+ if (uncompressed_buffer == NULL) -+ return FALSE; -+ - if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, - 0, uncompressed_size)) -- ret = FALSE; -- else -- { -- uncompressed_size = bfd_compress_section_contents (abfd, sec, -- uncompressed_buffer, -- uncompressed_size); -- ret = uncompressed_size != 0; -- } -+ return FALSE; - -- return ret; -+ uncompressed_size = bfd_compress_section_contents (abfd, sec, -+ uncompressed_buffer, -+ uncompressed_size); -+ return uncompressed_size != 0; - } - - /* -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,8 @@ -+2017-04-26 Nick Clifton -+ -+ PR binutils/21431 -+ * compress.c (bfd_init_section_compress_status): Check the return -+ value from bfd_malloc. - - 2017-04-23 Alan Modra - PR 21414 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch deleted file mode 100644 index 14f42824a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch +++ /dev/null @@ -1,102 +0,0 @@ -From a941291cab71b9ac356e1c03968c177c03e602ab Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sat, 29 Apr 2017 14:48:16 +0930 -Subject: [PATCH] PR21432, buffer overflow in perform_relocation - -The existing reloc offset range tests didn't catch small negative -offsets less than the size of the reloc field. - - PR 21432 - * reloc.c (reloc_offset_in_range): New function. - (bfd_perform_relocation, bfd_install_relocation): Use it. - (_bfd_final_link_relocate): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-8396 -CVE: CVE-2017-8397 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 7 +++++++ - bfd/reloc.c | 32 ++++++++++++++++++++------------ - 2 files changed, 27 insertions(+), 12 deletions(-) - -Index: git/bfd/reloc.c -=================================================================== ---- git.orig/bfd/reloc.c -+++ git/bfd/reloc.c -@@ -538,6 +538,22 @@ bfd_check_overflow (enum complain_overfl - return flag; - } - -+/* HOWTO describes a relocation, at offset OCTET. Return whether the -+ relocation field is within SECTION of ABFD. */ -+ -+static bfd_boolean -+reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, -+ asection *section, bfd_size_type octet) -+{ -+ bfd_size_type octet_end = bfd_get_section_limit_octets (abfd, section); -+ bfd_size_type reloc_size = bfd_get_reloc_size (howto); -+ -+ /* The reloc field must be contained entirely within the section. -+ Allow zero length fields (marker relocs or NONE relocs where no -+ relocation will be performed) at the end of the section. */ -+ return octet <= octet_end && octet + reloc_size <= octet_end; -+} -+ - /* - FUNCTION - bfd_perform_relocation -@@ -618,13 +634,10 @@ bfd_perform_relocation (bfd *abfd, - /* PR 17512: file: 0f67f69d. */ - if (howto == NULL) - return bfd_reloc_undefined; -- -- /* Is the address of the relocation really within the section? -- Include the size of the reloc in the test for out of range addresses. -- PR 17512: file: c146ab8b, 46dff27f, 38e53ebf. */ -+ -+ /* Is the address of the relocation really within the section? */ - octets = reloc_entry->address * bfd_octets_per_byte (abfd); -- if (octets + bfd_get_reloc_size (howto) -- > bfd_get_section_limit_octets (abfd, input_section)) -+ if (!reloc_offset_in_range (howto, abfd, input_section, octets)) - return bfd_reloc_outofrange; - - /* Work out which section the relocation is targeted at and the -@@ -1012,8 +1025,7 @@ bfd_install_relocation (bfd *abfd, - - /* Is the address of the relocation really within the section? */ - octets = reloc_entry->address * bfd_octets_per_byte (abfd); -- if (octets + bfd_get_reloc_size (howto) -- > bfd_get_section_limit_octets (abfd, input_section)) -+ if (!reloc_offset_in_range (howto, abfd, input_section, octets)) - return bfd_reloc_outofrange; - - /* Work out which section the relocation is targeted at and the -@@ -1351,8 +1363,7 @@ _bfd_final_link_relocate (reloc_howto_ty - bfd_size_type octets = address * bfd_octets_per_byte (input_bfd); - - /* Sanity check the address. */ -- if (octets + bfd_get_reloc_size (howto) -- > bfd_get_section_limit_octets (input_bfd, input_section)) -+ if (!reloc_offset_in_range (howto, input_bfd, input_section, octets)) - return bfd_reloc_outofrange; - - /* This function assumes that we are dealing with a basic relocation -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,10 @@ -+2017-04-29 Alan Modra -+ -+ PR 21432 -+ * reloc.c (reloc_offset_in_range): New function. -+ (bfd_perform_relocation, bfd_install_relocation): Use it. -+ (_bfd_final_link_relocate): Likewise. -+ - 2017-04-26 Nick Clifton - - PR binutils/21431 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch deleted file mode 100644 index 5b9acc8cf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch +++ /dev/null @@ -1,147 +0,0 @@ -From d949ff5607b9f595e0eed2ff15fbe5eb84eb3a34 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 28 Apr 2017 10:28:04 +0100 -Subject: [PATCH] Fix heap-buffer overflow bugs caused when dumping debug - information from a corrupt binary. - - PR binutils/21438 - * dwarf.c (process_extended_line_op): Do not assume that the - string extracted from the section is NUL terminated. - (fetch_indirect_string): If the string retrieved from the section - is not NUL terminated, return an error message. - (fetch_indirect_line_string): Likewise. - (fetch_indexed_string): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-8398 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 10 +++++++++ - binutils/dwarf.c | 66 +++++++++++++++++++++++++++++++++++++++++------------- - 2 files changed, 60 insertions(+), 16 deletions(-) - -Index: git/binutils/dwarf.c -=================================================================== ---- git.orig/binutils/dwarf.c -+++ git/binutils/dwarf.c -@@ -472,15 +472,20 @@ process_extended_line_op (unsigned char - printf (_(" Entry\tDir\tTime\tSize\tName\n")); - printf (" %d\t", ++state_machine_regs.last_file_entry); - -- name = data; -- data += strnlen ((char *) data, end - data) + 1; -- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -- data += bytes_read; -- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -- data += bytes_read; -- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -- data += bytes_read; -- printf ("%s\n\n", name); -+ { -+ size_t l; -+ -+ name = data; -+ l = strnlen ((char *) data, end - data); -+ data += len + 1; -+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -+ data += bytes_read; -+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -+ data += bytes_read; -+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); -+ data += bytes_read; -+ printf ("%.*s\n\n", (int) l, name); -+ } - - if (((unsigned int) (data - orig_data) != len) || data == end) - warn (_("DW_LNE_define_file: Bad opcode length\n")); -@@ -597,18 +602,27 @@ static const unsigned char * - fetch_indirect_string (dwarf_vma offset) - { - struct dwarf_section *section = &debug_displays [str].section; -+ const unsigned char * ret; - - if (section->start == NULL) - return (const unsigned char *) _(""); - -- if (offset > section->size) -+ if (offset >= section->size) - { - warn (_("DW_FORM_strp offset too big: %s\n"), - dwarf_vmatoa ("x", offset)); - return (const unsigned char *) _(""); - } -+ ret = section->start + offset; -+ /* Unfortunately we cannot rely upon the .debug_str section ending with a -+ NUL byte. Since our caller is expecting to receive a well formed C -+ string we test for the lack of a terminating byte here. */ -+ if (strnlen ((const char *) ret, section->size - offset) -+ == section->size - offset) -+ ret = (const unsigned char *) -+ _(""); - -- return (const unsigned char *) section->start + offset; -+ return ret; - } - - static const char * -@@ -621,6 +635,7 @@ fetch_indexed_string (dwarf_vma idx, str - struct dwarf_section *str_section = &debug_displays [str_sec_idx].section; - dwarf_vma index_offset = idx * offset_size; - dwarf_vma str_offset; -+ const char * ret; - - if (index_section->start == NULL) - return (dwo ? _("") -@@ -628,7 +643,7 @@ fetch_indexed_string (dwarf_vma idx, str - - if (this_set != NULL) - index_offset += this_set->section_offsets [DW_SECT_STR_OFFSETS]; -- if (index_offset > index_section->size) -+ if (index_offset >= index_section->size) - { - warn (_("DW_FORM_GNU_str_index offset too big: %s\n"), - dwarf_vmatoa ("x", index_offset)); -@@ -641,14 +656,22 @@ fetch_indexed_string (dwarf_vma idx, str - - str_offset = byte_get (index_section->start + index_offset, offset_size); - str_offset -= str_section->address; -- if (str_offset > str_section->size) -+ if (str_offset >= str_section->size) - { - warn (_("DW_FORM_GNU_str_index indirect offset too big: %s\n"), - dwarf_vmatoa ("x", str_offset)); - return _(""); - } - -- return (const char *) str_section->start + str_offset; -+ ret = (const char *) str_section->start + str_offset; -+ /* Unfortunately we cannot rely upon str_section ending with a NUL byte. -+ Since our caller is expecting to receive a well formed C string we test -+ for the lack of a terminating byte here. */ -+ if (strnlen (ret, str_section->size - str_offset) -+ == str_section->size - str_offset) -+ ret = (const char *) _(""); -+ -+ return ret; - } - - static const char * -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,13 @@ -+2017-04-28 Nick Clifton -+ -+ PR binutils/21438 -+ * dwarf.c (process_extended_line_op): Do not assume that the -+ string extracted from the section is NUL terminated. -+ (fetch_indirect_string): If the string retrieved from the section -+ is not NUL terminated, return an error message. -+ (fetch_indirect_line_string): Likewise. -+ (fetch_indexed_string): Likewise. -+ - 2017-02-14 Nick Clifton - - PR binutils/21157 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch deleted file mode 100644 index 7969c66f3..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 39ff1b79f687b65f4144ddb379f22587003443fb Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Tue, 2 May 2017 11:54:53 +0100 -Subject: [PATCH] Prevent memory exhaustion from a corrupt PE binary with an - overlarge number of relocs. - - PR 21440 - * objdump.c (dump_relocs_in_section): Check for an excessive - number of relocs before attempting to dump them. - -Upstream-Status: Backport -CVE: CVE-2017-8421 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 6 ++++++ - binutils/objdump.c | 8 ++++++++ - 2 files changed, 14 insertions(+) - -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -3311,6 +3311,14 @@ dump_relocs_in_section (bfd *abfd, - return; - } - -+ if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0 -+ && relsize > get_file_size (bfd_get_filename (abfd))) -+ { -+ printf (" (too many: 0x%x)\n", section->reloc_count); -+ bfd_set_error (bfd_error_file_truncated); -+ bfd_fatal (bfd_get_filename (abfd)); -+ } -+ - relpp = (arelent **) xmalloc (relsize); - relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms); - -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,9 @@ -+2017-05-02 Nick Clifton -+ -+ PR 21440 -+ * objdump.c (dump_relocs_in_section): Check for an excessive -+ number of relocs before attempting to dump them. -+ - 2017-04-28 Nick Clifton - - PR binutils/21438 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch deleted file mode 100644 index 535efc314..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch +++ /dev/null @@ -1,51 +0,0 @@ -From f32ba72991d2406b21ab17edc234a2f3fa7fb23d Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 3 Apr 2017 11:01:45 +0100 -Subject: [PATCH] readelf: Update check for invalid word offsets in ARM unwind - information. - - PR binutils/21343 - * readelf.c (get_unwind_section_word): Fix snafu checking for - invalid word offsets in ARM unwind information. - -Upstream-Status: Backport -CVE: CVE-2017-9038 -CVE: CVE-2017-9044 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 6 ++++++ - binutils/readelf.c | 6 +++--- - 2 files changed, 9 insertions(+), 3 deletions(-) - -Index: git/binutils/readelf.c -=================================================================== ---- git.orig/binutils/readelf.c -+++ git/binutils/readelf.c -@@ -7972,9 +7972,9 @@ get_unwind_section_word (struct arm_unw_ - return FALSE; - - /* If the offset is invalid then fail. */ -- if (word_offset > (sec->sh_size - 4) -- /* PR 18879 */ -- || (sec->sh_size < 5 && word_offset >= sec->sh_size) -+ if (/* PR 21343 *//* PR 18879 */ -+ sec->sh_size < 4 -+ || word_offset > (sec->sh_size - 4) - || ((bfd_signed_vma) word_offset) < 0) - return FALSE; - -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,9 @@ -+2017-04-03 Nick Clifton -+ -+ PR binutils/21343 -+ * readelf.c (get_unwind_section_word): Fix snafu checking for -+ invalid word offsets in ARM unwind information. -+ - 2017-05-02 Nick Clifton - - PR 21440 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch deleted file mode 100644 index aed8f7f40..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 82156ab704b08b124d319c0decdbd48b3ca2dac5 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 3 Apr 2017 12:14:06 +0100 -Subject: [PATCH] readelf: Fix overlarge memory allocation when reading a - binary with an excessive number of program headers. - - PR binutils/21345 - * readelf.c (get_program_headers): Check for there being too many - program headers before attempting to allocate space for them. - -Upstream-Status: Backport -CVE: CVE-2017-9039 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 6 ++++++ - binutils/readelf.c | 17 ++++++++++++++--- - 2 files changed, 20 insertions(+), 3 deletions(-) - -Index: git/binutils/readelf.c -=================================================================== ---- git.orig/binutils/readelf.c -+++ git/binutils/readelf.c -@@ -4765,9 +4765,19 @@ get_program_headers (FILE * file) - if (program_headers != NULL) - return 1; - -- phdrs = (Elf_Internal_Phdr *) cmalloc (elf_header.e_phnum, -- sizeof (Elf_Internal_Phdr)); -+ /* Be kind to memory checkers by looking for -+ e_phnum values which we know must be invalid. */ -+ if (elf_header.e_phnum -+ * (is_32bit_elf ? sizeof (Elf32_External_Phdr) : sizeof (Elf64_External_Phdr)) -+ >= current_file_size) -+ { -+ error (_("Too many program headers - %#x - the file is not that big\n"), -+ elf_header.e_phnum); -+ return FALSE; -+ } - -+ phdrs = (Elf_Internal_Phdr *) cmalloc (elf_header.e_phnum, -+ sizeof (Elf_Internal_Phdr)); - if (phdrs == NULL) - { - error (_("Out of memory reading %u program headers\n"), -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,5 +1,11 @@ - 2017-04-03 Nick Clifton - -+ PR binutils/21345 -+ * readelf.c (get_program_headers): Check for there being too many -+ program headers before attempting to allocate space for them. -+ -+2017-04-03 Nick Clifton -+ - PR binutils/21343 - * readelf.c (get_unwind_section_word): Fix snafu checking for - invalid word offsets in ARM unwind information. diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch deleted file mode 100644 index 79c6a7d8a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 7296a62a2a237f6b1ad8db8c38b090e9f592c8cf Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 13 Apr 2017 16:06:30 +0100 -Subject: [PATCH] readelf: fix out of range subtraction, seg fault from a NULL - pointer and memory exhaustion, all from parsing corrupt binaries. - - PR binutils/21379 - * readelf.c (process_dynamic_section): Detect over large section - offsets in the DT_SYMTAB entry. - - PR binutils/21345 - * readelf.c (process_mips_specific): Catch an unfeasible memory - allocation before it happens and print a suitable error message. - -Upstream-Status: Backport -CVE: CVE-2017-9040 -CVE: CVE-2017-9042 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 12 ++++++++++++ - binutils/readelf.c | 26 +++++++++++++++++++++----- - 2 files changed, 33 insertions(+), 5 deletions(-) - -Index: git/binutils/readelf.c -=================================================================== ---- git.orig/binutils/readelf.c -+++ git/binutils/readelf.c -@@ -9306,6 +9306,12 @@ process_dynamic_section (FILE * file) - processing that. This is overkill, I know, but it - should work. */ - section.sh_offset = offset_from_vma (file, entry->d_un.d_val, 0); -+ if ((bfd_size_type) section.sh_offset > current_file_size) -+ { -+ /* See PR 21379 for a reproducer. */ -+ error (_("Invalid DT_SYMTAB entry: %lx"), (long) section.sh_offset); -+ return FALSE; -+ } - - if (archive_file_offset != 0) - section.sh_size = archive_file_size - section.sh_offset; -@@ -15175,6 +15181,15 @@ process_mips_specific (FILE * file) - return 0; - } - -+ /* PR 21345 - print a slightly more helpful error message -+ if we are sure that the cmalloc will fail. */ -+ if (conflictsno * sizeof (* iconf) > current_file_size) -+ { -+ error (_("Overlarge number of conflicts detected: %lx\n"), -+ (long) conflictsno); -+ return FALSE; -+ } -+ - iconf = (Elf32_Conflict *) cmalloc (conflictsno, sizeof (* iconf)); - if (iconf == NULL) - { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch deleted file mode 100644 index 0c9ed0d2a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 17:10:28 +0100 -Subject: [PATCH] Fix seg-fault when trying to disassemble a corrupt score - binary. - - PR binutils/21576 - * score7-dis.c (score_opcodes): Add sentinel. - -Upstream-Status: Backport -CVE: CVE-2017-9742 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 5 +++++ - opcodes/score7-dis.c | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -Index: git/opcodes/score7-dis.c -=================================================================== ---- git.orig/opcodes/score7-dis.c -+++ git/opcodes/score7-dis.c -@@ -513,7 +513,8 @@ static struct score_opcode score_opcodes - {0x00000d05, 0x00007f0f, "tvc!"}, - {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"}, - {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"}, -- {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"} -+ {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}, -+ { 0, 0, NULL } - }; - - typedef struct -Index: git/opcodes/ChangeLog -=================================================================== ---- git.orig/opcodes/ChangeLog -+++ git/opcodes/ChangeLog -@@ -1,3 +1,8 @@ -+2017-06-14 Nick Clifton -+ -+ PR binutils/21576 -+ * score7-dis.c (score_opcodes): Add sentinel. -+ - 2017-03-07 Alan Modra - - Apply from master diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch deleted file mode 100644 index c34a5a6ec..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch +++ /dev/null @@ -1,46 +0,0 @@ -From f461bbd847f15657f3dd2f317c30c75a7520da1f Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 17:01:54 +0100 -Subject: [PATCH] Fix address violation bug when disassembling a corrupt SH - binary. - - PR binutils/21578 - * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid - flag value. - -Upstream-Status: Backport -CVE: CVE-2017-9744 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/elf32-sh.c | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -Index: git/bfd/elf32-sh.c -=================================================================== ---- git.orig/bfd/elf32-sh.c -+++ git/bfd/elf32-sh.c -@@ -6344,7 +6344,7 @@ sh_elf_set_mach_from_flags (bfd *abfd) - { - flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK; - -- if (flags >= sizeof(sh_ef_bfd_table)) -+ if (flags >= ARRAY_SIZE (sh_ef_bfd_table)) - return FALSE; - - if (sh_ef_bfd_table[flags] == 0) -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2017-06-14 Nick Clifton -+ -+ PR binutils/21578 -+ * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid -+ flag value. -+ - 2017-04-29 Alan Modra - - PR 21432 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch deleted file mode 100644 index 0b3885b94..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 76800cba595efc3fe95a446c2d664e42ae4ee869 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 12:08:57 +0100 -Subject: [PATCH] Handle EITR records in VMS Alpha binaries with overlarge - command length parameters. - - PR binutils/21579 - * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length. - -Upstream-Status: Backport -CVE: CVE-2017-9745 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 5 +++++ - bfd/vms-alpha.c | 16 ++++++++-------- - 2 files changed, 13 insertions(+), 8 deletions(-) - -Index: git/bfd/vms-alpha.c -=================================================================== ---- git.orig/bfd/vms-alpha.c -+++ git/bfd/vms-alpha.c -@@ -1741,6 +1741,12 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - _bfd_hexdump (8, ptr, cmd_length - 4, 0); - #endif - -+#if VMS_DEBUG -+ _bfd_vms_debug (4, "etir: %s(%d)\n", -+ _bfd_vms_etir_name (cmd), cmd); -+ _bfd_hexdump (8, ptr, cmd_length - 4, 0); -+#endif -+ - switch (cmd) - { - /* Stack global diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch deleted file mode 100644 index bd4a40c35..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch +++ /dev/null @@ -1,91 +0,0 @@ -From ae87f7e73eba29bd38b3a9684a10b948ed715612 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 16:50:03 +0100 -Subject: [PATCH] Fix address violation when disassembling a corrupt binary. - - PR binutils/21580 -binutils * objdump.c (disassemble_bytes): Check for buffer overrun when - printing out rae insns. - -ld * testsuite/ld-nds32/diff.d: Adjust expected output. - -Upstream-Status: Backport -CVE: CVE-2017-9746 -Signed-off-by: Armin Kuster - ---- - binutils/objdump.c | 27 +++++++++++++++------------ - ld/ChangeLog | 5 +++++ - ld/testsuite/ld-nds32/diff.d | 6 +++--- - 3 files changed, 23 insertions(+), 15 deletions(-) - -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -1855,20 +1855,23 @@ disassemble_bytes (struct disassemble_in - - for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc) - { -- int k; -- -- if (bpc > 1 && inf->display_endian == BFD_ENDIAN_LITTLE) -- { -- for (k = bpc - 1; k >= 0; k--) -- printf ("%02x", (unsigned) data[j + k]); -- putchar (' '); -- } -- else -+ /* PR 21580: Check for a buffer ending early. */ -+ if (j + bpc <= stop_offset * opb) - { -- for (k = 0; k < bpc; k++) -- printf ("%02x", (unsigned) data[j + k]); -- putchar (' '); -+ int k; -+ -+ if (inf->display_endian == BFD_ENDIAN_LITTLE) -+ { -+ for (k = bpc - 1; k >= 0; k--) -+ printf ("%02x", (unsigned) data[j + k]); -+ } -+ else -+ { -+ for (k = 0; k < bpc; k++) -+ printf ("%02x", (unsigned) data[j + k]); -+ } - } -+ putchar (' '); - } - - for (; pb < octets_per_line; pb += bpc) -Index: git/ld/testsuite/ld-nds32/diff.d -=================================================================== ---- git.orig/ld/testsuite/ld-nds32/diff.d -+++ git/ld/testsuite/ld-nds32/diff.d -@@ -7,9 +7,9 @@ - - Disassembly of section .data: - 00008000 (7e 00 00 00|00 00 00 7e).* --00008004 (7e 00 7e fe|00 7e 7e fe).* --00008006 7e fe 00 fe.* --00008007 fe 00.* -+00008004 (7e 00|00 7e).* -+00008006 7e.* -+00008007 fe.* - ... - 00008009 fe 00.* - .* -Index: git/ld/ChangeLog -=================================================================== ---- git.orig/ld/ChangeLog -+++ git/ld/ChangeLog -@@ -1,3 +1,8 @@ -+2017-06-14 Nick Clifton -+ -+ PR binutils/21580 -+ * testsuite/ld-nds32/diff.d: Adjust expected output. -+ - 2017-03-07 Alan Modra - - * ldlang.c (open_input_bfds): Check that lang_assignment_statement diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch deleted file mode 100644 index 41ead54a9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 62b76e4b6e0b4cb5b3e0053d1de4097b32577049 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 13:08:47 +0100 -Subject: [PATCH] Fix address violation parsing a corrupt ieee binary. - - PR binutils/21581 - (ieee_archive_p): Use a static buffer to avoid compiler bugs. - -Upstream-Status: Backport -CVE: CVE-2017-9747 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 2 ++ - bfd/ieee.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -Index: git/bfd/ieee.c -=================================================================== ---- git.orig/bfd/ieee.c -+++ git/bfd/ieee.c -@@ -1357,7 +1357,7 @@ ieee_archive_p (bfd *abfd) - { - char *library; - unsigned int i; -- unsigned char buffer[512]; -+ static unsigned char buffer[512]; - file_ptr buffer_offset = 0; - ieee_ar_data_type *save = abfd->tdata.ieee_ar_data; - ieee_ar_data_type *ieee; -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,8 @@ -+2017-06-15 Nick Clifton -+ -+ PR binutils/21581 -+ (ieee_archive_p): Likewise. -+ - 2017-06-14 Nick Clifton - - PR binutils/21578 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch deleted file mode 100644 index 02070235a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 63634bb4a107877dd08b6282e28e11cfd1a1649e Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 12:44:23 +0100 -Subject: [PATCH] Avoid a possible compiler bug by using a static buffer - instead of a stack local buffer. - - PR binutils/21582 - * ieee.c (ieee_object_p): Use a static buffer to avoid compiler - bugs. - -Upstream-Status: Backport -CVE: CVE-2017-9748 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/ieee.c | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -Index: git/bfd/ieee.c -=================================================================== ---- git.orig/bfd/ieee.c -+++ git/bfd/ieee.c -@@ -1875,7 +1875,7 @@ ieee_object_p (bfd *abfd) - char *processor; - unsigned int part; - ieee_data_type *ieee; -- unsigned char buffer[300]; -+ static unsigned char buffer[300]; - ieee_data_type *save = IEEE_DATA (abfd); - bfd_size_type amt; - -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,5 +1,9 @@ - 2017-06-15 Nick Clifton - -+ PR binutils/21582 -+ * ieee.c (ieee_object_p): Use a static buffer to avoid compiler -+ bugs. -+ - PR binutils/21581 - (ieee_archive_p): Likewise. - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch deleted file mode 100644 index 3cc2afc91..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 08c7881b814c546efc3996fd1decdf0877f7a779 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 11:52:02 +0100 -Subject: [PATCH] Prevent invalid array accesses when disassembling a corrupt - bfin binary. - - PR binutils/21586 - * bfin-dis.c (gregs): Clip index to prevent overflow. - (regs): Likewise. - (regs_lo): Likewise. - (regs_hi): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-9749 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 8 ++++++++ - opcodes/bfin-dis.c | 8 ++++---- - 2 files changed, 12 insertions(+), 4 deletions(-) - -Index: git/opcodes/ChangeLog -=================================================================== ---- git.orig/opcodes/ChangeLog -+++ git/opcodes/ChangeLog -@@ -1,3 +1,11 @@ -+2017-06-15 Nick Clifton -+ -+ PR binutils/21586 -+ * bfin-dis.c (gregs): Clip index to prevent overflow. -+ (regs): Likewise. -+ (regs_lo): Likewise. -+ (regs_hi): Likewise. -+ - 2017-06-14 Nick Clifton - - PR binutils/21576 -Index: git/opcodes/bfin-dis.c -=================================================================== ---- git.orig/opcodes/bfin-dis.c -+++ git/opcodes/bfin-dis.c -@@ -350,7 +350,7 @@ static const enum machine_registers deco - REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_SP, REG_FP, - }; - --#define gregs(x, i) REGNAME (decode_gregs[((i) << 3) | (x)]) -+#define gregs(x, i) REGNAME (decode_gregs[(((i) << 3) | (x)) & 15]) - - /* [dregs pregs (iregs mregs) (bregs lregs)]. */ - static const enum machine_registers decode_regs[] = -@@ -361,7 +361,7 @@ static const enum machine_registers deco - REG_B0, REG_B1, REG_B2, REG_B3, REG_L0, REG_L1, REG_L2, REG_L3, - }; - --#define regs(x, i) REGNAME (decode_regs[((i) << 3) | (x)]) -+#define regs(x, i) REGNAME (decode_regs[(((i) << 3) | (x)) & 31]) - - /* [dregs pregs (iregs mregs) (bregs lregs) Low Half]. */ - static const enum machine_registers decode_regs_lo[] = -@@ -372,7 +372,7 @@ static const enum machine_registers deco - REG_BL0, REG_BL1, REG_BL2, REG_BL3, REG_LL0, REG_LL1, REG_LL2, REG_LL3, - }; - --#define regs_lo(x, i) REGNAME (decode_regs_lo[((i) << 3) | (x)]) -+#define regs_lo(x, i) REGNAME (decode_regs_lo[(((i) << 3) | (x)) & 31]) - - /* [dregs pregs (iregs mregs) (bregs lregs) High Half]. */ - static const enum machine_registers decode_regs_hi[] = -@@ -383,7 +383,7 @@ static const enum machine_registers deco - REG_BH0, REG_BH1, REG_BH2, REG_BH3, REG_LH0, REG_LH1, REG_LH2, REG_LH3, - }; - --#define regs_hi(x, i) REGNAME (decode_regs_hi[((i) << 3) | (x)]) -+#define regs_hi(x, i) REGNAME (decode_regs_hi[(((i) << 3) | (x)) & 31]) - - static const enum machine_registers decode_statbits[] = - { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch deleted file mode 100644 index fe8fa6934..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch +++ /dev/null @@ -1,247 +0,0 @@ -From db5fa770268baf8cc82cf9b141d69799fd485fe2 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 13:35:06 +0100 -Subject: [PATCH] Fix address violation problems when disassembling a corrupt - RX binary. - - PR binutils/21587 - * rx-decode.opc: Include libiberty.h - (GET_SCALE): New macro - validates access to SCALE array. - (GET_PSCALE): New macro - validates access to PSCALE array. - (DIs, SIs, S2Is, rx_disp): Use new macros. - * rx-decode.c: Regenerate. - -Upstream-Status: Backport -CVE: CVE-2017-9750 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 9 +++++++++ - opcodes/rx-decode.c | 24 ++++++++++++++---------- - opcodes/rx-decode.opc | 24 ++++++++++++++---------- - 3 files changed, 37 insertions(+), 20 deletions(-) - -Index: git/opcodes/rx-decode.c -=================================================================== ---- git.orig/opcodes/rx-decode.c -+++ git/opcodes/rx-decode.c -@@ -27,6 +27,7 @@ - #include - #include "ansidecl.h" - #include "opcode/rx.h" -+#include "libiberty.h" - - #define RX_OPCODE_BIG_ENDIAN 0 - -@@ -45,7 +46,7 @@ static int trace = 0; - #define LSIZE 2 - - /* These are for when the upper bits are "don't care" or "undefined". */ --static int bwl[] = -+static int bwl[4] = - { - RX_Byte, - RX_Word, -@@ -53,7 +54,7 @@ static int bwl[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int sbwl[] = -+static int sbwl[4] = - { - RX_SByte, - RX_SWord, -@@ -61,7 +62,7 @@ static int sbwl[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int ubw[] = -+static int ubw[4] = - { - RX_UByte, - RX_UWord, -@@ -69,7 +70,7 @@ static int ubw[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int memex[] = -+static int memex[4] = - { - RX_SByte, - RX_SWord, -@@ -89,6 +90,9 @@ static int SCALE[] = { 1, 2, 4, 0 }; - /* This is for the prefix size enum. */ - static int PSCALE[] = { 4, 1, 1, 1, 2, 2, 2, 3, 4 }; - -+#define GET_SCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (SCALE) ? SCALE[(_indx)] : 0) -+#define GET_PSCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (PSCALE) ? PSCALE[(_indx)] : 0) -+ - static int flagmap[] = {0, 1, 2, 3, 0, 0, 0, 0, - 16, 17, 0, 0, 0, 0, 0, 0 }; - -@@ -107,7 +111,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define DC(c) OP (0, RX_Operand_Immediate, 0, c) - #define DR(r) OP (0, RX_Operand_Register, r, 0) - #define DI(r,a) OP (0, RX_Operand_Indirect, r, a) --#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define DD(t,r,s) rx_disp (0, t, r, bwl[s], ld); - #define DF(r) OP (0, RX_Operand_Flag, flagmap[r], 0) - -@@ -115,7 +119,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define SR(r) OP (1, RX_Operand_Register, r, 0) - #define SRR(r) OP (1, RX_Operand_TwoReg, r, 0) - #define SI(r,a) OP (1, RX_Operand_Indirect, r, a) --#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define SD(t,r,s) rx_disp (1, t, r, bwl[s], ld); - #define SP(t,r) rx_disp (1, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 1); - #define SPm(t,r,m) rx_disp (1, t, r, memex[m], ld); rx->op[1].size = memex[m]; -@@ -124,7 +128,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define S2C(i) OP (2, RX_Operand_Immediate, 0, i) - #define S2R(r) OP (2, RX_Operand_Register, r, 0) - #define S2I(r,a) OP (2, RX_Operand_Indirect, r, a) --#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define S2D(t,r,s) rx_disp (2, t, r, bwl[s], ld); - #define S2P(t,r) rx_disp (2, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 2); - #define S2Pm(t,r,m) rx_disp (2, t, r, memex[m], ld); rx->op[2].size = memex[m]; -@@ -211,7 +215,7 @@ immediate (int sfield, int ex, LocalData - } - - static void --rx_disp (int n, int type, int reg, int size, LocalData * ld) -+rx_disp (int n, int type, int reg, unsigned int size, LocalData * ld) - { - int disp; - -@@ -228,7 +232,7 @@ rx_disp (int n, int type, int reg, int s - case 1: - ld->rx->op[n].type = RX_Operand_Indirect; - disp = GETBYTE (); -- ld->rx->op[n].addend = disp * PSCALE[size]; -+ ld->rx->op[n].addend = disp * GET_PSCALE (size); - break; - case 2: - ld->rx->op[n].type = RX_Operand_Indirect; -@@ -238,7 +242,7 @@ rx_disp (int n, int type, int reg, int s - #else - disp = disp + GETBYTE () * 256; - #endif -- ld->rx->op[n].addend = disp * PSCALE[size]; -+ ld->rx->op[n].addend = disp * GET_PSCALE (size); - break; - default: - abort (); -Index: git/opcodes/rx-decode.opc -=================================================================== ---- git.orig/opcodes/rx-decode.opc -+++ git/opcodes/rx-decode.opc -@@ -26,6 +26,7 @@ - #include - #include "ansidecl.h" - #include "opcode/rx.h" -+#include "libiberty.h" - - #define RX_OPCODE_BIG_ENDIAN 0 - -@@ -44,7 +45,7 @@ static int trace = 0; - #define LSIZE 2 - - /* These are for when the upper bits are "don't care" or "undefined". */ --static int bwl[] = -+static int bwl[4] = - { - RX_Byte, - RX_Word, -@@ -52,7 +53,7 @@ static int bwl[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int sbwl[] = -+static int sbwl[4] = - { - RX_SByte, - RX_SWord, -@@ -60,7 +61,7 @@ static int sbwl[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int ubw[] = -+static int ubw[4] = - { - RX_UByte, - RX_UWord, -@@ -68,7 +69,7 @@ static int ubw[] = - RX_Bad_Size /* Bogus instructions can have a size field set to 3. */ - }; - --static int memex[] = -+static int memex[4] = - { - RX_SByte, - RX_SWord, -@@ -88,6 +89,9 @@ static int SCALE[] = { 1, 2, 4, 0 }; - /* This is for the prefix size enum. */ - static int PSCALE[] = { 4, 1, 1, 1, 2, 2, 2, 3, 4 }; - -+#define GET_SCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (SCALE) ? SCALE[(_indx)] : 0) -+#define GET_PSCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (PSCALE) ? PSCALE[(_indx)] : 0) -+ - static int flagmap[] = {0, 1, 2, 3, 0, 0, 0, 0, - 16, 17, 0, 0, 0, 0, 0, 0 }; - -@@ -106,7 +110,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define DC(c) OP (0, RX_Operand_Immediate, 0, c) - #define DR(r) OP (0, RX_Operand_Register, r, 0) - #define DI(r,a) OP (0, RX_Operand_Indirect, r, a) --#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define DD(t,r,s) rx_disp (0, t, r, bwl[s], ld); - #define DF(r) OP (0, RX_Operand_Flag, flagmap[r], 0) - -@@ -114,7 +118,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define SR(r) OP (1, RX_Operand_Register, r, 0) - #define SRR(r) OP (1, RX_Operand_TwoReg, r, 0) - #define SI(r,a) OP (1, RX_Operand_Indirect, r, a) --#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define SD(t,r,s) rx_disp (1, t, r, bwl[s], ld); - #define SP(t,r) rx_disp (1, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 1); - #define SPm(t,r,m) rx_disp (1, t, r, memex[m], ld); rx->op[1].size = memex[m]; -@@ -123,7 +127,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4, - #define S2C(i) OP (2, RX_Operand_Immediate, 0, i) - #define S2R(r) OP (2, RX_Operand_Register, r, 0) - #define S2I(r,a) OP (2, RX_Operand_Indirect, r, a) --#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * SCALE[s]) -+#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * GET_SCALE (s)) - #define S2D(t,r,s) rx_disp (2, t, r, bwl[s], ld); - #define S2P(t,r) rx_disp (2, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 2); - #define S2Pm(t,r,m) rx_disp (2, t, r, memex[m], ld); rx->op[2].size = memex[m]; -@@ -210,7 +214,7 @@ immediate (int sfield, int ex, LocalData - } - - static void --rx_disp (int n, int type, int reg, int size, LocalData * ld) -+rx_disp (int n, int type, int reg, unsigned int size, LocalData * ld) - { - int disp; - -@@ -227,7 +231,7 @@ rx_disp (int n, int type, int reg, int s - case 1: - ld->rx->op[n].type = RX_Operand_Indirect; - disp = GETBYTE (); -- ld->rx->op[n].addend = disp * PSCALE[size]; -+ ld->rx->op[n].addend = disp * GET_PSCALE (size); - break; - case 2: - ld->rx->op[n].type = RX_Operand_Indirect; -@@ -237,7 +241,7 @@ rx_disp (int n, int type, int reg, int s - #else - disp = disp + GETBYTE () * 256; - #endif -- ld->rx->op[n].addend = disp * PSCALE[size]; -+ ld->rx->op[n].addend = disp * GET_PSCALE (size); - break; - default: - abort (); diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch deleted file mode 100644 index d7c18cf85..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch +++ /dev/null @@ -1,3748 +0,0 @@ -From 63323b5b23bd83fa7b04ea00dff593c933e9b0e3 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 12:37:01 +0100 -Subject: [PATCH] Fix address violation when disassembling a corrupt RL78 - binary. - - PR binutils/21588 - * rl78-decode.opc (OP_BUF_LEN): Define. - (GETBYTE): Check for the index exceeding OP_BUF_LEN. - (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf - array. - * rl78-decode.c: Regenerate. - -Upstream-Status: Backport -CVE: CVE-2017-9751 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 9 + - opcodes/rl78-decode.c | 820 ++++++++++++++++++++++++------------------------ - opcodes/rl78-decode.opc | 6 +- - 3 files changed, 424 insertions(+), 411 deletions(-) - -diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog -index 34b1844..c77f00a 100644 ---- a/opcodes/ChangeLog -+++ b/opcodes/ChangeLog -@@ -1,5 +1,14 @@ - 2017-06-15 Nick Clifton - -+ PR binutils/21588 -+ * rl78-decode.opc (OP_BUF_LEN): Define. -+ (GETBYTE): Check for the index exceeding OP_BUF_LEN. -+ (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf -+ array. -+ * rl78-decode.c: Regenerate. -+ -+2017-06-15 Nick Clifton -+ - PR binutils/21586 - * bfin-dis.c (gregs): Clip index to prevent overflow. - (regs): Likewise. -diff --git a/opcodes/rl78-decode.c b/opcodes/rl78-decode.c -index d0566ea..b2d4bd6 100644 ---- a/opcodes/rl78-decode.c -+++ b/opcodes/rl78-decode.c -@@ -51,7 +51,9 @@ typedef struct - #define W() rl78->size = RL78_Word - - #define AU ATTRIBUTE_UNUSED --#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr)) -+ -+#define OP_BUF_LEN 20 -+#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0) - #define B ((unsigned long) GETBYTE()) - - #define SYNTAX(x) rl78->syntax = x -@@ -169,7 +171,7 @@ rl78_decode_opcode (unsigned long pc AU, - RL78_Dis_Isa isa) - { - LocalData lds, * ld = &lds; -- unsigned char op_buf[20] = {0}; -+ unsigned char op_buf[OP_BUF_LEN] = {0}; - unsigned char *op = op_buf; - int op0, op1; - -@@ -201,7 +203,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("nop"); --#line 911 "rl78-decode.opc" -+#line 913 "rl78-decode.opc" - ID(nop); - - /*----------------------------------------------------------------------*/ -@@ -214,7 +216,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x07: - { - /** 0000 0rw1 addw %0, %1 */ --#line 274 "rl78-decode.opc" -+#line 276 "rl78-decode.opc" - int rw AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -224,7 +226,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rw = 0x%x\n", rw); - } - SYNTAX("addw %0, %1"); --#line 274 "rl78-decode.opc" -+#line 276 "rl78-decode.opc" - ID(add); W(); DR(AX); SRW(rw); Fzac; - - } -@@ -239,7 +241,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addw %0, %e!1"); --#line 265 "rl78-decode.opc" -+#line 267 "rl78-decode.opc" - ID(add); W(); DR(AX); SM(None, IMMU(2)); Fzac; - - } -@@ -254,7 +256,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addw %0, #%1"); --#line 271 "rl78-decode.opc" -+#line 273 "rl78-decode.opc" - ID(add); W(); DR(AX); SC(IMMU(2)); Fzac; - - } -@@ -269,7 +271,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addw %0, %1"); --#line 277 "rl78-decode.opc" -+#line 279 "rl78-decode.opc" - ID(add); W(); DR(AX); SM(None, SADDR); Fzac; - - } -@@ -284,7 +286,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xch a, x"); --#line 1234 "rl78-decode.opc" -+#line 1236 "rl78-decode.opc" - ID(xch); DR(A); SR(X); - - /*----------------------------------------------------------------------*/ -@@ -301,7 +303,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e1"); --#line 678 "rl78-decode.opc" -+#line 680 "rl78-decode.opc" - ID(mov); DR(A); SM(B, IMMU(2)); - - } -@@ -316,7 +318,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, #%1"); --#line 228 "rl78-decode.opc" -+#line 230 "rl78-decode.opc" - ID(add); DM(None, SADDR); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -333,7 +335,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, %1"); --#line 222 "rl78-decode.opc" -+#line 224 "rl78-decode.opc" - ID(add); DR(A); SM(None, SADDR); Fzac; - - } -@@ -348,7 +350,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, #%1"); --#line 216 "rl78-decode.opc" -+#line 218 "rl78-decode.opc" - ID(add); DR(A); SC(IMMU(1)); Fzac; - - } -@@ -363,7 +365,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, %e1"); --#line 204 "rl78-decode.opc" -+#line 206 "rl78-decode.opc" - ID(add); DR(A); SM(HL, 0); Fzac; - - } -@@ -378,7 +380,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, %ea1"); --#line 210 "rl78-decode.opc" -+#line 212 "rl78-decode.opc" - ID(add); DR(A); SM(HL, IMMU(1)); Fzac; - - } -@@ -393,7 +395,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("add %0, %e!1"); --#line 201 "rl78-decode.opc" -+#line 203 "rl78-decode.opc" - ID(add); DR(A); SM(None, IMMU(2)); Fzac; - - } -@@ -408,7 +410,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addw %0, #%1"); --#line 280 "rl78-decode.opc" -+#line 282 "rl78-decode.opc" - ID(add); W(); DR(SP); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -425,7 +427,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("es:"); --#line 193 "rl78-decode.opc" -+#line 195 "rl78-decode.opc" - DE(); SE(); - op ++; - pc ++; -@@ -440,7 +442,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x16: - { - /** 0001 0ra0 movw %0, %1 */ --#line 859 "rl78-decode.opc" -+#line 861 "rl78-decode.opc" - int ra AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -450,7 +452,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("movw %0, %1"); --#line 859 "rl78-decode.opc" -+#line 861 "rl78-decode.opc" - ID(mov); W(); DRW(ra); SR(AX); - - } -@@ -460,7 +462,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x17: - { - /** 0001 0ra1 movw %0, %1 */ --#line 856 "rl78-decode.opc" -+#line 858 "rl78-decode.opc" - int ra AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -470,7 +472,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("movw %0, %1"); --#line 856 "rl78-decode.opc" -+#line 858 "rl78-decode.opc" - ID(mov); W(); DR(AX); SRW(ra); - - } -@@ -485,7 +487,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, %1"); --#line 729 "rl78-decode.opc" -+#line 731 "rl78-decode.opc" - ID(mov); DM(B, IMMU(2)); SR(A); - - } -@@ -500,7 +502,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, #%1"); --#line 726 "rl78-decode.opc" -+#line 728 "rl78-decode.opc" - ID(mov); DM(B, IMMU(2)); SC(IMMU(1)); - - } -@@ -515,7 +517,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, #%1"); --#line 260 "rl78-decode.opc" -+#line 262 "rl78-decode.opc" - ID(addc); DM(None, SADDR); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -532,7 +534,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, %1"); --#line 257 "rl78-decode.opc" -+#line 259 "rl78-decode.opc" - ID(addc); DR(A); SM(None, SADDR); Fzac; - - } -@@ -547,7 +549,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, #%1"); --#line 248 "rl78-decode.opc" -+#line 250 "rl78-decode.opc" - ID(addc); DR(A); SC(IMMU(1)); Fzac; - - } -@@ -562,7 +564,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, %e1"); --#line 236 "rl78-decode.opc" -+#line 238 "rl78-decode.opc" - ID(addc); DR(A); SM(HL, 0); Fzac; - - } -@@ -577,7 +579,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, %ea1"); --#line 245 "rl78-decode.opc" -+#line 247 "rl78-decode.opc" - ID(addc); DR(A); SM(HL, IMMU(1)); Fzac; - - } -@@ -592,7 +594,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("addc %0, %e!1"); --#line 233 "rl78-decode.opc" -+#line 235 "rl78-decode.opc" - ID(addc); DR(A); SM(None, IMMU(2)); Fzac; - - } -@@ -607,7 +609,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subw %0, #%1"); --#line 1198 "rl78-decode.opc" -+#line 1200 "rl78-decode.opc" - ID(sub); W(); DR(SP); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -620,7 +622,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x27: - { - /** 0010 0rw1 subw %0, %1 */ --#line 1192 "rl78-decode.opc" -+#line 1194 "rl78-decode.opc" - int rw AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -630,7 +632,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rw = 0x%x\n", rw); - } - SYNTAX("subw %0, %1"); --#line 1192 "rl78-decode.opc" -+#line 1194 "rl78-decode.opc" - ID(sub); W(); DR(AX); SRW(rw); Fzac; - - } -@@ -645,7 +647,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subw %0, %e!1"); --#line 1183 "rl78-decode.opc" -+#line 1185 "rl78-decode.opc" - ID(sub); W(); DR(AX); SM(None, IMMU(2)); Fzac; - - } -@@ -660,7 +662,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subw %0, #%1"); --#line 1189 "rl78-decode.opc" -+#line 1191 "rl78-decode.opc" - ID(sub); W(); DR(AX); SC(IMMU(2)); Fzac; - - } -@@ -675,7 +677,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subw %0, %1"); --#line 1195 "rl78-decode.opc" -+#line 1197 "rl78-decode.opc" - ID(sub); W(); DR(AX); SM(None, SADDR); Fzac; - - } -@@ -690,7 +692,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, %1"); --#line 741 "rl78-decode.opc" -+#line 743 "rl78-decode.opc" - ID(mov); DM(C, IMMU(2)); SR(A); - - } -@@ -705,7 +707,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e1"); --#line 684 "rl78-decode.opc" -+#line 686 "rl78-decode.opc" - ID(mov); DR(A); SM(C, IMMU(2)); - - } -@@ -720,7 +722,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, #%1"); --#line 1146 "rl78-decode.opc" -+#line 1148 "rl78-decode.opc" - ID(sub); DM(None, SADDR); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -737,7 +739,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, %1"); --#line 1140 "rl78-decode.opc" -+#line 1142 "rl78-decode.opc" - ID(sub); DR(A); SM(None, SADDR); Fzac; - - } -@@ -752,7 +754,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, #%1"); --#line 1134 "rl78-decode.opc" -+#line 1136 "rl78-decode.opc" - ID(sub); DR(A); SC(IMMU(1)); Fzac; - - } -@@ -767,7 +769,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, %e1"); --#line 1122 "rl78-decode.opc" -+#line 1124 "rl78-decode.opc" - ID(sub); DR(A); SM(HL, 0); Fzac; - - } -@@ -782,7 +784,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, %ea1"); --#line 1128 "rl78-decode.opc" -+#line 1130 "rl78-decode.opc" - ID(sub); DR(A); SM(HL, IMMU(1)); Fzac; - - } -@@ -797,7 +799,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("sub %0, %e!1"); --#line 1119 "rl78-decode.opc" -+#line 1121 "rl78-decode.opc" - ID(sub); DR(A); SM(None, IMMU(2)); Fzac; - - } -@@ -808,7 +810,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x36: - { - /** 0011 0rg0 movw %0, #%1 */ --#line 853 "rl78-decode.opc" -+#line 855 "rl78-decode.opc" - int rg AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -818,7 +820,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("movw %0, #%1"); --#line 853 "rl78-decode.opc" -+#line 855 "rl78-decode.opc" - ID(mov); W(); DRW(rg); SC(IMMU(2)); - - } -@@ -830,7 +832,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x00: - { - /** 0011 0001 0bit 0000 btclr %s1, $%a0 */ --#line 416 "rl78-decode.opc" -+#line 418 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -840,7 +842,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("btclr %s1, $%a0"); --#line 416 "rl78-decode.opc" -+#line 418 "rl78-decode.opc" - ID(branch_cond_clear); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T); - - /*----------------------------------------------------------------------*/ -@@ -850,7 +852,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x01: - { - /** 0011 0001 0bit 0001 btclr %1, $%a0 */ --#line 410 "rl78-decode.opc" -+#line 412 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -860,7 +862,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("btclr %1, $%a0"); --#line 410 "rl78-decode.opc" -+#line 412 "rl78-decode.opc" - ID(branch_cond_clear); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T); - - } -@@ -868,7 +870,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x02: - { - /** 0011 0001 0bit 0010 bt %s1, $%a0 */ --#line 402 "rl78-decode.opc" -+#line 404 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -878,7 +880,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bt %s1, $%a0"); --#line 402 "rl78-decode.opc" -+#line 404 "rl78-decode.opc" - ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T); - - /*----------------------------------------------------------------------*/ -@@ -888,7 +890,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x03: - { - /** 0011 0001 0bit 0011 bt %1, $%a0 */ --#line 396 "rl78-decode.opc" -+#line 398 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -898,7 +900,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bt %1, $%a0"); --#line 396 "rl78-decode.opc" -+#line 398 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T); - - } -@@ -906,7 +908,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x04: - { - /** 0011 0001 0bit 0100 bf %s1, $%a0 */ --#line 363 "rl78-decode.opc" -+#line 365 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -916,7 +918,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bf %s1, $%a0"); --#line 363 "rl78-decode.opc" -+#line 365 "rl78-decode.opc" - ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(F); - - /*----------------------------------------------------------------------*/ -@@ -926,7 +928,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x05: - { - /** 0011 0001 0bit 0101 bf %1, $%a0 */ --#line 357 "rl78-decode.opc" -+#line 359 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -936,7 +938,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bf %1, $%a0"); --#line 357 "rl78-decode.opc" -+#line 359 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(F); - - } -@@ -944,7 +946,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x07: - { - /** 0011 0001 0cnt 0111 shl %0, %1 */ --#line 1075 "rl78-decode.opc" -+#line 1077 "rl78-decode.opc" - int cnt AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -954,7 +956,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" cnt = 0x%x\n", cnt); - } - SYNTAX("shl %0, %1"); --#line 1075 "rl78-decode.opc" -+#line 1077 "rl78-decode.opc" - ID(shl); DR(C); SC(cnt); - - } -@@ -962,7 +964,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x08: - { - /** 0011 0001 0cnt 1000 shl %0, %1 */ --#line 1072 "rl78-decode.opc" -+#line 1074 "rl78-decode.opc" - int cnt AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -972,7 +974,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" cnt = 0x%x\n", cnt); - } - SYNTAX("shl %0, %1"); --#line 1072 "rl78-decode.opc" -+#line 1074 "rl78-decode.opc" - ID(shl); DR(B); SC(cnt); - - } -@@ -980,7 +982,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x09: - { - /** 0011 0001 0cnt 1001 shl %0, %1 */ --#line 1069 "rl78-decode.opc" -+#line 1071 "rl78-decode.opc" - int cnt AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -990,7 +992,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" cnt = 0x%x\n", cnt); - } - SYNTAX("shl %0, %1"); --#line 1069 "rl78-decode.opc" -+#line 1071 "rl78-decode.opc" - ID(shl); DR(A); SC(cnt); - - } -@@ -998,7 +1000,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x0a: - { - /** 0011 0001 0cnt 1010 shr %0, %1 */ --#line 1086 "rl78-decode.opc" -+#line 1088 "rl78-decode.opc" - int cnt AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1008,7 +1010,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" cnt = 0x%x\n", cnt); - } - SYNTAX("shr %0, %1"); --#line 1086 "rl78-decode.opc" -+#line 1088 "rl78-decode.opc" - ID(shr); DR(A); SC(cnt); - - } -@@ -1016,7 +1018,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x0b: - { - /** 0011 0001 0cnt 1011 sar %0, %1 */ --#line 1033 "rl78-decode.opc" -+#line 1035 "rl78-decode.opc" - int cnt AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1026,7 +1028,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" cnt = 0x%x\n", cnt); - } - SYNTAX("sar %0, %1"); --#line 1033 "rl78-decode.opc" -+#line 1035 "rl78-decode.opc" - ID(sar); DR(A); SC(cnt); - - } -@@ -1035,7 +1037,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x8c: - { - /** 0011 0001 wcnt 1100 shlw %0, %1 */ --#line 1081 "rl78-decode.opc" -+#line 1083 "rl78-decode.opc" - int wcnt AU = (op[1] >> 4) & 0x0f; - if (trace) - { -@@ -1045,7 +1047,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" wcnt = 0x%x\n", wcnt); - } - SYNTAX("shlw %0, %1"); --#line 1081 "rl78-decode.opc" -+#line 1083 "rl78-decode.opc" - ID(shl); W(); DR(BC); SC(wcnt); - - /*----------------------------------------------------------------------*/ -@@ -1056,7 +1058,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x8d: - { - /** 0011 0001 wcnt 1101 shlw %0, %1 */ --#line 1078 "rl78-decode.opc" -+#line 1080 "rl78-decode.opc" - int wcnt AU = (op[1] >> 4) & 0x0f; - if (trace) - { -@@ -1066,7 +1068,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" wcnt = 0x%x\n", wcnt); - } - SYNTAX("shlw %0, %1"); --#line 1078 "rl78-decode.opc" -+#line 1080 "rl78-decode.opc" - ID(shl); W(); DR(AX); SC(wcnt); - - } -@@ -1075,7 +1077,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x8e: - { - /** 0011 0001 wcnt 1110 shrw %0, %1 */ --#line 1089 "rl78-decode.opc" -+#line 1091 "rl78-decode.opc" - int wcnt AU = (op[1] >> 4) & 0x0f; - if (trace) - { -@@ -1085,7 +1087,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" wcnt = 0x%x\n", wcnt); - } - SYNTAX("shrw %0, %1"); --#line 1089 "rl78-decode.opc" -+#line 1091 "rl78-decode.opc" - ID(shr); W(); DR(AX); SC(wcnt); - - /*----------------------------------------------------------------------*/ -@@ -1096,7 +1098,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x8f: - { - /** 0011 0001 wcnt 1111 sarw %0, %1 */ --#line 1036 "rl78-decode.opc" -+#line 1038 "rl78-decode.opc" - int wcnt AU = (op[1] >> 4) & 0x0f; - if (trace) - { -@@ -1106,7 +1108,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" wcnt = 0x%x\n", wcnt); - } - SYNTAX("sarw %0, %1"); --#line 1036 "rl78-decode.opc" -+#line 1038 "rl78-decode.opc" - ID(sar); W(); DR(AX); SC(wcnt); - - /*----------------------------------------------------------------------*/ -@@ -1116,7 +1118,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x80: - { - /** 0011 0001 1bit 0000 btclr %s1, $%a0 */ --#line 413 "rl78-decode.opc" -+#line 415 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1126,7 +1128,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("btclr %s1, $%a0"); --#line 413 "rl78-decode.opc" -+#line 415 "rl78-decode.opc" - ID(branch_cond_clear); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T); - - } -@@ -1134,7 +1136,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x81: - { - /** 0011 0001 1bit 0001 btclr %e1, $%a0 */ --#line 407 "rl78-decode.opc" -+#line 409 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1144,7 +1146,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("btclr %e1, $%a0"); --#line 407 "rl78-decode.opc" -+#line 409 "rl78-decode.opc" - ID(branch_cond_clear); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T); - - } -@@ -1152,7 +1154,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x82: - { - /** 0011 0001 1bit 0010 bt %s1, $%a0 */ --#line 399 "rl78-decode.opc" -+#line 401 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1162,7 +1164,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bt %s1, $%a0"); --#line 399 "rl78-decode.opc" -+#line 401 "rl78-decode.opc" - ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T); - - } -@@ -1170,7 +1172,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x83: - { - /** 0011 0001 1bit 0011 bt %e1, $%a0 */ --#line 393 "rl78-decode.opc" -+#line 395 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1180,7 +1182,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bt %e1, $%a0"); --#line 393 "rl78-decode.opc" -+#line 395 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T); - - } -@@ -1188,7 +1190,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x84: - { - /** 0011 0001 1bit 0100 bf %s1, $%a0 */ --#line 360 "rl78-decode.opc" -+#line 362 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1198,7 +1200,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bf %s1, $%a0"); --#line 360 "rl78-decode.opc" -+#line 362 "rl78-decode.opc" - ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(F); - - } -@@ -1206,7 +1208,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x85: - { - /** 0011 0001 1bit 0101 bf %e1, $%a0 */ --#line 354 "rl78-decode.opc" -+#line 356 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -1216,7 +1218,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("bf %e1, $%a0"); --#line 354 "rl78-decode.opc" -+#line 356 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(F); - - } -@@ -1229,7 +1231,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x37: - { - /** 0011 0ra1 xchw %0, %1 */ --#line 1239 "rl78-decode.opc" -+#line 1241 "rl78-decode.opc" - int ra AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -1239,7 +1241,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("xchw %0, %1"); --#line 1239 "rl78-decode.opc" -+#line 1241 "rl78-decode.opc" - ID(xch); W(); DR(AX); SRW(ra); - - /*----------------------------------------------------------------------*/ -@@ -1256,7 +1258,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, #%1"); --#line 738 "rl78-decode.opc" -+#line 740 "rl78-decode.opc" - ID(mov); DM(C, IMMU(2)); SC(IMMU(1)); - - } -@@ -1271,7 +1273,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, #%1"); --#line 732 "rl78-decode.opc" -+#line 734 "rl78-decode.opc" - ID(mov); DM(BC, IMMU(2)); SC(IMMU(1)); - - } -@@ -1286,7 +1288,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, #%1"); --#line 1178 "rl78-decode.opc" -+#line 1180 "rl78-decode.opc" - ID(subc); DM(None, SADDR); SC(IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -1303,7 +1305,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, %1"); --#line 1175 "rl78-decode.opc" -+#line 1177 "rl78-decode.opc" - ID(subc); DR(A); SM(None, SADDR); Fzac; - - } -@@ -1318,7 +1320,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, #%1"); --#line 1166 "rl78-decode.opc" -+#line 1168 "rl78-decode.opc" - ID(subc); DR(A); SC(IMMU(1)); Fzac; - - } -@@ -1333,7 +1335,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, %e1"); --#line 1154 "rl78-decode.opc" -+#line 1156 "rl78-decode.opc" - ID(subc); DR(A); SM(HL, 0); Fzac; - - } -@@ -1348,7 +1350,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, %ea1"); --#line 1163 "rl78-decode.opc" -+#line 1165 "rl78-decode.opc" - ID(subc); DR(A); SM(HL, IMMU(1)); Fzac; - - } -@@ -1363,7 +1365,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("subc %0, %e!1"); --#line 1151 "rl78-decode.opc" -+#line 1153 "rl78-decode.opc" - ID(subc); DR(A); SM(None, IMMU(2)); Fzac; - - } -@@ -1378,7 +1380,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %e!0, #%1"); --#line 480 "rl78-decode.opc" -+#line 482 "rl78-decode.opc" - ID(cmp); DM(None, IMMU(2)); SC(IMMU(1)); Fzac; - - } -@@ -1393,7 +1395,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, #%1"); --#line 717 "rl78-decode.opc" -+#line 719 "rl78-decode.opc" - ID(mov); DR(ES); SC(IMMU(1)); - - } -@@ -1408,7 +1410,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmpw %0, %e!1"); --#line 531 "rl78-decode.opc" -+#line 533 "rl78-decode.opc" - ID(cmp); W(); DR(AX); SM(None, IMMU(2)); Fzac; - - } -@@ -1418,7 +1420,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x47: - { - /** 0100 0ra1 cmpw %0, %1 */ --#line 540 "rl78-decode.opc" -+#line 542 "rl78-decode.opc" - int ra AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -1428,7 +1430,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("cmpw %0, %1"); --#line 540 "rl78-decode.opc" -+#line 542 "rl78-decode.opc" - ID(cmp); W(); DR(AX); SRW(ra); Fzac; - - } -@@ -1443,7 +1445,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmpw %0, #%1"); --#line 537 "rl78-decode.opc" -+#line 539 "rl78-decode.opc" - ID(cmp); W(); DR(AX); SC(IMMU(2)); Fzac; - - } -@@ -1458,7 +1460,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmpw %0, %1"); --#line 543 "rl78-decode.opc" -+#line 545 "rl78-decode.opc" - ID(cmp); W(); DR(AX); SM(None, SADDR); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -1475,7 +1477,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, %1"); --#line 735 "rl78-decode.opc" -+#line 737 "rl78-decode.opc" - ID(mov); DM(BC, IMMU(2)); SR(A); - - } -@@ -1490,7 +1492,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e1"); --#line 681 "rl78-decode.opc" -+#line 683 "rl78-decode.opc" - ID(mov); DR(A); SM(BC, IMMU(2)); - - } -@@ -1505,7 +1507,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, #%1"); --#line 483 "rl78-decode.opc" -+#line 485 "rl78-decode.opc" - ID(cmp); DM(None, SADDR); SC(IMMU(1)); Fzac; - - } -@@ -1520,7 +1522,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, %1"); --#line 510 "rl78-decode.opc" -+#line 512 "rl78-decode.opc" - ID(cmp); DR(A); SM(None, SADDR); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -1537,7 +1539,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, #%1"); --#line 501 "rl78-decode.opc" -+#line 503 "rl78-decode.opc" - ID(cmp); DR(A); SC(IMMU(1)); Fzac; - - } -@@ -1552,7 +1554,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, %e1"); --#line 489 "rl78-decode.opc" -+#line 491 "rl78-decode.opc" - ID(cmp); DR(A); SM(HL, 0); Fzac; - - } -@@ -1567,7 +1569,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, %ea1"); --#line 498 "rl78-decode.opc" -+#line 500 "rl78-decode.opc" - ID(cmp); DR(A); SM(HL, IMMU(1)); Fzac; - - } -@@ -1582,7 +1584,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp %0, %e!1"); --#line 486 "rl78-decode.opc" -+#line 488 "rl78-decode.opc" - ID(cmp); DR(A); SM(None, IMMU(2)); Fzac; - - } -@@ -1597,7 +1599,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x57: - { - /** 0101 0reg mov %0, #%1 */ --#line 669 "rl78-decode.opc" -+#line 671 "rl78-decode.opc" - int reg AU = op[0] & 0x07; - if (trace) - { -@@ -1607,7 +1609,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("mov %0, #%1"); --#line 669 "rl78-decode.opc" -+#line 671 "rl78-decode.opc" - ID(mov); DRB(reg); SC(IMMU(1)); - - } -@@ -1622,7 +1624,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e0, %1"); --#line 871 "rl78-decode.opc" -+#line 873 "rl78-decode.opc" - ID(mov); W(); DM(B, IMMU(2)); SR(AX); - - } -@@ -1637,7 +1639,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e1"); --#line 862 "rl78-decode.opc" -+#line 864 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(B, IMMU(2)); - - } -@@ -1652,7 +1654,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, #%1"); --#line 312 "rl78-decode.opc" -+#line 314 "rl78-decode.opc" - ID(and); DM(None, SADDR); SC(IMMU(1)); Fz; - - /*----------------------------------------------------------------------*/ -@@ -1669,7 +1671,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, %1"); --#line 309 "rl78-decode.opc" -+#line 311 "rl78-decode.opc" - ID(and); DR(A); SM(None, SADDR); Fz; - - } -@@ -1684,7 +1686,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, #%1"); --#line 300 "rl78-decode.opc" -+#line 302 "rl78-decode.opc" - ID(and); DR(A); SC(IMMU(1)); Fz; - - } -@@ -1699,7 +1701,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, %e1"); --#line 288 "rl78-decode.opc" -+#line 290 "rl78-decode.opc" - ID(and); DR(A); SM(HL, 0); Fz; - - } -@@ -1714,7 +1716,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, %ea1"); --#line 294 "rl78-decode.opc" -+#line 296 "rl78-decode.opc" - ID(and); DR(A); SM(HL, IMMU(1)); Fz; - - } -@@ -1729,7 +1731,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("and %0, %e!1"); --#line 285 "rl78-decode.opc" -+#line 287 "rl78-decode.opc" - ID(and); DR(A); SM(None, IMMU(2)); Fz; - - } -@@ -1743,7 +1745,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x67: - { - /** 0110 0rba mov %0, %1 */ --#line 672 "rl78-decode.opc" -+#line 674 "rl78-decode.opc" - int rba AU = op[0] & 0x07; - if (trace) - { -@@ -1753,7 +1755,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("mov %0, %1"); --#line 672 "rl78-decode.opc" -+#line 674 "rl78-decode.opc" - ID(mov); DR(A); SRB(rba); - - } -@@ -1772,7 +1774,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x07: - { - /** 0110 0001 0000 0reg add %0, %1 */ --#line 225 "rl78-decode.opc" -+#line 227 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -1782,7 +1784,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("add %0, %1"); --#line 225 "rl78-decode.opc" -+#line 227 "rl78-decode.opc" - ID(add); DRB(reg); SR(A); Fzac; - - } -@@ -1796,7 +1798,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x0f: - { - /** 0110 0001 0000 1rba add %0, %1 */ --#line 219 "rl78-decode.opc" -+#line 221 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -1806,7 +1808,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("add %0, %1"); --#line 219 "rl78-decode.opc" -+#line 221 "rl78-decode.opc" - ID(add); DR(A); SRB(rba); Fzac; - - } -@@ -1821,7 +1823,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("addw %0, %ea1"); --#line 268 "rl78-decode.opc" -+#line 270 "rl78-decode.opc" - ID(add); W(); DR(AX); SM(HL, IMMU(1)); Fzac; - - } -@@ -1836,7 +1838,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x17: - { - /** 0110 0001 0001 0reg addc %0, %1 */ --#line 254 "rl78-decode.opc" -+#line 256 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -1846,7 +1848,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("addc %0, %1"); --#line 254 "rl78-decode.opc" -+#line 256 "rl78-decode.opc" - ID(addc); DRB(reg); SR(A); Fzac; - - } -@@ -1860,7 +1862,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x1f: - { - /** 0110 0001 0001 1rba addc %0, %1 */ --#line 251 "rl78-decode.opc" -+#line 253 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -1870,7 +1872,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("addc %0, %1"); --#line 251 "rl78-decode.opc" -+#line 253 "rl78-decode.opc" - ID(addc); DR(A); SRB(rba); Fzac; - - } -@@ -1885,7 +1887,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x27: - { - /** 0110 0001 0010 0reg sub %0, %1 */ --#line 1143 "rl78-decode.opc" -+#line 1145 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -1895,7 +1897,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("sub %0, %1"); --#line 1143 "rl78-decode.opc" -+#line 1145 "rl78-decode.opc" - ID(sub); DRB(reg); SR(A); Fzac; - - } -@@ -1909,7 +1911,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x2f: - { - /** 0110 0001 0010 1rba sub %0, %1 */ --#line 1137 "rl78-decode.opc" -+#line 1139 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -1919,7 +1921,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("sub %0, %1"); --#line 1137 "rl78-decode.opc" -+#line 1139 "rl78-decode.opc" - ID(sub); DR(A); SRB(rba); Fzac; - - } -@@ -1934,7 +1936,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("subw %0, %ea1"); --#line 1186 "rl78-decode.opc" -+#line 1188 "rl78-decode.opc" - ID(sub); W(); DR(AX); SM(HL, IMMU(1)); Fzac; - - } -@@ -1949,7 +1951,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x37: - { - /** 0110 0001 0011 0reg subc %0, %1 */ --#line 1172 "rl78-decode.opc" -+#line 1174 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -1959,7 +1961,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("subc %0, %1"); --#line 1172 "rl78-decode.opc" -+#line 1174 "rl78-decode.opc" - ID(subc); DRB(reg); SR(A); Fzac; - - } -@@ -1973,7 +1975,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x3f: - { - /** 0110 0001 0011 1rba subc %0, %1 */ --#line 1169 "rl78-decode.opc" -+#line 1171 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -1983,7 +1985,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("subc %0, %1"); --#line 1169 "rl78-decode.opc" -+#line 1171 "rl78-decode.opc" - ID(subc); DR(A); SRB(rba); Fzac; - - } -@@ -1998,7 +2000,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x47: - { - /** 0110 0001 0100 0reg cmp %0, %1 */ --#line 507 "rl78-decode.opc" -+#line 509 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -2008,7 +2010,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("cmp %0, %1"); --#line 507 "rl78-decode.opc" -+#line 509 "rl78-decode.opc" - ID(cmp); DRB(reg); SR(A); Fzac; - - } -@@ -2022,7 +2024,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x4f: - { - /** 0110 0001 0100 1rba cmp %0, %1 */ --#line 504 "rl78-decode.opc" -+#line 506 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -2032,7 +2034,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("cmp %0, %1"); --#line 504 "rl78-decode.opc" -+#line 506 "rl78-decode.opc" - ID(cmp); DR(A); SRB(rba); Fzac; - - } -@@ -2047,7 +2049,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("cmpw %0, %ea1"); --#line 534 "rl78-decode.opc" -+#line 536 "rl78-decode.opc" - ID(cmp); W(); DR(AX); SM(HL, IMMU(1)); Fzac; - - } -@@ -2062,7 +2064,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x57: - { - /** 0110 0001 0101 0reg and %0, %1 */ --#line 306 "rl78-decode.opc" -+#line 308 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -2072,7 +2074,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("and %0, %1"); --#line 306 "rl78-decode.opc" -+#line 308 "rl78-decode.opc" - ID(and); DRB(reg); SR(A); Fz; - - } -@@ -2086,7 +2088,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x5f: - { - /** 0110 0001 0101 1rba and %0, %1 */ --#line 303 "rl78-decode.opc" -+#line 305 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -2096,7 +2098,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("and %0, %1"); --#line 303 "rl78-decode.opc" -+#line 305 "rl78-decode.opc" - ID(and); DR(A); SRB(rba); Fz; - - } -@@ -2111,7 +2113,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("inc %ea0"); --#line 584 "rl78-decode.opc" -+#line 586 "rl78-decode.opc" - ID(add); DM(HL, IMMU(1)); SC(1); Fza; - - } -@@ -2126,7 +2128,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x67: - { - /** 0110 0001 0110 0reg or %0, %1 */ --#line 961 "rl78-decode.opc" -+#line 963 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -2136,7 +2138,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("or %0, %1"); --#line 961 "rl78-decode.opc" -+#line 963 "rl78-decode.opc" - ID(or); DRB(reg); SR(A); Fz; - - } -@@ -2150,7 +2152,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x6f: - { - /** 0110 0001 0110 1rba or %0, %1 */ --#line 958 "rl78-decode.opc" -+#line 960 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -2160,7 +2162,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("or %0, %1"); --#line 958 "rl78-decode.opc" -+#line 960 "rl78-decode.opc" - ID(or); DR(A); SRB(rba); Fz; - - } -@@ -2175,7 +2177,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("dec %ea0"); --#line 551 "rl78-decode.opc" -+#line 553 "rl78-decode.opc" - ID(sub); DM(HL, IMMU(1)); SC(1); Fza; - - } -@@ -2190,7 +2192,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x77: - { - /** 0110 0001 0111 0reg xor %0, %1 */ --#line 1265 "rl78-decode.opc" -+#line 1267 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -2200,7 +2202,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("xor %0, %1"); --#line 1265 "rl78-decode.opc" -+#line 1267 "rl78-decode.opc" - ID(xor); DRB(reg); SR(A); Fz; - - } -@@ -2214,7 +2216,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7f: - { - /** 0110 0001 0111 1rba xor %0, %1 */ --#line 1262 "rl78-decode.opc" -+#line 1264 "rl78-decode.opc" - int rba AU = op[1] & 0x07; - if (trace) - { -@@ -2224,7 +2226,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("xor %0, %1"); --#line 1262 "rl78-decode.opc" -+#line 1264 "rl78-decode.opc" - ID(xor); DR(A); SRB(rba); Fz; - - } -@@ -2239,7 +2241,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("incw %ea0"); --#line 598 "rl78-decode.opc" -+#line 600 "rl78-decode.opc" - ID(add); W(); DM(HL, IMMU(1)); SC(1); - - } -@@ -2255,7 +2257,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("add %0, %e1"); --#line 207 "rl78-decode.opc" -+#line 209 "rl78-decode.opc" - ID(add); DR(A); SM2(HL, B, 0); Fzac; - - } -@@ -2270,7 +2272,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("add %0, %e1"); --#line 213 "rl78-decode.opc" -+#line 215 "rl78-decode.opc" - ID(add); DR(A); SM2(HL, C, 0); Fzac; - - } -@@ -2309,9 +2311,9 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf7: - { - /** 0110 0001 1nnn 01mm callt [%x0] */ --#line 433 "rl78-decode.opc" -+#line 435 "rl78-decode.opc" - int nnn AU = (op[1] >> 4) & 0x07; --#line 433 "rl78-decode.opc" -+#line 435 "rl78-decode.opc" - int mm AU = op[1] & 0x03; - if (trace) - { -@@ -2322,7 +2324,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" mm = 0x%x\n", mm); - } - SYNTAX("callt [%x0]"); --#line 433 "rl78-decode.opc" -+#line 435 "rl78-decode.opc" - ID(call); DM(None, 0x80 + mm*16 + nnn*2); - - /*----------------------------------------------------------------------*/ -@@ -2338,7 +2340,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x8f: - { - /** 0110 0001 1000 1reg xch %0, %1 */ --#line 1224 "rl78-decode.opc" -+#line 1226 "rl78-decode.opc" - int reg AU = op[1] & 0x07; - if (trace) - { -@@ -2348,7 +2350,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("xch %0, %1"); --#line 1224 "rl78-decode.opc" -+#line 1226 "rl78-decode.opc" - /* Note: DECW uses reg == X, so this must follow DECW */ - ID(xch); DR(A); SRB(reg); - -@@ -2364,7 +2366,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("decw %ea0"); --#line 565 "rl78-decode.opc" -+#line 567 "rl78-decode.opc" - ID(sub); W(); DM(HL, IMMU(1)); SC(1); - - } -@@ -2379,7 +2381,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("addc %0, %e1"); --#line 239 "rl78-decode.opc" -+#line 241 "rl78-decode.opc" - ID(addc); DR(A); SM2(HL, B, 0); Fzac; - - } -@@ -2394,7 +2396,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("addc %0, %e1"); --#line 242 "rl78-decode.opc" -+#line 244 "rl78-decode.opc" - ID(addc); DR(A); SM2(HL, C, 0); Fzac; - - } -@@ -2410,7 +2412,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sub %0, %e1"); --#line 1125 "rl78-decode.opc" -+#line 1127 "rl78-decode.opc" - ID(sub); DR(A); SM2(HL, B, 0); Fzac; - - } -@@ -2425,7 +2427,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sub %0, %e1"); --#line 1131 "rl78-decode.opc" -+#line 1133 "rl78-decode.opc" - ID(sub); DR(A); SM2(HL, C, 0); Fzac; - - } -@@ -2440,7 +2442,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %1"); --#line 1228 "rl78-decode.opc" -+#line 1230 "rl78-decode.opc" - ID(xch); DR(A); SM(None, SADDR); - - } -@@ -2455,7 +2457,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %e1"); --#line 1221 "rl78-decode.opc" -+#line 1223 "rl78-decode.opc" - ID(xch); DR(A); SM2(HL, C, 0); - - } -@@ -2470,7 +2472,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %e!1"); --#line 1203 "rl78-decode.opc" -+#line 1205 "rl78-decode.opc" - ID(xch); DR(A); SM(None, IMMU(2)); - - } -@@ -2485,7 +2487,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %s1"); --#line 1231 "rl78-decode.opc" -+#line 1233 "rl78-decode.opc" - ID(xch); DR(A); SM(None, SFR); - - } -@@ -2500,7 +2502,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %e1"); --#line 1212 "rl78-decode.opc" -+#line 1214 "rl78-decode.opc" - ID(xch); DR(A); SM(HL, 0); - - } -@@ -2515,7 +2517,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %ea1"); --#line 1218 "rl78-decode.opc" -+#line 1220 "rl78-decode.opc" - ID(xch); DR(A); SM(HL, IMMU(1)); - - } -@@ -2530,7 +2532,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %e1"); --#line 1206 "rl78-decode.opc" -+#line 1208 "rl78-decode.opc" - ID(xch); DR(A); SM(DE, 0); - - } -@@ -2545,7 +2547,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %ea1"); --#line 1209 "rl78-decode.opc" -+#line 1211 "rl78-decode.opc" - ID(xch); DR(A); SM(DE, IMMU(1)); - - } -@@ -2560,7 +2562,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("subc %0, %e1"); --#line 1157 "rl78-decode.opc" -+#line 1159 "rl78-decode.opc" - ID(subc); DR(A); SM2(HL, B, 0); Fzac; - - } -@@ -2575,7 +2577,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("subc %0, %e1"); --#line 1160 "rl78-decode.opc" -+#line 1162 "rl78-decode.opc" - ID(subc); DR(A); SM2(HL, C, 0); Fzac; - - } -@@ -2590,7 +2592,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("mov %0, %1"); --#line 723 "rl78-decode.opc" -+#line 725 "rl78-decode.opc" - ID(mov); DR(ES); SM(None, SADDR); - - } -@@ -2605,7 +2607,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xch %0, %e1"); --#line 1215 "rl78-decode.opc" -+#line 1217 "rl78-decode.opc" - ID(xch); DR(A); SM2(HL, B, 0); - - } -@@ -2620,7 +2622,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("cmp %0, %e1"); --#line 492 "rl78-decode.opc" -+#line 494 "rl78-decode.opc" - ID(cmp); DR(A); SM2(HL, B, 0); Fzac; - - } -@@ -2635,7 +2637,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("cmp %0, %e1"); --#line 495 "rl78-decode.opc" -+#line 497 "rl78-decode.opc" - ID(cmp); DR(A); SM2(HL, C, 0); Fzac; - - } -@@ -2650,7 +2652,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("bh $%a0"); --#line 340 "rl78-decode.opc" -+#line 342 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(H); - - } -@@ -2665,7 +2667,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1094 "rl78-decode.opc" -+#line 1096 "rl78-decode.opc" - ID(skip); COND(C); - - } -@@ -2680,7 +2682,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("mov %0, %e1"); --#line 660 "rl78-decode.opc" -+#line 662 "rl78-decode.opc" - ID(mov); DR(A); SM2(HL, B, 0); - - } -@@ -2691,7 +2693,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfa: - { - /** 0110 0001 11rg 1010 call %0 */ --#line 430 "rl78-decode.opc" -+#line 432 "rl78-decode.opc" - int rg AU = (op[1] >> 4) & 0x03; - if (trace) - { -@@ -2701,7 +2703,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("call %0"); --#line 430 "rl78-decode.opc" -+#line 432 "rl78-decode.opc" - ID(call); DRW(rg); - - } -@@ -2716,7 +2718,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("br ax"); --#line 380 "rl78-decode.opc" -+#line 382 "rl78-decode.opc" - ID(branch); DR(AX); - - /*----------------------------------------------------------------------*/ -@@ -2733,7 +2735,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("brk"); --#line 388 "rl78-decode.opc" -+#line 390 "rl78-decode.opc" - ID(break); - - /*----------------------------------------------------------------------*/ -@@ -2750,7 +2752,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("pop %s0"); --#line 989 "rl78-decode.opc" -+#line 991 "rl78-decode.opc" - ID(mov); W(); DR(PSW); SPOP(); - - /*----------------------------------------------------------------------*/ -@@ -2767,7 +2769,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("movs %ea0, %1"); --#line 811 "rl78-decode.opc" -+#line 813 "rl78-decode.opc" - ID(mov); DM(HL, IMMU(1)); SR(X); Fzc; - - /*----------------------------------------------------------------------*/ -@@ -2780,7 +2782,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xff: - { - /** 0110 0001 11rb 1111 sel rb%1 */ --#line 1041 "rl78-decode.opc" -+#line 1043 "rl78-decode.opc" - int rb AU = (op[1] >> 4) & 0x03; - if (trace) - { -@@ -2790,7 +2792,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rb = 0x%x\n", rb); - } - SYNTAX("sel rb%1"); --#line 1041 "rl78-decode.opc" -+#line 1043 "rl78-decode.opc" - ID(sel); SC(rb); - - /*----------------------------------------------------------------------*/ -@@ -2807,7 +2809,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("and %0, %e1"); --#line 291 "rl78-decode.opc" -+#line 293 "rl78-decode.opc" - ID(and); DR(A); SM2(HL, B, 0); Fz; - - } -@@ -2822,7 +2824,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("and %0, %e1"); --#line 297 "rl78-decode.opc" -+#line 299 "rl78-decode.opc" - ID(and); DR(A); SM2(HL, C, 0); Fz; - - } -@@ -2837,7 +2839,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("bnh $%a0"); --#line 343 "rl78-decode.opc" -+#line 345 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(NH); - - } -@@ -2852,7 +2854,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1100 "rl78-decode.opc" -+#line 1102 "rl78-decode.opc" - ID(skip); COND(NC); - - } -@@ -2867,7 +2869,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("mov %e0, %1"); --#line 627 "rl78-decode.opc" -+#line 629 "rl78-decode.opc" - ID(mov); DM2(HL, B, 0); SR(A); - - } -@@ -2882,7 +2884,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("ror %0, %1"); --#line 1022 "rl78-decode.opc" -+#line 1024 "rl78-decode.opc" - ID(ror); DR(A); SC(1); - - } -@@ -2897,7 +2899,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("rolc %0, %1"); --#line 1016 "rl78-decode.opc" -+#line 1018 "rl78-decode.opc" - ID(rolc); DR(A); SC(1); - - } -@@ -2912,7 +2914,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("push %s1"); --#line 997 "rl78-decode.opc" -+#line 999 "rl78-decode.opc" - ID(mov); W(); DPUSH(); SR(PSW); - - /*----------------------------------------------------------------------*/ -@@ -2929,7 +2931,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("cmps %0, %ea1"); --#line 526 "rl78-decode.opc" -+#line 528 "rl78-decode.opc" - ID(cmp); DR(X); SM(HL, IMMU(1)); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -2946,7 +2948,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("or %0, %e1"); --#line 946 "rl78-decode.opc" -+#line 948 "rl78-decode.opc" - ID(or); DR(A); SM2(HL, B, 0); Fz; - - } -@@ -2961,7 +2963,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("or %0, %e1"); --#line 952 "rl78-decode.opc" -+#line 954 "rl78-decode.opc" - ID(or); DR(A); SM2(HL, C, 0); Fz; - - } -@@ -2976,7 +2978,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1097 "rl78-decode.opc" -+#line 1099 "rl78-decode.opc" - ID(skip); COND(H); - - } -@@ -2991,7 +2993,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1109 "rl78-decode.opc" -+#line 1111 "rl78-decode.opc" - ID(skip); COND(Z); - - /*----------------------------------------------------------------------*/ -@@ -3008,7 +3010,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("mov %0, %e1"); --#line 663 "rl78-decode.opc" -+#line 665 "rl78-decode.opc" - ID(mov); DR(A); SM2(HL, C, 0); - - } -@@ -3023,7 +3025,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("rol %0, %1"); --#line 1013 "rl78-decode.opc" -+#line 1015 "rl78-decode.opc" - ID(rol); DR(A); SC(1); - - } -@@ -3038,7 +3040,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("retb"); --#line 1008 "rl78-decode.opc" -+#line 1010 "rl78-decode.opc" - ID(reti); - - /*----------------------------------------------------------------------*/ -@@ -3055,7 +3057,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("halt"); --#line 576 "rl78-decode.opc" -+#line 578 "rl78-decode.opc" - ID(halt); - - /*----------------------------------------------------------------------*/ -@@ -3066,7 +3068,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfe: - { - /** 0110 0001 111r 1110 rolwc %0, %1 */ --#line 1019 "rl78-decode.opc" -+#line 1021 "rl78-decode.opc" - int r AU = (op[1] >> 4) & 0x01; - if (trace) - { -@@ -3076,7 +3078,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" r = 0x%x\n", r); - } - SYNTAX("rolwc %0, %1"); --#line 1019 "rl78-decode.opc" -+#line 1021 "rl78-decode.opc" - ID(rolc); W(); DRW(r); SC(1); - - } -@@ -3091,7 +3093,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xor %0, %e1"); --#line 1250 "rl78-decode.opc" -+#line 1252 "rl78-decode.opc" - ID(xor); DR(A); SM2(HL, B, 0); Fz; - - } -@@ -3106,7 +3108,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("xor %0, %e1"); --#line 1256 "rl78-decode.opc" -+#line 1258 "rl78-decode.opc" - ID(xor); DR(A); SM2(HL, C, 0); Fz; - - } -@@ -3121,7 +3123,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1103 "rl78-decode.opc" -+#line 1105 "rl78-decode.opc" - ID(skip); COND(NH); - - } -@@ -3136,7 +3138,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("sk%c1"); --#line 1106 "rl78-decode.opc" -+#line 1108 "rl78-decode.opc" - ID(skip); COND(NZ); - - } -@@ -3151,7 +3153,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("mov %e0, %1"); --#line 636 "rl78-decode.opc" -+#line 638 "rl78-decode.opc" - ID(mov); DM2(HL, C, 0); SR(A); - - } -@@ -3166,7 +3168,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("rorc %0, %1"); --#line 1025 "rl78-decode.opc" -+#line 1027 "rl78-decode.opc" - ID(rorc); DR(A); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -3186,7 +3188,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("reti"); --#line 1005 "rl78-decode.opc" -+#line 1007 "rl78-decode.opc" - ID(reti); - - } -@@ -3201,7 +3203,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("stop"); --#line 1114 "rl78-decode.opc" -+#line 1116 "rl78-decode.opc" - ID(stop); - - /*----------------------------------------------------------------------*/ -@@ -3221,7 +3223,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e0, %1"); --#line 874 "rl78-decode.opc" -+#line 876 "rl78-decode.opc" - ID(mov); W(); DM(C, IMMU(2)); SR(AX); - - } -@@ -3236,7 +3238,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e1"); --#line 865 "rl78-decode.opc" -+#line 867 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(C, IMMU(2)); - - } -@@ -3251,7 +3253,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, #%1"); --#line 967 "rl78-decode.opc" -+#line 969 "rl78-decode.opc" - ID(or); DM(None, SADDR); SC(IMMU(1)); Fz; - - /*----------------------------------------------------------------------*/ -@@ -3268,7 +3270,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, %1"); --#line 964 "rl78-decode.opc" -+#line 966 "rl78-decode.opc" - ID(or); DR(A); SM(None, SADDR); Fz; - - } -@@ -3283,7 +3285,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, #%1"); --#line 955 "rl78-decode.opc" -+#line 957 "rl78-decode.opc" - ID(or); DR(A); SC(IMMU(1)); Fz; - - } -@@ -3298,7 +3300,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, %e1"); --#line 943 "rl78-decode.opc" -+#line 945 "rl78-decode.opc" - ID(or); DR(A); SM(HL, 0); Fz; - - } -@@ -3313,7 +3315,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, %ea1"); --#line 949 "rl78-decode.opc" -+#line 951 "rl78-decode.opc" - ID(or); DR(A); SM(HL, IMMU(1)); Fz; - - } -@@ -3328,7 +3330,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("or %0, %e!1"); --#line 940 "rl78-decode.opc" -+#line 942 "rl78-decode.opc" - ID(or); DR(A); SM(None, IMMU(2)); Fz; - - } -@@ -3342,7 +3344,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x77: - { - /** 0111 0rba mov %0, %1 */ --#line 696 "rl78-decode.opc" -+#line 698 "rl78-decode.opc" - int rba AU = op[0] & 0x07; - if (trace) - { -@@ -3352,7 +3354,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rba = 0x%x\n", rba); - } - SYNTAX("mov %0, %1"); --#line 696 "rl78-decode.opc" -+#line 698 "rl78-decode.opc" - ID(mov); DRB(rba); SR(A); - - } -@@ -3371,7 +3373,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x70: - { - /** 0111 0001 0bit 0000 set1 %e!0 */ --#line 1046 "rl78-decode.opc" -+#line 1048 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3381,7 +3383,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("set1 %e!0"); --#line 1046 "rl78-decode.opc" -+#line 1048 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); DB(bit); SC(1); - - } -@@ -3396,7 +3398,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x71: - { - /** 0111 0001 0bit 0001 mov1 %0, cy */ --#line 803 "rl78-decode.opc" -+#line 805 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3406,7 +3408,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 %0, cy"); --#line 803 "rl78-decode.opc" -+#line 805 "rl78-decode.opc" - ID(mov); DM(None, SADDR); DB(bit); SCY(); - - } -@@ -3421,7 +3423,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x72: - { - /** 0111 0001 0bit 0010 set1 %0 */ --#line 1064 "rl78-decode.opc" -+#line 1066 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3431,7 +3433,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("set1 %0"); --#line 1064 "rl78-decode.opc" -+#line 1066 "rl78-decode.opc" - ID(mov); DM(None, SADDR); DB(bit); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -3448,7 +3450,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x73: - { - /** 0111 0001 0bit 0011 clr1 %0 */ --#line 456 "rl78-decode.opc" -+#line 458 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3458,7 +3460,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("clr1 %0"); --#line 456 "rl78-decode.opc" -+#line 458 "rl78-decode.opc" - ID(mov); DM(None, SADDR); DB(bit); SC(0); - - /*----------------------------------------------------------------------*/ -@@ -3475,7 +3477,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x74: - { - /** 0111 0001 0bit 0100 mov1 cy, %1 */ --#line 797 "rl78-decode.opc" -+#line 799 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3485,7 +3487,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 cy, %1"); --#line 797 "rl78-decode.opc" -+#line 799 "rl78-decode.opc" - ID(mov); DCY(); SM(None, SADDR); SB(bit); - - } -@@ -3500,7 +3502,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x75: - { - /** 0111 0001 0bit 0101 and1 cy, %s1 */ --#line 326 "rl78-decode.opc" -+#line 328 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3510,7 +3512,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("and1 cy, %s1"); --#line 326 "rl78-decode.opc" -+#line 328 "rl78-decode.opc" - ID(and); DCY(); SM(None, SADDR); SB(bit); - - /*----------------------------------------------------------------------*/ -@@ -3530,7 +3532,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x76: - { - /** 0111 0001 0bit 0110 or1 cy, %s1 */ --#line 981 "rl78-decode.opc" -+#line 983 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3540,7 +3542,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("or1 cy, %s1"); --#line 981 "rl78-decode.opc" -+#line 983 "rl78-decode.opc" - ID(or); DCY(); SM(None, SADDR); SB(bit); - - /*----------------------------------------------------------------------*/ -@@ -3557,7 +3559,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x77: - { - /** 0111 0001 0bit 0111 xor1 cy, %s1 */ --#line 1285 "rl78-decode.opc" -+#line 1287 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3567,7 +3569,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("xor1 cy, %s1"); --#line 1285 "rl78-decode.opc" -+#line 1287 "rl78-decode.opc" - ID(xor); DCY(); SM(None, SADDR); SB(bit); - - /*----------------------------------------------------------------------*/ -@@ -3584,7 +3586,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x78: - { - /** 0111 0001 0bit 1000 clr1 %e!0 */ --#line 438 "rl78-decode.opc" -+#line 440 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3594,7 +3596,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("clr1 %e!0"); --#line 438 "rl78-decode.opc" -+#line 440 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); DB(bit); SC(0); - - } -@@ -3609,7 +3611,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x79: - { - /** 0111 0001 0bit 1001 mov1 %s0, cy */ --#line 806 "rl78-decode.opc" -+#line 808 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3619,7 +3621,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 %s0, cy"); --#line 806 "rl78-decode.opc" -+#line 808 "rl78-decode.opc" - ID(mov); DM(None, SFR); DB(bit); SCY(); - - /*----------------------------------------------------------------------*/ -@@ -3636,7 +3638,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7a: - { - /** 0111 0001 0bit 1010 set1 %s0 */ --#line 1058 "rl78-decode.opc" -+#line 1060 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3646,7 +3648,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("set1 %s0"); --#line 1058 "rl78-decode.opc" -+#line 1060 "rl78-decode.opc" - op0 = SFR; - ID(mov); DM(None, op0); DB(bit); SC(1); - if (op0 == RL78_SFR_PSW && bit == 7) -@@ -3664,7 +3666,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7b: - { - /** 0111 0001 0bit 1011 clr1 %s0 */ --#line 450 "rl78-decode.opc" -+#line 452 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3674,7 +3676,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("clr1 %s0"); --#line 450 "rl78-decode.opc" -+#line 452 "rl78-decode.opc" - op0 = SFR; - ID(mov); DM(None, op0); DB(bit); SC(0); - if (op0 == RL78_SFR_PSW && bit == 7) -@@ -3692,7 +3694,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7c: - { - /** 0111 0001 0bit 1100 mov1 cy, %s1 */ --#line 800 "rl78-decode.opc" -+#line 802 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3702,7 +3704,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 cy, %s1"); --#line 800 "rl78-decode.opc" -+#line 802 "rl78-decode.opc" - ID(mov); DCY(); SM(None, SFR); SB(bit); - - } -@@ -3717,7 +3719,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7d: - { - /** 0111 0001 0bit 1101 and1 cy, %s1 */ --#line 323 "rl78-decode.opc" -+#line 325 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3727,7 +3729,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("and1 cy, %s1"); --#line 323 "rl78-decode.opc" -+#line 325 "rl78-decode.opc" - ID(and); DCY(); SM(None, SFR); SB(bit); - - } -@@ -3742,7 +3744,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7e: - { - /** 0111 0001 0bit 1110 or1 cy, %s1 */ --#line 978 "rl78-decode.opc" -+#line 980 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3752,7 +3754,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("or1 cy, %s1"); --#line 978 "rl78-decode.opc" -+#line 980 "rl78-decode.opc" - ID(or); DCY(); SM(None, SFR); SB(bit); - - } -@@ -3767,7 +3769,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x7f: - { - /** 0111 0001 0bit 1111 xor1 cy, %s1 */ --#line 1282 "rl78-decode.opc" -+#line 1284 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3777,7 +3779,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("xor1 cy, %s1"); --#line 1282 "rl78-decode.opc" -+#line 1284 "rl78-decode.opc" - ID(xor); DCY(); SM(None, SFR); SB(bit); - - } -@@ -3792,7 +3794,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("set1 cy"); --#line 1055 "rl78-decode.opc" -+#line 1057 "rl78-decode.opc" - ID(mov); DCY(); SC(1); - - } -@@ -3807,7 +3809,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf1: - { - /** 0111 0001 1bit 0001 mov1 %e0, cy */ --#line 785 "rl78-decode.opc" -+#line 787 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3817,7 +3819,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 %e0, cy"); --#line 785 "rl78-decode.opc" -+#line 787 "rl78-decode.opc" - ID(mov); DM(HL, 0); DB(bit); SCY(); - - } -@@ -3832,7 +3834,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf2: - { - /** 0111 0001 1bit 0010 set1 %e0 */ --#line 1049 "rl78-decode.opc" -+#line 1051 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3842,7 +3844,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("set1 %e0"); --#line 1049 "rl78-decode.opc" -+#line 1051 "rl78-decode.opc" - ID(mov); DM(HL, 0); DB(bit); SC(1); - - } -@@ -3857,7 +3859,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf3: - { - /** 0111 0001 1bit 0011 clr1 %e0 */ --#line 441 "rl78-decode.opc" -+#line 443 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3867,7 +3869,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("clr1 %e0"); --#line 441 "rl78-decode.opc" -+#line 443 "rl78-decode.opc" - ID(mov); DM(HL, 0); DB(bit); SC(0); - - } -@@ -3882,7 +3884,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf4: - { - /** 0111 0001 1bit 0100 mov1 cy, %e1 */ --#line 791 "rl78-decode.opc" -+#line 793 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3892,7 +3894,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 cy, %e1"); --#line 791 "rl78-decode.opc" -+#line 793 "rl78-decode.opc" - ID(mov); DCY(); SM(HL, 0); SB(bit); - - } -@@ -3907,7 +3909,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf5: - { - /** 0111 0001 1bit 0101 and1 cy, %e1 */ --#line 317 "rl78-decode.opc" -+#line 319 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3917,7 +3919,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("and1 cy, %e1"); --#line 317 "rl78-decode.opc" -+#line 319 "rl78-decode.opc" - ID(and); DCY(); SM(HL, 0); SB(bit); - - } -@@ -3932,7 +3934,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf6: - { - /** 0111 0001 1bit 0110 or1 cy, %e1 */ --#line 972 "rl78-decode.opc" -+#line 974 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3942,7 +3944,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("or1 cy, %e1"); --#line 972 "rl78-decode.opc" -+#line 974 "rl78-decode.opc" - ID(or); DCY(); SM(HL, 0); SB(bit); - - } -@@ -3957,7 +3959,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf7: - { - /** 0111 0001 1bit 0111 xor1 cy, %e1 */ --#line 1276 "rl78-decode.opc" -+#line 1278 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -3967,7 +3969,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("xor1 cy, %e1"); --#line 1276 "rl78-decode.opc" -+#line 1278 "rl78-decode.opc" - ID(xor); DCY(); SM(HL, 0); SB(bit); - - } -@@ -3982,7 +3984,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("clr1 cy"); --#line 447 "rl78-decode.opc" -+#line 449 "rl78-decode.opc" - ID(mov); DCY(); SC(0); - - } -@@ -3997,7 +3999,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf9: - { - /** 0111 0001 1bit 1001 mov1 %e0, cy */ --#line 788 "rl78-decode.opc" -+#line 790 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4007,7 +4009,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 %e0, cy"); --#line 788 "rl78-decode.opc" -+#line 790 "rl78-decode.opc" - ID(mov); DR(A); DB(bit); SCY(); - - } -@@ -4022,7 +4024,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfa: - { - /** 0111 0001 1bit 1010 set1 %0 */ --#line 1052 "rl78-decode.opc" -+#line 1054 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4032,7 +4034,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("set1 %0"); --#line 1052 "rl78-decode.opc" -+#line 1054 "rl78-decode.opc" - ID(mov); DR(A); DB(bit); SC(1); - - } -@@ -4047,7 +4049,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfb: - { - /** 0111 0001 1bit 1011 clr1 %0 */ --#line 444 "rl78-decode.opc" -+#line 446 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4057,7 +4059,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("clr1 %0"); --#line 444 "rl78-decode.opc" -+#line 446 "rl78-decode.opc" - ID(mov); DR(A); DB(bit); SC(0); - - } -@@ -4072,7 +4074,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfc: - { - /** 0111 0001 1bit 1100 mov1 cy, %e1 */ --#line 794 "rl78-decode.opc" -+#line 796 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4082,7 +4084,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("mov1 cy, %e1"); --#line 794 "rl78-decode.opc" -+#line 796 "rl78-decode.opc" - ID(mov); DCY(); SR(A); SB(bit); - - } -@@ -4097,7 +4099,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfd: - { - /** 0111 0001 1bit 1101 and1 cy, %1 */ --#line 320 "rl78-decode.opc" -+#line 322 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4107,7 +4109,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("and1 cy, %1"); --#line 320 "rl78-decode.opc" -+#line 322 "rl78-decode.opc" - ID(and); DCY(); SR(A); SB(bit); - - } -@@ -4122,7 +4124,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfe: - { - /** 0111 0001 1bit 1110 or1 cy, %1 */ --#line 975 "rl78-decode.opc" -+#line 977 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4132,7 +4134,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("or1 cy, %1"); --#line 975 "rl78-decode.opc" -+#line 977 "rl78-decode.opc" - ID(or); DCY(); SR(A); SB(bit); - - } -@@ -4147,7 +4149,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xff: - { - /** 0111 0001 1bit 1111 xor1 cy, %1 */ --#line 1279 "rl78-decode.opc" -+#line 1281 "rl78-decode.opc" - int bit AU = (op[1] >> 4) & 0x07; - if (trace) - { -@@ -4157,7 +4159,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" bit = 0x%x\n", bit); - } - SYNTAX("xor1 cy, %1"); --#line 1279 "rl78-decode.opc" -+#line 1281 "rl78-decode.opc" - ID(xor); DCY(); SR(A); SB(bit); - - } -@@ -4172,7 +4174,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0], op[1]); - } - SYNTAX("not1 cy"); --#line 916 "rl78-decode.opc" -+#line 918 "rl78-decode.opc" - ID(xor); DCY(); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -4192,7 +4194,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e0, %1"); --#line 877 "rl78-decode.opc" -+#line 879 "rl78-decode.opc" - ID(mov); W(); DM(BC, IMMU(2)); SR(AX); - - } -@@ -4207,7 +4209,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e1"); --#line 868 "rl78-decode.opc" -+#line 870 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(BC, IMMU(2)); - - } -@@ -4222,7 +4224,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, #%1"); --#line 1271 "rl78-decode.opc" -+#line 1273 "rl78-decode.opc" - ID(xor); DM(None, SADDR); SC(IMMU(1)); Fz; - - /*----------------------------------------------------------------------*/ -@@ -4239,7 +4241,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, %1"); --#line 1268 "rl78-decode.opc" -+#line 1270 "rl78-decode.opc" - ID(xor); DR(A); SM(None, SADDR); Fz; - - } -@@ -4254,7 +4256,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, #%1"); --#line 1259 "rl78-decode.opc" -+#line 1261 "rl78-decode.opc" - ID(xor); DR(A); SC(IMMU(1)); Fz; - - } -@@ -4269,7 +4271,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, %e1"); --#line 1247 "rl78-decode.opc" -+#line 1249 "rl78-decode.opc" - ID(xor); DR(A); SM(HL, 0); Fz; - - } -@@ -4284,7 +4286,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, %ea1"); --#line 1253 "rl78-decode.opc" -+#line 1255 "rl78-decode.opc" - ID(xor); DR(A); SM(HL, IMMU(1)); Fz; - - } -@@ -4299,7 +4301,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("xor %0, %e!1"); --#line 1244 "rl78-decode.opc" -+#line 1246 "rl78-decode.opc" - ID(xor); DR(A); SM(None, IMMU(2)); Fz; - - } -@@ -4314,7 +4316,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x87: - { - /** 1000 0reg inc %0 */ --#line 587 "rl78-decode.opc" -+#line 589 "rl78-decode.opc" - int reg AU = op[0] & 0x07; - if (trace) - { -@@ -4324,7 +4326,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("inc %0"); --#line 587 "rl78-decode.opc" -+#line 589 "rl78-decode.opc" - ID(add); DRB(reg); SC(1); Fza; - - } -@@ -4339,7 +4341,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %ea1"); --#line 666 "rl78-decode.opc" -+#line 668 "rl78-decode.opc" - ID(mov); DR(A); SM(SP, IMMU(1)); - - } -@@ -4354,7 +4356,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e1"); --#line 648 "rl78-decode.opc" -+#line 650 "rl78-decode.opc" - ID(mov); DR(A); SM(DE, 0); - - } -@@ -4369,7 +4371,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %ea1"); --#line 651 "rl78-decode.opc" -+#line 653 "rl78-decode.opc" - ID(mov); DR(A); SM(DE, IMMU(1)); - - } -@@ -4384,7 +4386,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e1"); --#line 654 "rl78-decode.opc" -+#line 656 "rl78-decode.opc" - ID(mov); DR(A); SM(HL, 0); - - } -@@ -4399,7 +4401,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %ea1"); --#line 657 "rl78-decode.opc" -+#line 659 "rl78-decode.opc" - ID(mov); DR(A); SM(HL, IMMU(1)); - - } -@@ -4414,7 +4416,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %1"); --#line 690 "rl78-decode.opc" -+#line 692 "rl78-decode.opc" - ID(mov); DR(A); SM(None, SADDR); - - } -@@ -4429,7 +4431,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %s1"); --#line 687 "rl78-decode.opc" -+#line 689 "rl78-decode.opc" - ID(mov); DR(A); SM(None, SFR); - - } -@@ -4444,7 +4446,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e!1"); --#line 645 "rl78-decode.opc" -+#line 647 "rl78-decode.opc" - ID(mov); DR(A); SM(None, IMMU(2)); - - } -@@ -4459,7 +4461,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0x97: - { - /** 1001 0reg dec %0 */ --#line 554 "rl78-decode.opc" -+#line 556 "rl78-decode.opc" - int reg AU = op[0] & 0x07; - if (trace) - { -@@ -4469,7 +4471,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" reg = 0x%x\n", reg); - } - SYNTAX("dec %0"); --#line 554 "rl78-decode.opc" -+#line 556 "rl78-decode.opc" - ID(sub); DRB(reg); SC(1); Fza; - - } -@@ -4484,7 +4486,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %a0, %1"); --#line 642 "rl78-decode.opc" -+#line 644 "rl78-decode.opc" - ID(mov); DM(SP, IMMU(1)); SR(A); - - } -@@ -4499,7 +4501,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, %1"); --#line 615 "rl78-decode.opc" -+#line 617 "rl78-decode.opc" - ID(mov); DM(DE, 0); SR(A); - - } -@@ -4514,7 +4516,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %ea0, %1"); --#line 621 "rl78-decode.opc" -+#line 623 "rl78-decode.opc" - ID(mov); DM(DE, IMMU(1)); SR(A); - - } -@@ -4529,7 +4531,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e0, %1"); --#line 624 "rl78-decode.opc" -+#line 626 "rl78-decode.opc" - ID(mov); DM(HL, 0); SR(A); - - } -@@ -4544,7 +4546,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %ea0, %1"); --#line 633 "rl78-decode.opc" -+#line 635 "rl78-decode.opc" - ID(mov); DM(HL, IMMU(1)); SR(A); - - } -@@ -4559,7 +4561,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %1"); --#line 747 "rl78-decode.opc" -+#line 749 "rl78-decode.opc" - ID(mov); DM(None, SADDR); SR(A); - - } -@@ -4574,7 +4576,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %s0, %1"); --#line 780 "rl78-decode.opc" -+#line 782 "rl78-decode.opc" - ID(mov); DM(None, SFR); SR(A); - - /*----------------------------------------------------------------------*/ -@@ -4591,7 +4593,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e!0, %1"); --#line 612 "rl78-decode.opc" -+#line 614 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); SR(A); - - } -@@ -4606,7 +4608,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("inc %e!0"); --#line 581 "rl78-decode.opc" -+#line 583 "rl78-decode.opc" - ID(add); DM(None, IMMU(2)); SC(1); Fza; - - } -@@ -4617,7 +4619,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xa7: - { - /** 1010 0rg1 incw %0 */ --#line 601 "rl78-decode.opc" -+#line 603 "rl78-decode.opc" - int rg AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -4627,7 +4629,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("incw %0"); --#line 601 "rl78-decode.opc" -+#line 603 "rl78-decode.opc" - ID(add); W(); DRW(rg); SC(1); - - } -@@ -4642,7 +4644,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("incw %e!0"); --#line 595 "rl78-decode.opc" -+#line 597 "rl78-decode.opc" - ID(add); W(); DM(None, IMMU(2)); SC(1); - - } -@@ -4657,7 +4659,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("inc %0"); --#line 590 "rl78-decode.opc" -+#line 592 "rl78-decode.opc" - ID(add); DM(None, SADDR); SC(1); Fza; - - /*----------------------------------------------------------------------*/ -@@ -4674,7 +4676,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("incw %0"); --#line 604 "rl78-decode.opc" -+#line 606 "rl78-decode.opc" - ID(add); W(); DM(None, SADDR); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -4691,7 +4693,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %a1"); --#line 850 "rl78-decode.opc" -+#line 852 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(SP, IMMU(1)); - - } -@@ -4706,7 +4708,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e1"); --#line 838 "rl78-decode.opc" -+#line 840 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(DE, 0); - - } -@@ -4721,7 +4723,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %ea1"); --#line 841 "rl78-decode.opc" -+#line 843 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(DE, IMMU(1)); - - } -@@ -4736,7 +4738,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e1"); --#line 844 "rl78-decode.opc" -+#line 846 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(HL, 0); - - } -@@ -4751,7 +4753,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %ea1"); --#line 847 "rl78-decode.opc" -+#line 849 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(HL, IMMU(1)); - - } -@@ -4766,7 +4768,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %1"); --#line 880 "rl78-decode.opc" -+#line 882 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(None, SADDR); - - } -@@ -4781,7 +4783,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %s1"); --#line 883 "rl78-decode.opc" -+#line 885 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(None, SFR); - - } -@@ -4796,7 +4798,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %e!1"); --#line 834 "rl78-decode.opc" -+#line 836 "rl78-decode.opc" - ID(mov); W(); DR(AX); SM(None, IMMU(2)); - - -@@ -4812,7 +4814,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("dec %e!0"); --#line 548 "rl78-decode.opc" -+#line 550 "rl78-decode.opc" - ID(sub); DM(None, IMMU(2)); SC(1); Fza; - - } -@@ -4823,7 +4825,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xb7: - { - /** 1011 0rg1 decw %0 */ --#line 568 "rl78-decode.opc" -+#line 570 "rl78-decode.opc" - int rg AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -4833,7 +4835,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("decw %0"); --#line 568 "rl78-decode.opc" -+#line 570 "rl78-decode.opc" - ID(sub); W(); DRW(rg); SC(1); - - } -@@ -4848,7 +4850,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("decw %e!0"); --#line 562 "rl78-decode.opc" -+#line 564 "rl78-decode.opc" - ID(sub); W(); DM(None, IMMU(2)); SC(1); - - } -@@ -4863,7 +4865,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("dec %0"); --#line 557 "rl78-decode.opc" -+#line 559 "rl78-decode.opc" - ID(sub); DM(None, SADDR); SC(1); Fza; - - /*----------------------------------------------------------------------*/ -@@ -4880,7 +4882,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("decw %0"); --#line 571 "rl78-decode.opc" -+#line 573 "rl78-decode.opc" - ID(sub); W(); DM(None, SADDR); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -4897,7 +4899,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %a0, %1"); --#line 831 "rl78-decode.opc" -+#line 833 "rl78-decode.opc" - ID(mov); W(); DM(SP, IMMU(1)); SR(AX); - - } -@@ -4912,7 +4914,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e0, %1"); --#line 819 "rl78-decode.opc" -+#line 821 "rl78-decode.opc" - ID(mov); W(); DM(DE, 0); SR(AX); - - } -@@ -4927,7 +4929,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %ea0, %1"); --#line 822 "rl78-decode.opc" -+#line 824 "rl78-decode.opc" - ID(mov); W(); DM(DE, IMMU(1)); SR(AX); - - } -@@ -4942,7 +4944,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e0, %1"); --#line 825 "rl78-decode.opc" -+#line 827 "rl78-decode.opc" - ID(mov); W(); DM(HL, 0); SR(AX); - - } -@@ -4957,7 +4959,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %ea0, %1"); --#line 828 "rl78-decode.opc" -+#line 830 "rl78-decode.opc" - ID(mov); W(); DM(HL, IMMU(1)); SR(AX); - - } -@@ -4972,7 +4974,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, %1"); --#line 895 "rl78-decode.opc" -+#line 897 "rl78-decode.opc" - ID(mov); W(); DM(None, SADDR); SR(AX); - - } -@@ -4987,7 +4989,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %s0, %1"); --#line 901 "rl78-decode.opc" -+#line 903 "rl78-decode.opc" - ID(mov); W(); DM(None, SFR); SR(AX); - - /*----------------------------------------------------------------------*/ -@@ -5004,7 +5006,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %e!0, %1"); --#line 816 "rl78-decode.opc" -+#line 818 "rl78-decode.opc" - ID(mov); W(); DM(None, IMMU(2)); SR(AX); - - } -@@ -5015,7 +5017,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xc6: - { - /** 1100 0rg0 pop %0 */ --#line 986 "rl78-decode.opc" -+#line 988 "rl78-decode.opc" - int rg AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -5025,7 +5027,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("pop %0"); --#line 986 "rl78-decode.opc" -+#line 988 "rl78-decode.opc" - ID(mov); W(); DRW(rg); SPOP(); - - } -@@ -5036,7 +5038,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xc7: - { - /** 1100 0rg1 push %1 */ --#line 994 "rl78-decode.opc" -+#line 996 "rl78-decode.opc" - int rg AU = (op[0] >> 1) & 0x03; - if (trace) - { -@@ -5046,7 +5048,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("push %1"); --#line 994 "rl78-decode.opc" -+#line 996 "rl78-decode.opc" - ID(mov); W(); DPUSH(); SRW(rg); - - } -@@ -5061,7 +5063,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %a0, #%1"); --#line 639 "rl78-decode.opc" -+#line 641 "rl78-decode.opc" - ID(mov); DM(SP, IMMU(1)); SC(IMMU(1)); - - } -@@ -5076,7 +5078,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %0, #%1"); --#line 892 "rl78-decode.opc" -+#line 894 "rl78-decode.opc" - ID(mov); W(); DM(None, SADDR); SC(IMMU(2)); - - } -@@ -5091,7 +5093,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %ea0, #%1"); --#line 618 "rl78-decode.opc" -+#line 620 "rl78-decode.opc" - ID(mov); DM(DE, IMMU(1)); SC(IMMU(1)); - - } -@@ -5106,7 +5108,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("movw %s0, #%1"); --#line 898 "rl78-decode.opc" -+#line 900 "rl78-decode.opc" - ID(mov); W(); DM(None, SFR); SC(IMMU(2)); - - } -@@ -5121,7 +5123,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %ea0, #%1"); --#line 630 "rl78-decode.opc" -+#line 632 "rl78-decode.opc" - ID(mov); DM(HL, IMMU(1)); SC(IMMU(1)); - - } -@@ -5136,7 +5138,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, #%1"); --#line 744 "rl78-decode.opc" -+#line 746 "rl78-decode.opc" - ID(mov); DM(None, SADDR); SC(IMMU(1)); - - } -@@ -5151,7 +5153,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %s0, #%1"); --#line 750 "rl78-decode.opc" -+#line 752 "rl78-decode.opc" - op0 = SFR; - op1 = IMMU(1); - ID(mov); DM(None, op0); SC(op1); -@@ -5193,7 +5195,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %e!0, #%1"); --#line 609 "rl78-decode.opc" -+#line 611 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); SC(IMMU(1)); - - } -@@ -5204,7 +5206,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xd3: - { - /** 1101 00rg cmp0 %0 */ --#line 518 "rl78-decode.opc" -+#line 520 "rl78-decode.opc" - int rg AU = op[0] & 0x03; - if (trace) - { -@@ -5214,7 +5216,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("cmp0 %0"); --#line 518 "rl78-decode.opc" -+#line 520 "rl78-decode.opc" - ID(cmp); DRB(rg); SC(0); Fzac; - - } -@@ -5229,7 +5231,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp0 %0"); --#line 521 "rl78-decode.opc" -+#line 523 "rl78-decode.opc" - ID(cmp); DM(None, SADDR); SC(0); Fzac; - - /*----------------------------------------------------------------------*/ -@@ -5246,7 +5248,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("cmp0 %e!0"); --#line 515 "rl78-decode.opc" -+#line 517 "rl78-decode.opc" - ID(cmp); DM(None, IMMU(2)); SC(0); Fzac; - - } -@@ -5261,7 +5263,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mulu x"); --#line 906 "rl78-decode.opc" -+#line 908 "rl78-decode.opc" - ID(mulu); - - /*----------------------------------------------------------------------*/ -@@ -5278,7 +5280,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("ret"); --#line 1002 "rl78-decode.opc" -+#line 1004 "rl78-decode.opc" - ID(ret); - - } -@@ -5293,7 +5295,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %1"); --#line 711 "rl78-decode.opc" -+#line 713 "rl78-decode.opc" - ID(mov); DR(X); SM(None, SADDR); - - } -@@ -5308,7 +5310,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e!1"); --#line 708 "rl78-decode.opc" -+#line 710 "rl78-decode.opc" - ID(mov); DR(X); SM(None, IMMU(2)); - - } -@@ -5318,7 +5320,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfa: - { - /** 11ra 1010 movw %0, %1 */ --#line 889 "rl78-decode.opc" -+#line 891 "rl78-decode.opc" - int ra AU = (op[0] >> 4) & 0x03; - if (trace) - { -@@ -5328,7 +5330,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("movw %0, %1"); --#line 889 "rl78-decode.opc" -+#line 891 "rl78-decode.opc" - ID(mov); W(); DRW(ra); SM(None, SADDR); - - } -@@ -5338,7 +5340,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xfb: - { - /** 11ra 1011 movw %0, %es!1 */ --#line 886 "rl78-decode.opc" -+#line 888 "rl78-decode.opc" - int ra AU = (op[0] >> 4) & 0x03; - if (trace) - { -@@ -5348,7 +5350,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" ra = 0x%x\n", ra); - } - SYNTAX("movw %0, %es!1"); --#line 886 "rl78-decode.opc" -+#line 888 "rl78-decode.opc" - ID(mov); W(); DRW(ra); SM(None, IMMU(2)); - - } -@@ -5363,7 +5365,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("bc $%a0"); --#line 334 "rl78-decode.opc" -+#line 336 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(C); - - } -@@ -5378,7 +5380,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("bz $%a0"); --#line 346 "rl78-decode.opc" -+#line 348 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(Z); - - } -@@ -5393,7 +5395,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("bnc $%a0"); --#line 337 "rl78-decode.opc" -+#line 339 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NC); - - } -@@ -5408,7 +5410,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("bnz $%a0"); --#line 349 "rl78-decode.opc" -+#line 351 "rl78-decode.opc" - ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NZ); - - /*----------------------------------------------------------------------*/ -@@ -5421,7 +5423,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xe3: - { - /** 1110 00rg oneb %0 */ --#line 924 "rl78-decode.opc" -+#line 926 "rl78-decode.opc" - int rg AU = op[0] & 0x03; - if (trace) - { -@@ -5431,7 +5433,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("oneb %0"); --#line 924 "rl78-decode.opc" -+#line 926 "rl78-decode.opc" - ID(mov); DRB(rg); SC(1); - - } -@@ -5446,7 +5448,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("oneb %0"); --#line 927 "rl78-decode.opc" -+#line 929 "rl78-decode.opc" - ID(mov); DM(None, SADDR); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -5463,7 +5465,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("oneb %e!0"); --#line 921 "rl78-decode.opc" -+#line 923 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); SC(1); - - } -@@ -5478,7 +5480,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("onew %0"); --#line 932 "rl78-decode.opc" -+#line 934 "rl78-decode.opc" - ID(mov); DR(AX); SC(1); - - } -@@ -5493,7 +5495,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("onew %0"); --#line 935 "rl78-decode.opc" -+#line 937 "rl78-decode.opc" - ID(mov); DR(BC); SC(1); - - /*----------------------------------------------------------------------*/ -@@ -5510,7 +5512,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %1"); --#line 699 "rl78-decode.opc" -+#line 701 "rl78-decode.opc" - ID(mov); DR(B); SM(None, SADDR); - - } -@@ -5525,7 +5527,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e!1"); --#line 693 "rl78-decode.opc" -+#line 695 "rl78-decode.opc" - ID(mov); DR(B); SM(None, IMMU(2)); - - } -@@ -5540,7 +5542,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("br !%!a0"); --#line 368 "rl78-decode.opc" -+#line 370 "rl78-decode.opc" - ID(branch); DC(IMMU(3)); - - } -@@ -5555,7 +5557,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("br %!a0"); --#line 371 "rl78-decode.opc" -+#line 373 "rl78-decode.opc" - ID(branch); DC(IMMU(2)); - - } -@@ -5570,7 +5572,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("br $%!a0"); --#line 374 "rl78-decode.opc" -+#line 376 "rl78-decode.opc" - ID(branch); DC(pc+IMMS(2)+3); - - } -@@ -5585,7 +5587,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("br $%a0"); --#line 377 "rl78-decode.opc" -+#line 379 "rl78-decode.opc" - ID(branch); DC(pc+IMMS(1)+2); - - } -@@ -5596,7 +5598,7 @@ rl78_decode_opcode (unsigned long pc AU, - case 0xf3: - { - /** 1111 00rg clrb %0 */ --#line 464 "rl78-decode.opc" -+#line 466 "rl78-decode.opc" - int rg AU = op[0] & 0x03; - if (trace) - { -@@ -5606,7 +5608,7 @@ rl78_decode_opcode (unsigned long pc AU, - printf (" rg = 0x%x\n", rg); - } - SYNTAX("clrb %0"); --#line 464 "rl78-decode.opc" -+#line 466 "rl78-decode.opc" - ID(mov); DRB(rg); SC(0); - - } -@@ -5621,7 +5623,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("clrb %0"); --#line 467 "rl78-decode.opc" -+#line 469 "rl78-decode.opc" - ID(mov); DM(None, SADDR); SC(0); - - /*----------------------------------------------------------------------*/ -@@ -5638,7 +5640,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("clrb %e!0"); --#line 461 "rl78-decode.opc" -+#line 463 "rl78-decode.opc" - ID(mov); DM(None, IMMU(2)); SC(0); - - } -@@ -5653,7 +5655,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("clrw %0"); --#line 472 "rl78-decode.opc" -+#line 474 "rl78-decode.opc" - ID(mov); DR(AX); SC(0); - - } -@@ -5668,7 +5670,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("clrw %0"); --#line 475 "rl78-decode.opc" -+#line 477 "rl78-decode.opc" - ID(mov); DR(BC); SC(0); - - /*----------------------------------------------------------------------*/ -@@ -5685,7 +5687,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %1"); --#line 705 "rl78-decode.opc" -+#line 707 "rl78-decode.opc" - ID(mov); DR(C); SM(None, SADDR); - - } -@@ -5700,7 +5702,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("mov %0, %e!1"); --#line 702 "rl78-decode.opc" -+#line 704 "rl78-decode.opc" - ID(mov); DR(C); SM(None, IMMU(2)); - - } -@@ -5715,7 +5717,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("call !%!a0"); --#line 421 "rl78-decode.opc" -+#line 423 "rl78-decode.opc" - ID(call); DC(IMMU(3)); - - } -@@ -5730,7 +5732,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("call %!a0"); --#line 424 "rl78-decode.opc" -+#line 426 "rl78-decode.opc" - ID(call); DC(IMMU(2)); - - } -@@ -5745,7 +5747,7 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("call $%!a0"); --#line 427 "rl78-decode.opc" -+#line 429 "rl78-decode.opc" - ID(call); DC(pc+IMMS(2)+3); - - } -@@ -5760,13 +5762,13 @@ rl78_decode_opcode (unsigned long pc AU, - op[0]); - } - SYNTAX("brk1"); --#line 385 "rl78-decode.opc" -+#line 387 "rl78-decode.opc" - ID(break); - - } - break; - } --#line 1290 "rl78-decode.opc" -+#line 1292 "rl78-decode.opc" - - return rl78->n_bytes; - } -diff --git a/opcodes/rl78-decode.opc b/opcodes/rl78-decode.opc -index 6212f08..b25e441 100644 ---- a/opcodes/rl78-decode.opc -+++ b/opcodes/rl78-decode.opc -@@ -50,7 +50,9 @@ typedef struct - #define W() rl78->size = RL78_Word - - #define AU ATTRIBUTE_UNUSED --#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr)) -+ -+#define OP_BUF_LEN 20 -+#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0) - #define B ((unsigned long) GETBYTE()) - - #define SYNTAX(x) rl78->syntax = x -@@ -168,7 +170,7 @@ rl78_decode_opcode (unsigned long pc AU, - RL78_Dis_Isa isa) - { - LocalData lds, * ld = &lds; -- unsigned char op_buf[20] = {0}; -+ unsigned char op_buf[OP_BUF_LEN] = {0}; - unsigned char *op = op_buf; - int op0, op1; - --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch deleted file mode 100644 index f63a993b2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch +++ /dev/null @@ -1,208 +0,0 @@ -From c53d2e6d744da000aaafe0237bced090aab62818 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 11:27:15 +0100 -Subject: [PATCH] Fix potential address violations when processing a corrupt - Alpha VMA binary. - - PR binutils/21589 - * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the - maximum value for the ascic pointer. Check that name processing - does not read beyond this value. - (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the - end of etir record. - -Upstream-Status: Backport -CVE: CVE-2017-9752 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 9 +++++++++ - bfd/vms-alpha.c | 51 +++++++++++++++++++++++++++++++++++++++++---------- - 2 files changed, 50 insertions(+), 10 deletions(-) - -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -9,6 +9,15 @@ - - 2017-06-14 Nick Clifton - -+ PR binutils/21589 -+ * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the -+ maximum value for the ascic pointer. Check that name processing -+ does not read beyond this value. -+ (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the -+ end of etir record. -+ -+2017-06-14 Nick Clifton -+ - PR binutils/21578 - * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid - flag value. -Index: git/bfd/vms-alpha.c -=================================================================== ---- git.orig/bfd/vms-alpha.c -+++ git/bfd/vms-alpha.c -@@ -1456,7 +1456,7 @@ dst_retrieve_location (bfd *abfd, unsign - /* Write multiple bytes to section image. */ - - static bfd_boolean --image_write (bfd *abfd, unsigned char *ptr, int size) -+image_write (bfd *abfd, unsigned char *ptr, unsigned int size) - { - #if VMS_DEBUG - _bfd_vms_debug (8, "image_write from (%p, %d) to (%ld)\n", ptr, size, -@@ -1603,14 +1603,16 @@ _bfd_vms_etir_name (int cmd) - #define HIGHBIT(op) ((op & 0x80000000L) == 0x80000000L) - - static void --_bfd_vms_get_value (bfd *abfd, const unsigned char *ascic, -+_bfd_vms_get_value (bfd *abfd, -+ const unsigned char *ascic, -+ const unsigned char *max_ascic, - struct bfd_link_info *info, - bfd_vma *vma, - struct alpha_vms_link_hash_entry **hp) - { - char name[257]; -- int len; -- int i; -+ unsigned int len; -+ unsigned int i; - struct alpha_vms_link_hash_entry *h; - - /* Not linking. Do not try to resolve the symbol. */ -@@ -1622,6 +1624,14 @@ _bfd_vms_get_value (bfd *abfd, const uns - } - - len = *ascic; -+ if (ascic + len >= max_ascic) -+ { -+ _bfd_error_handler (_("Corrupt vms value")); -+ *vma = 0; -+ *hp = NULL; -+ return; -+ } -+ - for (i = 0; i < len; i++) - name[i] = ascic[i + 1]; - name[i] = 0; -@@ -1741,6 +1751,15 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - _bfd_hexdump (8, ptr, cmd_length - 4, 0); - #endif - -+ /* PR 21589: Check for a corrupt ETIR record. */ -+ if (cmd_length < 4) -+ { -+ corrupt_etir: -+ _bfd_error_handler (_("Corrupt ETIR record encountered")); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ } -+ - switch (cmd) - { - /* Stack global -@@ -1748,7 +1767,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - - stack 32 bit value of symbol (high bits set to 0). */ - case ETIR__C_STA_GBL: -- _bfd_vms_get_value (abfd, ptr, info, &op1, &h); -+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h); - _bfd_vms_push (abfd, op1, alpha_vms_sym_to_ctxt (h)); - break; - -@@ -1757,6 +1776,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - - stack 32 bit value, sign extend to 64 bit. */ - case ETIR__C_STA_LW: -+ if (ptr + 4 >= maxptr) -+ goto corrupt_etir; - _bfd_vms_push (abfd, bfd_getl32 (ptr), RELC_NONE); - break; - -@@ -1765,6 +1786,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - - stack 64 bit value of symbol. */ - case ETIR__C_STA_QW: -+ if (ptr + 8 >= maxptr) -+ goto corrupt_etir; - _bfd_vms_push (abfd, bfd_getl64 (ptr), RELC_NONE); - break; - -@@ -1778,6 +1801,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - { - int psect; - -+ if (ptr + 12 >= maxptr) -+ goto corrupt_etir; - psect = bfd_getl32 (ptr); - if ((unsigned int) psect >= PRIV (section_count)) - { -@@ -1867,6 +1892,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - { - int size; - -+ if (ptr + 4 >= maxptr) -+ goto corrupt_etir; - size = bfd_getl32 (ptr); - _bfd_vms_pop (abfd, &op1, &rel1); - if (rel1 != RELC_NONE) -@@ -1879,7 +1906,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - /* Store global: write symbol value - arg: cs global symbol name. */ - case ETIR__C_STO_GBL: -- _bfd_vms_get_value (abfd, ptr, info, &op1, &h); -+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h); - if (h && h->sym) - { - if (h->sym->typ == EGSD__C_SYMG) -@@ -1901,7 +1928,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - /* Store code address: write address of entry point - arg: cs global symbol name (procedure). */ - case ETIR__C_STO_CA: -- _bfd_vms_get_value (abfd, ptr, info, &op1, &h); -+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h); - if (h && h->sym) - { - if (h->sym->flags & EGSY__V_NORM) -@@ -1946,8 +1973,10 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - da data. */ - case ETIR__C_STO_IMM: - { -- int size; -+ unsigned int size; - -+ if (ptr + 4 >= maxptr) -+ goto corrupt_etir; - size = bfd_getl32 (ptr); - image_write (abfd, ptr + 4, size); - } -@@ -1960,7 +1989,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - store global longword: store 32bit value of symbol - arg: cs symbol name. */ - case ETIR__C_STO_GBL_LW: -- _bfd_vms_get_value (abfd, ptr, info, &op1, &h); -+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h); - #if 0 - abort (); - #endif -@@ -2013,7 +2042,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - da signature. */ - - case ETIR__C_STC_LP_PSB: -- _bfd_vms_get_value (abfd, ptr + 4, info, &op1, &h); -+ _bfd_vms_get_value (abfd, ptr + 4, maxptr, info, &op1, &h); - if (h && h->sym) - { - if (h->sym->typ == EGSD__C_SYMG) -@@ -2109,6 +2138,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b - /* Augment relocation base: increment image location counter by offset - arg: lw offset value. */ - case ETIR__C_CTL_AUGRB: -+ if (ptr + 4 >= maxptr) -+ goto corrupt_etir; - op1 = bfd_getl32 (ptr); - image_inc_ptr (abfd, op1); - break; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch deleted file mode 100644 index 241142b57..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 04f963fd489cae724a60140e13984415c205f4ac Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Wed, 14 Jun 2017 10:35:16 +0100 -Subject: [PATCH] Fix seg-faults in objdump when disassembling a corrupt - versados binary. - - PR binutils/21591 - * versados.c (versados_mkobject): Zero the allocated tdata structure. - (process_otr): Check for an invalid offset in the otr structure. - -Upstream-Status: Backport -CVE: CVE-2017-9753 -CVE: CVE-2017-9754 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/versados.c | 12 ++++++++---- - 2 files changed, 14 insertions(+), 4 deletions(-) - -Index: git/bfd/versados.c -=================================================================== ---- git.orig/bfd/versados.c -+++ git/bfd/versados.c -@@ -149,7 +149,7 @@ versados_mkobject (bfd *abfd) - if (abfd->tdata.versados_data == NULL) - { - bfd_size_type amt = sizeof (tdata_type); -- tdata_type *tdata = bfd_alloc (abfd, amt); -+ tdata_type *tdata = bfd_zalloc (abfd, amt); - - if (tdata == NULL) - return FALSE; -@@ -345,13 +345,13 @@ reloc_howto_type versados_howto_table[] - }; - - static int --get_offset (int len, unsigned char *ptr) -+get_offset (unsigned int len, unsigned char *ptr) - { - int val = 0; - - if (len) - { -- int i; -+ unsigned int i; - - val = *ptr++; - if (val & 0x80) -@@ -394,9 +394,13 @@ process_otr (bfd *abfd, struct ext_otr * - int flag = *srcp++; - int esdids = (flag >> 5) & 0x7; - int sizeinwords = ((flag >> 3) & 1) ? 2 : 1; -- int offsetlen = flag & 0x7; -+ unsigned int offsetlen = flag & 0x7; - int j; - -+ /* PR 21591: Check for invalid lengths. */ -+ if (srcp + esdids + offsetlen >= endp) -+ return; -+ - if (esdids == 0) - { - /* A zero esdid means the new pc is the offset given. */ -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -8,6 +8,10 @@ - (ieee_archive_p): Likewise. - - 2017-06-14 Nick Clifton -+ -+ PR binutils/21591 -+ * versados.c (versados_mkobject): Zero the allocated tdata structure. -+ (process_otr): Check for an invalid offset in the otr structure. - - PR binutils/21589 - * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch deleted file mode 100644 index 15dc9090d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0d96e4df4812c3bad77c229dfef47a9bc115ac12 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Thu, 15 Jun 2017 06:40:17 -0700 -Subject: [PATCH] i386-dis: Check valid bnd register - -Since there are only 4 bnd registers, return "(bad)" for register -number > 3. - - PR binutils/21594 - * i386-dis.c (OP_E_register): Check valid bnd register. - (OP_G): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-9755 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 6 ++++++ - opcodes/i386-dis.c | 10 ++++++++++ - 2 files changed, 16 insertions(+) - -Index: git/opcodes/ChangeLog -=================================================================== ---- git.orig/opcodes/ChangeLog -+++ git/opcodes/ChangeLog -@@ -1,3 +1,9 @@ -+2017-06-15 H.J. Lu -+ -+ PR binutils/21594 -+ * i386-dis.c (OP_E_register): Check valid bnd register. -+ (OP_G): Likewise. -+ - 2017-06-15 Nick Clifton - - PR binutils/21588 -Index: git/opcodes/i386-dis.c -=================================================================== ---- git.orig/opcodes/i386-dis.c -+++ git/opcodes/i386-dis.c -@@ -14939,6 +14939,11 @@ OP_E_register (int bytemode, int sizefla - names = address_mode == mode_64bit ? names64 : names32; - break; - case bnd_mode: -+ if (reg > 0x3) -+ { -+ oappend ("(bad)"); -+ return; -+ } - names = names_bnd; - break; - case indir_v_mode: -@@ -15483,6 +15488,11 @@ OP_G (int bytemode, int sizeflag) - oappend (names64[modrm.reg + add]); - break; - case bnd_mode: -+ if (modrm.reg > 0x3) -+ { -+ oappend ("(bad)"); -+ return; -+ } - oappend (names_bnd[modrm.reg]); - break; - case v_mode: diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch deleted file mode 100644 index 191d0be19..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch +++ /dev/null @@ -1,50 +0,0 @@ -From cd3ea7c69acc5045eb28f9bf80d923116e15e4f5 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Thu, 15 Jun 2017 13:26:54 +0100 -Subject: [PATCH] Prevent address violation problem when disassembling corrupt - aarch64 binary. - - PR binutils/21595 - * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of - range value. - -Upstream-Status: Backport -CVE: CVE-2017-9756 -Signed-off-by: Armin Kuster - ---- - opcodes/ChangeLog | 6 ++++++ - opcodes/aarch64-dis.c | 3 +++ - 2 files changed, 9 insertions(+) - -Index: git/opcodes/ChangeLog -=================================================================== ---- git.orig/opcodes/ChangeLog -+++ git/opcodes/ChangeLog -@@ -6,6 +6,12 @@ - - 2017-06-15 Nick Clifton - -+ PR binutils/21595 -+ * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of -+ range value. -+ -+2017-06-15 Nick Clifton -+ - PR binutils/21588 - * rl78-decode.opc (OP_BUF_LEN): Define. - (GETBYTE): Check for the index exceeding OP_BUF_LEN. -Index: git/opcodes/aarch64-dis.c -=================================================================== ---- git.orig/opcodes/aarch64-dis.c -+++ git/opcodes/aarch64-dis.c -@@ -409,6 +409,9 @@ aarch64_ext_ldst_reglist (const aarch64_ - info->reglist.first_regno = extract_field (FLD_Rt, code, 0); - /* opcode */ - value = extract_field (FLD_opcode, code, 0); -+ /* PR 21595: Check for a bogus value. */ -+ if (value >= ARRAY_SIZE (data)) -+ return 0; - if (expected_num != data[value].num_elements || data[value].is_reserved) - return 0; - info->reglist.num_regs = data[value].num_regs; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch deleted file mode 100644 index 8a9d7ebd9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 04e15b4a9462cb1ae819e878a6009829aab8020b Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 26 Jun 2017 15:46:34 +0100 -Subject: [PATCH] Fix address violation parsing a corrupt texhex format file. - - PR binutils/21670 - * tekhex.c (getvalue): Check for the source pointer exceeding the - end pointer before the first byte is read. - -Upstream-Status: Backport -CVE: CVE_2017-9954 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/tekhex.c | 6 +++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -Index: git/bfd/tekhex.c -=================================================================== ---- git.orig/bfd/tekhex.c -+++ git/bfd/tekhex.c -@@ -273,6 +273,9 @@ getvalue (char **srcp, bfd_vma *valuep, - bfd_vma value = 0; - unsigned int len; - -+ if (src >= endp) -+ return FALSE; -+ - if (!ISHEX (*src)) - return FALSE; - -@@ -514,9 +517,10 @@ pass_over (bfd *abfd, bfd_boolean (*func - /* To the front of the file. */ - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; -+ - while (! is_eof) - { -- char src[MAXCHUNK]; -+ static char src[MAXCHUNK]; - char type; - - /* Find first '%'. */ -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2017-06-26 Nick Clifton -+ -+ PR binutils/21670 -+ * tekhex.c (getvalue): Check for the source pointer exceeding the -+ end pointer before the first byte is read. -+ - 2017-06-15 Nick Clifton - - PR binutils/21582 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch deleted file mode 100644 index 774670fb0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch +++ /dev/null @@ -1,168 +0,0 @@ -From cfd14a500e0485374596234de4db10e88ebc7618 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Mon, 26 Jun 2017 15:25:08 +0100 -Subject: [PATCH] Fix address violations when atempting to parse fuzzed - binaries. - - PR binutils/21665 -bfd * opncls.c (get_build_id): Check that the section is beig enough - to contain the whole note. - * compress.c (bfd_get_full_section_contents): Check for and reject - a section whoes size is greater than the size of the entire file. - * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not - contain a notes section. - -binutils* objdump.c (disassemble_section): Skip any section that is bigger - than the entire file. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #1 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 10 ++++++++++ - bfd/compress.c | 6 ++++++ - bfd/elf32-v850.c | 4 +++- - bfd/opncls.c | 18 ++++++++++++++++-- - binutils/ChangeLog | 6 ++++++ - binutils/objdump.c | 4 ++-- - 6 files changed, 43 insertions(+), 5 deletions(-) - -Index: git/bfd/compress.c -=================================================================== ---- git.orig/bfd/compress.c -+++ git/bfd/compress.c -@@ -239,6 +239,12 @@ bfd_get_full_section_contents (bfd *abfd - *ptr = NULL; - return TRUE; - } -+ else if (bfd_get_file_size (abfd) > 0 -+ && sz > (bfd_size_type) bfd_get_file_size (abfd)) -+ { -+ *ptr = NULL; -+ return FALSE; -+ } - - switch (sec->compress_status) - { -Index: git/bfd/elf32-v850.c -=================================================================== ---- git.orig/bfd/elf32-v850.c -+++ git/bfd/elf32-v850.c -@@ -2450,7 +2450,9 @@ v850_elf_copy_notes (bfd *ibfd, bfd *obf - BFD_ASSERT (bfd_malloc_and_get_section (ibfd, inotes, & icont)); - - if ((ocont = elf_section_data (onotes)->this_hdr.contents) == NULL) -- BFD_ASSERT (bfd_malloc_and_get_section (obfd, onotes, & ocont)); -+ /* If the output is being stripped then it is possible for -+ the notes section to disappear. In this case do nothing. */ -+ return; - - /* Copy/overwrite notes from the input to the output. */ - memcpy (ocont, icont, bfd_section_size (obfd, onotes)); -Index: git/bfd/opncls.c -=================================================================== ---- git.orig/bfd/opncls.c -+++ git/bfd/opncls.c -@@ -1776,6 +1776,7 @@ get_build_id (bfd *abfd) - Elf_External_Note *enote; - bfd_byte *contents; - asection *sect; -+ bfd_size_type size; - - BFD_ASSERT (abfd); - -@@ -1790,8 +1791,9 @@ get_build_id (bfd *abfd) - return NULL; - } - -+ size = bfd_get_section_size (sect); - /* FIXME: Should we support smaller build-id notes ? */ -- if (bfd_get_section_size (sect) < 0x24) -+ if (size < 0x24) - { - bfd_set_error (bfd_error_invalid_operation); - return NULL; -@@ -1804,6 +1806,17 @@ get_build_id (bfd *abfd) - return NULL; - } - -+ /* FIXME: Paranoia - allow for compressed build-id sections. -+ Maybe we should complain if this size is different from -+ the one obtained above... */ -+ size = bfd_get_section_size (sect); -+ if (size < sizeof (Elf_External_Note)) -+ { -+ bfd_set_error (bfd_error_invalid_operation); -+ free (contents); -+ return NULL; -+ } -+ - enote = (Elf_External_Note *) contents; - inote.type = H_GET_32 (abfd, enote->type); - inote.namesz = H_GET_32 (abfd, enote->namesz); -@@ -1815,7 +1828,8 @@ get_build_id (bfd *abfd) - if (inote.descsz == 0 - || inote.type != NT_GNU_BUILD_ID - || inote.namesz != 4 /* sizeof "GNU" */ -- || strcmp (inote.namedata, "GNU") != 0) -+ || strncmp (inote.namedata, "GNU", 4) != 0 -+ || size < (12 + BFD_ALIGN (inote.namesz, 4) + inote.descsz)) - { - free (contents); - bfd_set_error (bfd_error_invalid_operation); -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -2048,7 +2048,7 @@ disassemble_section (bfd *abfd, asection - return; - - datasize = bfd_get_section_size (section); -- if (datasize == 0) -+ if (datasize == 0 || datasize >= (bfd_size_type) bfd_get_file_size (abfd)) - return; - - if (start_address == (bfd_vma) -1 -@@ -2912,7 +2912,7 @@ dump_target_specific (bfd *abfd) - static void - dump_section (bfd *abfd, asection *section, void *dummy ATTRIBUTE_UNUSED) - { -- bfd_byte *data = 0; -+ bfd_byte *data = NULL; - bfd_size_type datasize; - bfd_vma addr_offset; - bfd_vma start_offset; -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,4 +1,14 @@ - 2017-06-26 Nick Clifton -+ -+ PR binutils/21665 -+ * opncls.c (get_build_id): Check that the section is beig enough -+ to contain the whole note. -+ * compress.c (bfd_get_full_section_contents): Check for and reject -+ a section whoes size is greater than the size of the entire file. -+ * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not -+ contain a notes section. -+ -+2017-06-26 Nick Clifton - - PR binutils/21670 - * tekhex.c (getvalue): Check for the source pointer exceeding the -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,9 @@ -+2017-06-26 Nick Clifton -+ -+ PR binutils/21665 -+ * objdump.c (disassemble_section): Skip any section that is bigger -+ than the entire file. -+ - 2017-04-03 Nick Clifton - - PR binutils/21345 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch deleted file mode 100644 index f95295f18..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 0630b49c470ca2e3c3f74da4c7e4ff63440dd71f Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Mon, 26 Jun 2017 09:24:49 -0700 -Subject: [PATCH] Check file size before getting section contents - -Don't check the section size in bfd_get_full_section_contents since -the size of a decompressed section may be larger than the file size. -Instead, check file size in _bfd_generic_get_section_contents. - - PR binutils/21665 - * compress.c (bfd_get_full_section_contents): Don't check the - file size here. - * libbfd.c (_bfd_generic_get_section_contents): Check for and - reject a section whoes size + offset is greater than the size - of the entire file. - (_bfd_generic_get_section_contents_in_window): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #2 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 10 +++++++++- - bfd/compress.c | 8 +------- - bfd/libbfd.c | 17 ++++++++++++++++- - 3 files changed, 26 insertions(+), 9 deletions(-) - -Index: git/bfd/compress.c -=================================================================== ---- git.orig/bfd/compress.c -+++ git/bfd/compress.c -@@ -239,12 +239,6 @@ bfd_get_full_section_contents (bfd *abfd - *ptr = NULL; - return TRUE; - } -- else if (bfd_get_file_size (abfd) > 0 -- && sz > (bfd_size_type) bfd_get_file_size (abfd)) -- { -- *ptr = NULL; -- return FALSE; -- } - - switch (sec->compress_status) - { -@@ -260,7 +254,7 @@ bfd_get_full_section_contents (bfd *abfd - /* xgettext:c-format */ - (_("error: %B(%A) is too large (%#lx bytes)"), - abfd, sec, (long) sz); -- return FALSE; -+ return FALSE; - } - } - -Index: git/bfd/libbfd.c -=================================================================== ---- git.orig/bfd/libbfd.c -+++ git/bfd/libbfd.c -@@ -780,6 +780,7 @@ _bfd_generic_get_section_contents (bfd * - bfd_size_type count) - { - bfd_size_type sz; -+ file_ptr filesz; - if (count == 0) - return TRUE; - -@@ -802,8 +803,15 @@ _bfd_generic_get_section_contents (bfd * - sz = section->rawsize; - else - sz = section->size; -+ filesz = bfd_get_file_size (abfd); -+ if (filesz < 0) -+ { -+ /* This should never happen. */ -+ abort (); -+ } - if (offset + count < count -- || offset + count > sz) -+ || offset + count > sz -+ || (section->filepos + offset + sz) > (bfd_size_type) filesz) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; -@@ -826,6 +834,7 @@ _bfd_generic_get_section_contents_in_win - { - #ifdef USE_MMAP - bfd_size_type sz; -+ file_ptr filesz; - - if (count == 0) - return TRUE; -@@ -858,7 +867,13 @@ _bfd_generic_get_section_contents_in_win - sz = section->rawsize; - else - sz = section->size; -+ filesz = bfd_get_file_size (abfd); -+ { -+ /* This should never happen. */ -+ abort (); -+ } - if (offset + count > sz -+ || (section->filepos + offset + sz) > (bfd_size_type) filesz - || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, - TRUE)) - return FALSE; -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,13 @@ -+2017-06-26 H.J. Lu -+ -+ PR binutils/21665 -+ * compress.c (bfd_get_full_section_contents): Don't check the -+ file size here. -+ * libbfd.c (_bfd_generic_get_section_contents): Check for and -+ reject a section whoes size + offset is greater than the size -+ of the entire file. -+ (_bfd_generic_get_section_contents_in_window): Likewise. -+ - 2017-06-26 Nick Clifton - - PR binutils/21665 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch deleted file mode 100644 index 1b67c4e95..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1f473e3d0ad285195934e6a077c7ed32afe66437 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Mon, 26 Jun 2017 15:47:16 -0700 -Subject: [PATCH] Add a missing line to - _bfd_generic_get_section_contents_in_window - - PR binutils/21665 - * libbfd.c (_bfd_generic_get_section_contents_in_window): Add - a missing line. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #3 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/libbfd.c | 1 + - 2 files changed, 7 insertions(+) - -Index: git/bfd/libbfd.c -=================================================================== ---- git.orig/bfd/libbfd.c -+++ git/bfd/libbfd.c -@@ -868,6 +868,7 @@ _bfd_generic_get_section_contents_in_win - else - sz = section->size; - filesz = bfd_get_file_size (abfd); -+ if (filesz < 0) - { - /* This should never happen. */ - abort (); -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,6 +1,12 @@ - 2017-06-26 H.J. Lu - - PR binutils/21665 -+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Add -+ a missing line. -+ -+2017-06-26 H.J. Lu -+ -+ PR binutils/21665 - * compress.c (bfd_get_full_section_contents): Don't check the - file size here. - * libbfd.c (_bfd_generic_get_section_contents): Check for and diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch deleted file mode 100644 index 97d529a78..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch +++ /dev/null @@ -1,51 +0,0 @@ -From ab27f80c5dceaa23c4ba7f62c0d5d22a5d5dd7a1 Mon Sep 17 00:00:00 2001 -From: Pedro Alves -Date: Tue, 27 Jun 2017 00:21:25 +0100 -Subject: [PATCH] Fix GDB regressions caused by previous - bfd_get_section_contents changes - -Ref: https://sourceware.org/ml/binutils/2017-06/msg00343.html - -bfd/ChangeLog: -2017-06-26 Pedro Alves - - PR binutils/21665 - * libbfd.c (_bfd_generic_get_section_contents): Add "count", not - "sz". - -Upstream-Status: Backport -CVE: CVE-2017-9955 #4 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 ++++++ - bfd/libbfd.c | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2017-06-26 Pedro Alves -+ -+ PR binutils/21665 -+ * libbfd.c (_bfd_generic_get_section_contents): Add "count", not -+ "sz". -+ - 2017-06-26 H.J. Lu - - PR binutils/21665 -Index: git/bfd/libbfd.c -=================================================================== ---- git.orig/bfd/libbfd.c -+++ git/bfd/libbfd.c -@@ -811,7 +811,7 @@ _bfd_generic_get_section_contents (bfd * - } - if (offset + count < count - || offset + count > sz -- || (section->filepos + offset + sz) > (bfd_size_type) filesz) -+ || (section->filepos + offset + count) > (bfd_size_type) filesz) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch deleted file mode 100644 index da3bd37e8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 7211ae501eb0de1044983f2dfb00091a58fbd66c Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Tue, 27 Jun 2017 09:45:04 +0930 -Subject: [PATCH] More fixes for bfd_get_section_contents change - - PR binutils/21665 - * libbfd.c (_bfd_generic_get_section_contents): Delete abort. - Use unsigned file pointer type, and remove cast. - * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise. - Add "count", not "sz". - -Upstream-Status: Backport -CVE: CVE-2017-9955 #5 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 8 ++++++++ - bfd/libbfd.c | 18 ++++-------------- - 2 files changed, 12 insertions(+), 14 deletions(-) - -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,11 @@ -+2017-06-27 Alan Modra -+ -+ PR binutils/21665 -+ * libbfd.c (_bfd_generic_get_section_contents): Delete abort. -+ Use unsigned file pointer type, and remove cast. -+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise. -+ Add "count", not "sz". -+ - 2017-06-26 Pedro Alves - - PR binutils/21665 -Index: git/bfd/libbfd.c -=================================================================== ---- git.orig/bfd/libbfd.c -+++ git/bfd/libbfd.c -@@ -780,7 +780,7 @@ _bfd_generic_get_section_contents (bfd * - bfd_size_type count) - { - bfd_size_type sz; -- file_ptr filesz; -+ ufile_ptr filesz; - if (count == 0) - return TRUE; - -@@ -804,14 +804,9 @@ _bfd_generic_get_section_contents (bfd * - else - sz = section->size; - filesz = bfd_get_file_size (abfd); -- if (filesz < 0) -- { -- /* This should never happen. */ -- abort (); -- } - if (offset + count < count - || offset + count > sz -- || (section->filepos + offset + count) > (bfd_size_type) filesz) -+ || section->filepos + offset + count > filesz) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; -@@ -834,7 +829,7 @@ _bfd_generic_get_section_contents_in_win - { - #ifdef USE_MMAP - bfd_size_type sz; -- file_ptr filesz; -+ ufile_ptr filesz; - - if (count == 0) - return TRUE; -@@ -868,13 +863,8 @@ _bfd_generic_get_section_contents_in_win - else - sz = section->size; - filesz = bfd_get_file_size (abfd); -- if (filesz < 0) -- { -- /* This should never happen. */ -- abort (); -- } - if (offset + count > sz -- || (section->filepos + offset + sz) > (bfd_size_type) filesz -+ || section->filepos + offset + count > filesz - || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, - TRUE)) - return FALSE; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch deleted file mode 100644 index e36429ad5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ea9aafc41a764e4e2dbb88a7b031e886b481b99a Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Tue, 27 Jun 2017 14:43:49 +0930 -Subject: [PATCH] Warning fix - - PR binutils/21665 - * libbfd.c (_bfd_generic_get_section_contents): Warning fix. - (_bfd_generic_get_section_contents_in_window): Likewise. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #6 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 12 +++++++++--- - bfd/libbfd.c | 4 ++-- - 2 files changed, 11 insertions(+), 5 deletions(-) - -Index: git/bfd/libbfd.c -=================================================================== ---- git.orig/bfd/libbfd.c -+++ git/bfd/libbfd.c -@@ -806,7 +806,7 @@ _bfd_generic_get_section_contents (bfd * - filesz = bfd_get_file_size (abfd); - if (offset + count < count - || offset + count > sz -- || section->filepos + offset + count > filesz) -+ || (ufile_ptr) section->filepos + offset + count > filesz) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; -@@ -864,7 +864,7 @@ _bfd_generic_get_section_contents_in_win - sz = section->size; - filesz = bfd_get_file_size (abfd); - if (offset + count > sz -- || section->filepos + offset + count > filesz -+ || (ufile_ptr) section->filepos + offset + count > filesz - || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, - TRUE)) - return FALSE; -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,5 +1,11 @@ - 2017-06-27 Alan Modra - -+ PR binutils/21665 -+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix. -+ (_bfd_generic_get_section_contents_in_window): Likewise. -+ -+2017-06-27 Alan Modra -+ - PR binutils/21665 - * libbfd.c (_bfd_generic_get_section_contents): Delete abort. - Use unsigned file pointer type, and remove cast. diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch deleted file mode 100644 index 2cae63b4f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 60a02042bacf8d25814430080adda61ed086bca6 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 30 Jun 2017 11:03:37 +0100 -Subject: [PATCH] Fix failures in MMIX linker tests introduced by fix for PR - 21665. - - PR binutils/21665 - * objdump.c (disassemble_section): Move check for an overlarge - section to just before the allocation of memory. Do not check - section size against file size, but instead use an arbitrary 2Gb - limit. Issue a warning message if the section is too big. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #7 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 8 ++++++++ - binutils/objdump.c | 25 ++++++++++++++++++++++++- - 2 files changed, 32 insertions(+), 1 deletion(-) - -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -2048,7 +2048,7 @@ disassemble_section (bfd *abfd, asection - return; - - datasize = bfd_get_section_size (section); -- if (datasize == 0 || datasize >= (bfd_size_type) bfd_get_file_size (abfd)) -+ if (datasize == 0) - return; - - if (start_address == (bfd_vma) -1 -@@ -2112,6 +2112,29 @@ disassemble_section (bfd *abfd, asection - } - rel_ppend = rel_pp + rel_count; - -+ /* PR 21665: Check for overlarge datasizes. -+ Note - we used to check for "datasize > bfd_get_file_size (abfd)" but -+ this fails when using compressed sections or compressed file formats -+ (eg MMO, tekhex). -+ -+ The call to xmalloc below will fail if too much memory is requested, -+ which will catch the problem in the normal use case. But if a memory -+ checker is in use, eg valgrind or sanitize, then an exception will -+ be still generated, so we try to catch the problem first. -+ -+ Unfortunately there is no simple way to determine how much memory can -+ be allocated by calling xmalloc. So instead we use a simple, arbitrary -+ limit of 2Gb. Hopefully this should be enough for most users. If -+ someone does start trying to disassemble sections larger then 2Gb in -+ size they will doubtless complain and we can increase the limit. */ -+#define MAX_XMALLOC (1024 * 1024 * 1024 * 2UL) /* 2Gb */ -+ if (datasize > MAX_XMALLOC) -+ { -+ non_fatal (_("Reading section %s failed because it is too big (%#lx)"), -+ section->name, (unsigned long) datasize); -+ return; -+ } -+ - data = (bfd_byte *) xmalloc (datasize); - - bfd_get_section_contents (abfd, section, data, 0, datasize); -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,11 @@ -+2017-06-30 Nick Clifton -+ -+ PR binutils/21665 -+ * objdump.c (disassemble_section): Move check for an overlarge -+ section to just before the allocation of memory. Do not check -+ section size against file size, but instead use an arbitrary 2Gb -+ limit. Issue a warning message if the section is too big. -+ - 2017-06-26 Nick Clifton - - PR binutils/21665 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch deleted file mode 100644 index 45dd97467..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch +++ /dev/null @@ -1,187 +0,0 @@ -From bae7501e87ab614115d9d3213b4dd18d96e604db Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sat, 1 Jul 2017 21:58:10 +0930 -Subject: [PATCH] Use bfd_malloc_and_get_section - -It's nicer than xmalloc followed by bfd_get_section_contents, since -xmalloc exits on failure and needs a check that its size_t arg doesn't -lose high bits when converted from bfd_size_type. - - PR binutils/21665 - * objdump.c (strtab): Make var a bfd_byte*. - (disassemble_section): Don't limit malloc size. Instead, use - bfd_malloc_and_get_section. - (read_section_stabs): Use bfd_malloc_and_get_section. Return - bfd_byte*. - (find_stabs_section): Remove now unnecessary cast. - * objcopy.c (copy_object): Use bfd_malloc_and_get_section. Free - contents on error return. - * nlmconv.c (copy_sections): Use bfd_malloc_and_get_section. - -Upstream-Status: Backport -CVE: CVE-2017-9955 #8 -Signed-off-by: Armin Kuster - ---- - binutils/ChangeLog | 13 +++++++++++++ - binutils/nlmconv.c | 6 ++---- - binutils/objcopy.c | 5 +++-- - binutils/objdump.c | 44 +++++++------------------------------------- - 4 files changed, 25 insertions(+), 43 deletions(-) - -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,16 @@ -+2017-07-01 Alan Modra -+ -+ PR binutils/21665 -+ * objdump.c (strtab): Make var a bfd_byte*. -+ (disassemble_section): Don't limit malloc size. Instead, use -+ bfd_malloc_and_get_section. -+ (read_section_stabs): Use bfd_malloc_and_get_section. Return -+ bfd_byte*. -+ (find_stabs_section): Remove now unnecessary cast. -+ * objcopy.c (copy_object): Use bfd_malloc_and_get_section. Free -+ contents on error return. -+ * nlmconv.c (copy_sections): Use bfd_malloc_and_get_section. -+ - 2017-06-30 Nick Clifton - - PR binutils/21665 -Index: git/binutils/nlmconv.c -=================================================================== ---- git.orig/binutils/nlmconv.c -+++ git/binutils/nlmconv.c -@@ -1224,7 +1224,7 @@ copy_sections (bfd *inbfd, asection *ins - const char *inname; - asection *outsec; - bfd_size_type size; -- void *contents; -+ bfd_byte *contents; - long reloc_size; - bfd_byte buf[4]; - bfd_size_type add; -@@ -1240,9 +1240,7 @@ copy_sections (bfd *inbfd, asection *ins - contents = NULL; - else - { -- contents = xmalloc (size); -- if (! bfd_get_section_contents (inbfd, insec, contents, -- (file_ptr) 0, size)) -+ if (!bfd_malloc_and_get_section (inbfd, insec, &contents)) - bfd_fatal (bfd_get_filename (inbfd)); - } - -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -180,7 +180,7 @@ static long dynsymcount = 0; - static bfd_byte *stabs; - static bfd_size_type stab_size; - --static char *strtab; -+static bfd_byte *strtab; - static bfd_size_type stabstr_size; - - static bfd_boolean is_relocatable = FALSE; -@@ -2112,29 +2112,6 @@ disassemble_section (bfd *abfd, asection - } - rel_ppend = rel_pp + rel_count; - -- /* PR 21665: Check for overlarge datasizes. -- Note - we used to check for "datasize > bfd_get_file_size (abfd)" but -- this fails when using compressed sections or compressed file formats -- (eg MMO, tekhex). -- -- The call to xmalloc below will fail if too much memory is requested, -- which will catch the problem in the normal use case. But if a memory -- checker is in use, eg valgrind or sanitize, then an exception will -- be still generated, so we try to catch the problem first. -- -- Unfortunately there is no simple way to determine how much memory can -- be allocated by calling xmalloc. So instead we use a simple, arbitrary -- limit of 2Gb. Hopefully this should be enough for most users. If -- someone does start trying to disassemble sections larger then 2Gb in -- size they will doubtless complain and we can increase the limit. */ --#define MAX_XMALLOC (1024 * 1024 * 1024 * 2UL) /* 2Gb */ -- if (datasize > MAX_XMALLOC) -- { -- non_fatal (_("Reading section %s failed because it is too big (%#lx)"), -- section->name, (unsigned long) datasize); -- return; -- } -- - data = (bfd_byte *) xmalloc (datasize); - - bfd_get_section_contents (abfd, section, data, 0, datasize); -@@ -2652,12 +2629,11 @@ dump_dwarf (bfd *abfd) - /* Read ABFD's stabs section STABSECT_NAME, and return a pointer to - it. Return NULL on failure. */ - --static char * -+static bfd_byte * - read_section_stabs (bfd *abfd, const char *sect_name, bfd_size_type *size_ptr) - { - asection *stabsect; -- bfd_size_type size; -- char *contents; -+ bfd_byte *contents; - - stabsect = bfd_get_section_by_name (abfd, sect_name); - if (stabsect == NULL) -@@ -2666,10 +2642,7 @@ read_section_stabs (bfd *abfd, const cha - return FALSE; - } - -- size = bfd_section_size (abfd, stabsect); -- contents = (char *) xmalloc (size); -- -- if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size)) -+ if (!bfd_malloc_and_get_section (abfd, stabsect, &contents)) - { - non_fatal (_("reading %s section of %s failed: %s"), - sect_name, bfd_get_filename (abfd), -@@ -2679,7 +2652,7 @@ read_section_stabs (bfd *abfd, const cha - return NULL; - } - -- *size_ptr = size; -+ *size_ptr = bfd_section_size (abfd, stabsect); - - return contents; - } -@@ -2806,8 +2779,7 @@ find_stabs_section (bfd *abfd, asection - - if (strtab) - { -- stabs = (bfd_byte *) read_section_stabs (abfd, section->name, -- &stab_size); -+ stabs = read_section_stabs (abfd, section->name, &stab_size); - if (stabs) - print_section_stabs (abfd, section->name, &sought->string_offset); - } -Index: git/binutils/objcopy.c -=================================================================== ---- git.orig/binutils/objcopy.c -+++ git/binutils/objcopy.c -@@ -2186,14 +2186,15 @@ copy_object (bfd *ibfd, bfd *obfd, const - continue; - } - -- bfd_byte * contents = xmalloc (size); -- if (bfd_get_section_contents (ibfd, sec, contents, 0, size)) -+ bfd_byte *contents; -+ if (bfd_malloc_and_get_section (ibfd, sec, &contents)) - { - if (fwrite (contents, 1, size, f) != size) - { - non_fatal (_("error writing section contents to %s (error: %s)"), - pdump->filename, - strerror (errno)); -+ free (contents); - return FALSE; - } - } diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch deleted file mode 100644 index c6353d8ce..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch +++ /dev/null @@ -1,361 +0,0 @@ -From 8e2f54bcee7e3e8315d4a39a302eaf8e4389e07d Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Tue, 30 May 2017 06:34:05 -0700 -Subject: [PATCH] Add bfd_get_file_size to get archive element size - -We can't use stat() to get archive element size. Add bfd_get_file_size -to get size for both normal files and archive elements. - -bfd/ - - PR binutils/21519 - * bfdio.c (bfd_get_file_size): New function. - * bfd-in2.h: Regenerated. - -binutils/ - - PR binutils/21519 - * objdump.c (dump_relocs_in_section): Replace get_file_size - with bfd_get_file_size to get archive element size. - * testsuite/binutils-all/objdump.exp (test_objdump_f): New - proc. - (test_objdump_h): Likewise. - (test_objdump_t): Likewise. - (test_objdump_r): Likewise. - (test_objdump_s): Likewise. - Add objdump tests on archive. - -Upstream-Status: Backport -CVE: CVE-2017-9955 -Signed-off-by: Armin Kuster - ---- - bfd/ChangeLog | 6 + - bfd/bfd-in2.h | 2 + - bfd/bfdio.c | 23 ++++ - binutils/ChangeLog | 13 ++ - binutils/objdump.c | 2 +- - binutils/testsuite/binutils-all/objdump.exp | 178 +++++++++++++++++++--------- - 6 files changed, 170 insertions(+), 54 deletions(-) - -Index: git/bfd/bfd-in2.h -=================================================================== ---- git.orig/bfd/bfd-in2.h -+++ git/bfd/bfd-in2.h -@@ -1241,6 +1241,8 @@ long bfd_get_mtime (bfd *abfd); - - file_ptr bfd_get_size (bfd *abfd); - -+file_ptr bfd_get_file_size (bfd *abfd); -+ - void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, - int prot, int flags, file_ptr offset, - void **map_addr, bfd_size_type *map_len); -Index: git/bfd/bfdio.c -=================================================================== ---- git.orig/bfd/bfdio.c -+++ git/bfd/bfdio.c -@@ -434,6 +434,29 @@ bfd_get_size (bfd *abfd) - return buf.st_size; - } - -+/* -+FUNCTION -+ bfd_get_file_size -+ -+SYNOPSIS -+ file_ptr bfd_get_file_size (bfd *abfd); -+ -+DESCRIPTION -+ Return the file size (as read from file system) for the file -+ associated with BFD @var{abfd}. It supports both normal files -+ and archive elements. -+ -+*/ -+ -+file_ptr -+bfd_get_file_size (bfd *abfd) -+{ -+ if (abfd->my_archive != NULL -+ && !bfd_is_thin_archive (abfd->my_archive)) -+ return arelt_size (abfd); -+ -+ return bfd_get_size (abfd); -+} - - /* - FUNCTION -Index: git/binutils/objdump.c -=================================================================== ---- git.orig/binutils/objdump.c -+++ git/binutils/objdump.c -@@ -3310,7 +3310,7 @@ dump_relocs_in_section (bfd *abfd, - } - - if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0 -- && relsize > get_file_size (bfd_get_filename (abfd))) -+ && relsize > bfd_get_file_size (abfd)) - { - printf (" (too many: 0x%x)\n", section->reloc_count); - bfd_set_error (bfd_error_file_truncated); -Index: git/binutils/testsuite/binutils-all/objdump.exp -=================================================================== ---- git.orig/binutils/testsuite/binutils-all/objdump.exp -+++ git/binutils/testsuite/binutils-all/objdump.exp -@@ -64,96 +64,168 @@ if [regexp $want $got] then { - if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then { - return - } -+if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest2.o]} then { -+ return -+} - if [is_remote host] { - set testfile [remote_download host tmpdir/bintest.o] -+ set testfile2 [remote_download host tmpdir/bintest2.o] - } else { - set testfile tmpdir/bintest.o -+ set testfile2 tmpdir/bintest2.o -+} -+ -+if { ![istarget "alpha-*-*"] || [is_elf_format] } then { -+ remote_file host file delete tmpdir/bintest.a -+ set got [binutils_run $AR "rc tmpdir/bintest.a $testfile2"] -+ if ![string match "" $got] then { -+ fail "bintest.a" -+ remote_file host delete tmpdir/bintest.a -+ } else { -+ if [is_remote host] { -+ set testarchive [remote_download host tmpdir/bintest.a] -+ } else { -+ set testarchive tmpdir/bintest.a -+ } -+ } -+ remote_file host delete tmpdir/bintest2.o - } - - # Test objdump -f - --set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f $testfile"] -+proc test_objdump_f { testfile dumpfile } { -+ global OBJDUMP -+ global OBJDUMPFLAGS -+ global cpus_regex - --set want "$testfile:\[ \]*file format.*architecture:\[ \]*${cpus_regex}.*HAS_RELOC.*HAS_SYMS" -+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f $testfile"] - --if ![regexp $want $got] then { -- fail "objdump -f" --} else { -- pass "objdump -f" -+ set want "$dumpfile:\[ \]*file format.*architecture:\[ \]*${cpus_regex}.*HAS_RELOC.*HAS_SYMS" -+ -+ if ![regexp $want $got] then { -+ fail "objdump -f ($testfile, $dumpfile)" -+ } else { -+ pass "objdump -f ($testfile, $dumpfile)" -+ } -+} -+ -+test_objdump_f $testfile $testfile -+if { [ remote_file host exists $testarchive ] } then { -+ test_objdump_f $testarchive bintest2.o - } - - # Test objdump -h - --set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h $testfile"] -+proc test_objdump_h { testfile dumpfile } { -+ global OBJDUMP -+ global OBJDUMPFLAGS - --set want "$testfile:\[ \]*file format.*Sections.*\[0-9\]+\[ \]+\[^ \]*(text|TEXT|P|\\\$CODE\\\$)\[^ \]*\[ \]*(\[0-9a-fA-F\]+).*\[0-9\]+\[ \]+\[^ \]*(\\.data|DATA|D_1)\[^ \]*\[ \]*(\[0-9a-fA-F\]+)" -+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h $testfile"] - --if ![regexp $want $got all text_name text_size data_name data_size] then { -- fail "objdump -h" --} else { -- verbose "text name is $text_name size is $text_size" -- verbose "data name is $data_name size is $data_size" -- set ets 8 -- set eds 4 -- # The [ti]c4x target has the property sizeof(char)=sizeof(long)=1 -- if [istarget *c4x*-*-*] then { -- set ets 2 -- set eds 1 -- } -- # c54x section sizes are in bytes, not octets; adjust accordingly -- if [istarget *c54x*-*-*] then { -- set ets 4 -- set eds 2 -- } -- if {[expr "0x$text_size"] < $ets || [expr "0x$data_size"] < $eds} then { -- send_log "sizes too small\n" -- fail "objdump -h" -+ set want "$dumpfile:\[ \]*file format.*Sections.*\[0-9\]+\[ \]+\[^ \]*(text|TEXT|P|\\\$CODE\\\$)\[^ \]*\[ \]*(\[0-9a-fA-F\]+).*\[0-9\]+\[ \]+\[^ \]*(\\.data|DATA|D_1)\[^ \]*\[ \]*(\[0-9a-fA-F\]+)" -+ -+ if ![regexp $want $got all text_name text_size data_name data_size] then { -+ fail "objdump -h ($testfile, $dumpfile)" - } else { -- pass "objdump -h" -+ verbose "text name is $text_name size is $text_size" -+ verbose "data name is $data_name size is $data_size" -+ set ets 8 -+ set eds 4 -+ # The [ti]c4x target has the property sizeof(char)=sizeof(long)=1 -+ if [istarget *c4x*-*-*] then { -+ set ets 2 -+ set eds 1 -+ } -+ # c54x section sizes are in bytes, not octets; adjust accordingly -+ if [istarget *c54x*-*-*] then { -+ set ets 4 -+ set eds 2 -+ } -+ if {[expr "0x$text_size"] < $ets || [expr "0x$data_size"] < $eds} then { -+ send_log "sizes too small\n" -+ fail "objdump -h ($testfile, $dumpfile)" -+ } else { -+ pass "objdump -h ($testfile, $dumpfile)" -+ } - } - } - -+test_objdump_h $testfile $testfile -+if { [ remote_file host exists $testarchive ] } then { -+ test_objdump_h $testarchive bintest2.o -+} -+ - # Test objdump -t - --set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -t $testfile"] -+proc test_objdump_t { testfile} { -+ global OBJDUMP -+ global OBJDUMPFLAGS -+ -+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -t $testfile"] -+ -+ if [info exists vars] then { unset vars } -+ while {[regexp "(\[a-z\]*_symbol)(.*)" $got all symbol rest]} { -+ set vars($symbol) 1 -+ set got $rest -+ } - --if [info exists vars] then { unset vars } --while {[regexp "(\[a-z\]*_symbol)(.*)" $got all symbol rest]} { -- set vars($symbol) 1 -- set got $rest -+ if {![info exists vars(text_symbol)] \ -+ || ![info exists vars(data_symbol)] \ -+ || ![info exists vars(common_symbol)] \ -+ || ![info exists vars(external_symbol)]} then { -+ fail "objdump -t ($testfile)" -+ } else { -+ pass "objdump -t ($testfile)" -+ } - } - --if {![info exists vars(text_symbol)] \ -- || ![info exists vars(data_symbol)] \ -- || ![info exists vars(common_symbol)] \ -- || ![info exists vars(external_symbol)]} then { -- fail "objdump -t" --} else { -- pass "objdump -t" -+test_objdump_t $testfile -+if { [ remote_file host exists $testarchive ] } then { -+ test_objdump_t $testarchive - } - - # Test objdump -r - --set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $testfile"] -+proc test_objdump_r { testfile dumpfile } { -+ global OBJDUMP -+ global OBJDUMPFLAGS - --set want "$testfile:\[ \]*file format.*RELOCATION RECORDS FOR \\\[\[^\]\]*(text|TEXT|P|\\\$CODE\\\$)\[^\]\]*\\\].*external_symbol" -+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $testfile"] - --if [regexp $want $got] then { -- pass "objdump -r" --} else { -- fail "objdump -r" -+ set want "$dumpfile:\[ \]*file format.*RELOCATION RECORDS FOR \\\[\[^\]\]*(text|TEXT|P|\\\$CODE\\\$)\[^\]\]*\\\].*external_symbol" -+ -+ if [regexp $want $got] then { -+ pass "objdump -r ($testfile, $dumpfile)" -+ } else { -+ fail "objdump -r ($testfile, $dumpfile)" -+ } -+} -+ -+test_objdump_r $testfile $testfile -+if { [ remote_file host exists $testarchive ] } then { -+ test_objdump_r $testarchive bintest2.o - } - - # Test objdump -s - --set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s $testfile"] -+proc test_objdump_s { testfile dumpfile } { -+ global OBJDUMP -+ global OBJDUMPFLAGS - --set want "$testfile:\[ \]*file format.*Contents.*(text|TEXT|P|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000|00000100).*Contents.*(data|DATA|D_1)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000|00000200)" -+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s $testfile"] - --if [regexp $want $got] then { -- pass "objdump -s" --} else { -- fail "objdump -s" -+ set want "$dumpfile:\[ \]*file format.*Contents.*(text|TEXT|P|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000|00000100).*Contents.*(data|DATA|D_1)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000|00000200)" -+ -+ if [regexp $want $got] then { -+ pass "objdump -s ($testfile, $dumpfile)" -+ } else { -+ fail "objdump -s ($testfile, $dumpfile)" -+ } -+} -+ -+test_objdump_s $testfile $testfile -+if { [ remote_file host exists $testarchive ] } then { -+ test_objdump_s $testarchive bintest2.o - } - - # Test objdump -s on a file that contains a compressed .debug section -Index: git/bfd/ChangeLog -=================================================================== ---- git.orig/bfd/ChangeLog -+++ git/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2017-05-30 H.J. Lu -+ -+ PR binutils/21519 -+ * bfdio.c (bfd_get_file_size): New function. -+ * bfd-in2.h: Regenerated. -+ - 2017-06-27 Alan Modra - - PR binutils/21665 -Index: git/binutils/ChangeLog -=================================================================== ---- git.orig/binutils/ChangeLog -+++ git/binutils/ChangeLog -@@ -1,3 +1,16 @@ -+2017-05-30 H.J. Lu -+ -+ PR binutils/21519 -+ * objdump.c (dump_relocs_in_section): Replace get_file_size -+ with bfd_get_file_size to get archive element size. -+ * testsuite/binutils-all/objdump.exp (test_objdump_f): New -+ proc. -+ (test_objdump_h): Likewise. -+ (test_objdump_t): Likewise. -+ (test_objdump_r): Likewise. -+ (test_objdump_s): Likewise. -+ Add objdump tests on archive. -+ - 2017-07-01 Alan Modra - - PR binutils/21665 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb deleted file mode 100644 index b51437bbc..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb +++ /dev/null @@ -1,45 +0,0 @@ -require binutils.inc -require binutils-${PV}.inc - -DEPENDS += "flex bison zlib" - -EXTRA_OECONF += "--with-sysroot=/ \ - --enable-install-libbfd \ - --enable-install-libiberty \ - --enable-shared \ - --with-system-zlib \ - " - -EXTRA_OEMAKE_append_libc-musl = "\ - gt_cv_func_gnugettext1_libc=yes \ - gt_cv_func_gnugettext2_libc=yes \ - " -EXTRA_OECONF_class-native = "--enable-targets=all \ - --enable-64-bit-bfd \ - --enable-install-libiberty \ - --enable-install-libbfd \ - --disable-werror" - -do_install_class-native () { - autotools_do_install - - # Install the libiberty header - install -d ${D}${includedir} - install -m 644 ${S}/include/ansidecl.h ${D}${includedir} - install -m 644 ${S}/include/libiberty.h ${D}${includedir} - - # We only want libiberty, libbfd and libopcodes - rm -rf ${D}${bindir} - rm -rf ${D}${prefix}/${TARGET_SYS} - rm -rf ${D}${prefix}/lib/ldscripts - rm -rf ${D}${prefix}/share/info - rm -rf ${D}${prefix}/share/locale - rm -rf ${D}${prefix}/share/man - rmdir ${D}${prefix}/share || : - rmdir ${D}/${libdir}/gcc-lib || : - rmdir ${D}/${libdir}64/gcc-lib || : - rmdir ${D}/${libdir} || : - rmdir ${D}/${libdir}64 || : -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb new file mode 100644 index 000000000..51a974890 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb @@ -0,0 +1,49 @@ +require binutils.inc +require binutils-${PV}.inc + +DEPENDS += "flex bison zlib" + +EXTRA_OECONF += "--with-sysroot=/ \ + --enable-install-libbfd \ + --enable-install-libiberty \ + --enable-shared \ + --with-system-zlib \ + " + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + " +EXTRA_OECONF_class-native = "--enable-targets=all \ + --enable-64-bit-bfd \ + --enable-install-libiberty \ + --enable-install-libbfd \ + --disable-werror" + +do_install_class-native () { + autotools_do_install + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + # We only want libiberty, libbfd and libopcodes + rm -rf ${D}${bindir} + rm -rf ${D}${prefix}/${TARGET_SYS} + rm -rf ${D}${prefix}/lib/ldscripts + rm -rf ${D}${prefix}/share/info + rm -rf ${D}${prefix}/share/locale + rm -rf ${D}${prefix}/share/man + rmdir ${D}${prefix}/share || : + rmdir ${D}/${libdir}/gcc-lib || : + rmdir ${D}/${libdir}64/gcc-lib || : + rmdir ${D}/${libdir} || : + rmdir ${D}/${libdir}64 || : +} + +# Split out libbfd-*.so so including perf doesn't include extra stuff +PACKAGE_BEFORE_PN += "libbfd" +FILES_libbfd = "${libdir}/libbfd-*.so" + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch index 9543a56f1..1e86f5522 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch @@ -1,4 +1,4 @@ -From 3a15f7c9ace6c0294edc313a1848cafcc31b2a92 Mon Sep 17 00:00:00 2001 +From 5b9204eee4b06b48d54ecc3ef3a0b56fc5cc84f8 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Fri, 24 Apr 2015 00:38:32 -0700 Subject: [PATCH] src/local.mk: fix parallel issue @@ -9,11 +9,12 @@ echo '#! /bin/sh' >src/yacc.tmp /bin/bash: src/yacc.tmp: No such file or directory Makefile:6670: recipe for target 'src/yacc' failed -Upstream-Status: Pending +Upstream-Status: Submitted [ http://lists.gnu.org/archive/html/bison-patches/2017-07/msg00000.html ] Signed-off-by: Robert Yang +Signed-off-by: Dengke Du --- - src/local.mk | 1 + + src/local.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/local.mk b/src/local.mk @@ -29,5 +30,5 @@ index 573ad00..28bfae4 100644 $(AM_V_at)echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp $(AM_V_at)chmod a+x $@.tmp -- -1.7.9.5 +2.8.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb index cffcd885a..7d066be0a 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb @@ -23,7 +23,6 @@ EXTRA_OECONF += "M4=m4" SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021" SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1" -LDFLAGS_prepend_libc-uclibc = " -lrt " DEPENDS_class-native = "gettext-minimal-native" inherit autotools gettext texinfo diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb index 4f01734bb..a3101351e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb @@ -134,7 +134,7 @@ do_install () { echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf # Use python 3 instead of python 2 - sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui + sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/pybootchartgui } PACKAGES =+ "pybootchartgui" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch new file mode 100644 index 000000000..a81900ee7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch @@ -0,0 +1,30 @@ +From e58369f6d36bc51eb59d6afa34c1cae3ff0810ef Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 7 Aug 2017 14:10:38 +0300 +Subject: [PATCH] Makefile: build mktables using native gcc + +It's a throwaway helper binary used during build, and so it needs to +be native. + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Alexander Kanavin +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b3e2b63..347aaf1 100644 +--- a/Makefile ++++ b/Makefile +@@ -323,7 +323,7 @@ version.h: version.sh version.h.in configure.ac + + mktables: kernel-lib/mktables.c + @echo " [CC] $@" +- $(Q)$(CC) $(CFLAGS) $< -o $@ ++ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ + + kernel-lib/tables.c: mktables + @echo " [TABLE] $@" +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb new file mode 100644 index 000000000..c3cc89c2b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb @@ -0,0 +1,35 @@ +SUMMARY = "Checksumming Copy on Write Filesystem utilities" +DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ +implementing advanced features while focusing on fault tolerance, repair and \ +easy administration. \ +This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ +btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." + +HOMEPAGE = "https://btrfs.wiki.kernel.org" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" +SECTION = "base" +DEPENDS = "util-linux attr e2fsprogs lzo acl" +DEPENDS_append_class-target = " udev" +RDEPENDS_${PN} = "libgcc" + +SRCREV = "0607132c3200bcead1426e6dc685432008de95de" +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ + file://0001-Makefile-build-mktables-using-native-gcc.patch \ + " + +inherit autotools-brokensep pkgconfig manpages + +PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" +EXTRA_OECONF_append_libc-musl = " --disable-backtrace " + +do_configure_prepend() { + # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. + mkdir -p ${S}/config + cp -f $(automake --print-libdir)/install-sh ${S}/config/ +} + +S = "${WORKDIR}/git" + +BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb deleted file mode 100644 index a5e9e2278..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Checksumming Copy on Write Filesystem utilities" -DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ -implementing advanced features while focusing on fault tolerance, repair and \ -easy administration. \ -This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ -btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." - -HOMEPAGE = "https://btrfs.wiki.kernel.org" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" -SECTION = "base" -DEPENDS = "util-linux attr e2fsprogs lzo acl" -DEPENDS_append_class-target = " udev" -RDEPENDS_${PN} = "libgcc" - -SRCREV = "96485c34ac0329fb0073476f16d2083c64701f29" -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git" - -inherit autotools-brokensep pkgconfig manpages - -PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" -EXTRA_OECONF_append_libc-musl = " --disable-backtrace " - -do_configure_prepend() { - # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. - mkdir -p ${S}/config - cp -f $(automake --print-libdir)/install-sh ${S}/config/ -} - -S = "${WORKDIR}/git" - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb index c60c16410..84d04cfa0 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb @@ -22,6 +22,7 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \ SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" PE = "1" PV = "2015.02.10+git${SRCPV}" +UPSTREAM_VERSION_UNKNOWN = "1" S = "${WORKDIR}/git" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch index f96f104fa..3d303fbc6 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch @@ -1,14 +1,24 @@ -Upstream-Status: Pending +From 285b5fbf1d6b25ff55d305c17edf4d327bf19dd3 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Tue, 5 Jul 2011 23:42:29 +0100 +Subject: [PATCH] chrpath: Ensure the package respects the docdir variable -autoconf/automake set docdir automatically, use their value ensuring +autoconf/automake set docdir automatically, use their value ensuring doc files are placed into $datadir/doc, not $prefix/doc. RP 5/7/2011 -Index: chrpath-0.13/Makefile.am -=================================================================== ---- chrpath-0.13.orig/Makefile.am 2011-07-05 23:40:14.769920254 +0100 -+++ chrpath-0.13/Makefile.am 2011-07-05 23:40:19.819920635 +0100 +Upstream-Status: Submitted [ http://lists.alioth.debian.org/pipermail/chrpath-devel/Week-of-Mon-20170710/000013.html ] + +Signed-off-by: Dengke Du +--- + Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index b50ad21..5f7e861 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -1,7 +1,5 @@ SUBDIRS = testsuite deb @@ -17,3 +27,6 @@ Index: chrpath-0.13/Makefile.am doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README bin_PROGRAMS = chrpath +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb deleted file mode 100644 index 7ad4345ef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb +++ /dev/null @@ -1,37 +0,0 @@ -require cmake.inc -inherit native - -DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native" - -SRC_URI += "\ - file://cmlibarchive-disable-ext2fs.patch \ -" - -B = "${WORKDIR}/build" -do_configure[cleandirs] = "${B}" - -# Disable ccmake since we don't depend on ncurses -CMAKE_EXTRACONF = "\ - -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ - -DBUILD_CursesDialog=0 \ - -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ - -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ - -DHAVE_SYS_ACL_H=0 \ -" - -do_configure () { - ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF} -} - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -do_compile[progress] = "percent" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb new file mode 100644 index 000000000..e55e8b1cf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb @@ -0,0 +1,38 @@ +require cmake.inc +inherit native + +DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native" + +SRC_URI += "\ + file://cmlibarchive-disable-ext2fs.patch \ +" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +# Disable ccmake since we don't depend on ncurses +CMAKE_EXTRACONF = "\ + -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ + -DBUILD_CursesDialog=0 \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ + -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ + -DHAVE_SYS_ACL_H=0 \ +" + +do_configure () { + ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF} +} + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +do_compile[progress] = "percent" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc index 6c8b36d18..6aeb25fdd 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc @@ -6,7 +6,7 @@ HOMEPAGE = "http://www.cmake.org/" BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php" SECTION = "console/utils" LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://Copyright.txt;md5=7a64bc564202bf7401d9a8ef33c9564d \ +LIC_FILES_CHKSUM = "file://Copyright.txt;md5=8d8c7bc32f8797d23f5cf605d9339d2d \ file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14" CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" @@ -14,12 +14,11 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ file://support-oe-qt4-tools-names.patch \ file://qt4-fail-silent.patch \ - file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \ - file://0001-KWIML-tests-Remove-format-security-from-flags.patch \ + file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \ " -SRC_URI[md5sum] = "79bd7e65cd81ea3aa2619484ad6ff25a" -SRC_URI[sha256sum] = "dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0" +SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419" +SRC_URI[sha256sum] = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d" UPSTREAM_CHECK_REGEX = "cmake-(?P\d+(\.\d+)+)\.tar" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch new file mode 100644 index 000000000..9b820db00 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch @@ -0,0 +1,40 @@ +From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001 +From: Maxime Roussin-Bélanger +Date: Mon, 26 Jun 2017 11:30:07 -0400 +Subject: [PATCH] cmake: Use find_program if find_host_program is not + available + +CMake does not define the `find_host_program` command we've been using +in the cross-compiling code path. It was provided by a widely used +Android toolchain file. For compatibility, continue to use +`find_host_program` if available, but otherwise use just `find_program`. + +Upstream-Status: Accepted +[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009] + - Will be in 3.10 + +Signed-off-by: Maxime Roussin-Bélanger +--- + Modules/FindCUDA.cmake | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake +index a4dca54..77ca351 100644 +--- a/Modules/FindCUDA.cmake ++++ b/Modules/FindCUDA.cmake +@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING) + # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers + set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") + macro( cuda_find_host_program ) +- find_host_program( ${ARGN} ) ++ if (COMMAND find_host_program) ++ find_host_program( ${ARGN} ) ++ else() ++ find_program( ${ARGN} ) ++ endif() + endmacro() + else() + # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch deleted file mode 100644 index 190133ba5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0941395b146804abcd87004589ff6e7a2953412d Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Thu, 16 Mar 2017 14:39:04 +0200 -Subject: [PATCH] KWIML tests: Remove format-security from flags - -For the tests where "format" is removed from flags, "format-security" -should be removed as well. Otherwise building cmake with -"-Wformat -Wformat-security" fails: - -| cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] - -Upstream-Status: Backport [part of commit f77420cfc9] -Signed-off-by: Jussi Kukkonen ---- - Utilities/KWIML/test/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt -index 4f6f37b..1bf93bb 100644 ---- a/Utilities/KWIML/test/CMakeLists.txt -+++ b/Utilities/KWIML/test/CMakeLists.txt -@@ -10,7 +10,7 @@ endif() - # Suppress printf/scanf format warnings; we test if the sizes match. - foreach(lang C CXX) - if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") -- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format") -+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security") - endif() - endforeach() - --- -2.1.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index 6518408c7..dc8477ea3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake @@ -1,7 +1,7 @@ set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE ) -set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) +set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch deleted file mode 100644 index 8b8d4802e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Fri, 14 Oct 2016 16:26:58 -0700 -Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with - -Wstrict-prototypes - -Avoid warnings (and therefore build failures etc) if a user happens -to add -Wstrict-prototypes to CFLAGS. - - | $ gcc --version - | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 - | - | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c - | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes] - | CHECK_FUNCTION_EXISTS(); - | ^ - | cc1: all warnings being treated as errors - | - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - Modules/CheckFunctionExists.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c -index 2304000..224e340 100644 ---- a/Modules/CheckFunctionExists.c -+++ b/Modules/CheckFunctionExists.c -@@ -4,7 +4,7 @@ - extern "C" - #endif - char -- CHECK_FUNCTION_EXISTS(); -+ CHECK_FUNCTION_EXISTS(void); - #ifdef __CLASSIC_C__ - int main() - { --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb deleted file mode 100644 index f566a48cf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb +++ /dev/null @@ -1,49 +0,0 @@ -require cmake.inc - -inherit cmake - -DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" - -SRC_URI_append_class-nativesdk = " \ - file://OEToolchainConfig.cmake \ - file://environment.d-cmake.sh" - -# Strip ${prefix} from ${docdir}, set result into docdir_stripped -python () { - prefix=d.getVar("prefix") - docdir=d.getVar("docdir") - - if not docdir.startswith(prefix): - bb.fatal('docdir must contain prefix as its prefix') - - docdir_stripped = docdir[len(prefix):] - if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': - docdir_stripped = docdir_stripped[1:] - - d.setVar("docdir_stripped", docdir_stripped) -} - -EXTRA_OECMAKE=" \ - -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ - -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ - -DKWSYS_CHAR_IS_SIGNED=1 \ - -DBUILD_CursesDialog=0 \ - -DKWSYS_LFS_WORKS=1 \ -" - -do_install_append_class-nativesdk() { - mkdir -p ${D}${datadir}/cmake - install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ - - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh -} - -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" - -FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}" -FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" - -BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb new file mode 100644 index 000000000..3f8fd7a99 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb @@ -0,0 +1,50 @@ +require cmake.inc + +inherit cmake + +DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" + +SRC_URI_append_class-nativesdk = " \ + file://OEToolchainConfig.cmake \ + file://environment.d-cmake.sh" + +# Strip ${prefix} from ${docdir}, set result into docdir_stripped +python () { + prefix=d.getVar("prefix") + docdir=d.getVar("docdir") + + if not docdir.startswith(prefix): + bb.fatal('docdir must contain prefix as its prefix') + + docdir_stripped = docdir[len(prefix):] + if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': + docdir_stripped = docdir_stripped[1:] + + d.setVar("docdir_stripped", docdir_stripped) +} + +EXTRA_OECMAKE=" \ + -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ + -DKWSYS_CHAR_IS_SIGNED=1 \ + -DBUILD_CursesDialog=0 \ + -DKWSYS_LFS_WORKS=1 \ +" + +do_install_append_class-nativesdk() { + mkdir -p ${D}${datadir}/cmake + install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh +} + +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" + +FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}" +FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" + +BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch index 01271246a..cd72084ee 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Mon, 2 Jan 2017 17:23:59 +0200 Subject: [PATCH] Correctly install the shared library -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/createrepo_c/pull/78] Signed-off-by: Alexander Kanavin --- src/CMakeLists.txt | 3 ++- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb index 1f906ee0a..7b70daa32 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb @@ -11,6 +11,7 @@ SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v${PV}/${BP}. file://0001-print-progress-in-percent-when-downloading-CVE-db.patch \ file://0001-curl-allow-overriding-default-CA-certificate-file.patch \ file://0001-update-Compare-computed-vs-expected-sha256-digit-str.patch \ + file://0001-Fix-freeing-memory-allocated-by-sqlite.patch \ " SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155" @@ -29,7 +30,7 @@ CFLAGS_append = " -Wno-error=pedantic" do_populate_cve_db() { if [ "${BB_NO_NETWORK}" = "1" ] ; then - bberror "BB_NO_NETWORK is set; Can't update cve-check-tool database, CVEs won't be checked" + bbwarn "BB_NO_NETWORK is set; Can't update cve-check-tool database, new CVEs won't be detected" return fi diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch new file mode 100644 index 000000000..4a82cf2dd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch @@ -0,0 +1,50 @@ +From a3353429652f83bb8b0316500faa88fa2555542d Mon Sep 17 00:00:00 2001 +From: Peter Marko +Date: Thu, 13 Apr 2017 23:09:52 +0200 +Subject: [PATCH] Fix freeing memory allocated by sqlite + +Upstream-Status: Backport +Signed-off-by: Peter Marko +--- + src/core.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/core.c b/src/core.c +index 6263031..6788f16 100644 +--- a/src/core.c ++++ b/src/core.c +@@ -82,7 +82,7 @@ static bool ensure_table(CveDB *self) + rc = sqlite3_exec(self->db, query, NULL, NULL, &err); + if (rc != SQLITE_OK) { + fprintf(stderr, "ensure_table(): %s\n", err); +- free(err); ++ sqlite3_free(err); + return false; + } + +@@ -91,7 +91,7 @@ static bool ensure_table(CveDB *self) + rc = sqlite3_exec(self->db, query, NULL, NULL, &err); + if (rc != SQLITE_OK) { + fprintf(stderr, "ensure_table(): %s\n", err); +- free(err); ++ sqlite3_free(err); + return false; + } + +@@ -99,11 +99,11 @@ static bool ensure_table(CveDB *self) + rc = sqlite3_exec(self->db, query, NULL, NULL, &err); + if (rc != SQLITE_OK) { + fprintf(stderr, "ensure_table(): %s\n", err); +- free(err); ++ sqlite3_free(err); + return false; + } + if (err) { +- free(err); ++ sqlite3_free(err); + } + + return true; +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch index 0510e3ae0..8ea6f686e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch @@ -38,7 +38,7 @@ index 06d4b30..0fe6d76 100644 + if (dltotal && percent && percent->end >= percent->start) { + unsigned int diff = percent->end - percent->start; + if (diff) { -+ fprintf(stderr,"completed: "CURL_FORMAT_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal)); ++ fprintf(stderr,"completed: %"CURL_FORMAT_CURL_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal)); + } + } + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb b/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb index 583b387e9..f8b7b06cf 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb @@ -18,14 +18,9 @@ S = "${WORKDIR}/diffstat-${PV}" inherit autotools gettext ptest -LDFLAGS += "${TOOLCHAIN_OPTIONS}" +EXTRA_AUTORECONF += "--exclude=aclocal" -do_configure () { - if [ ! -e ${S}/acinclude.m4 ]; then - mv ${S}/aclocal.m4 ${S}/acinclude.m4 - fi - autotools_do_configure -} +LDFLAGS += "${TOOLCHAIN_OPTIONS}" do_install_ptest() { cp -r ${S}/testing ${D}${PTEST_PATH} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb index ea3d7c10b..b6da65a58 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb @@ -23,6 +23,7 @@ SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \ file://distcc.service" SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c" S = "${WORKDIR}/git" +UPSTREAM_VERSION_UNKNOWN = "1" inherit autotools pkgconfig update-rc.d useradd systemd diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb deleted file mode 100644 index 109a9d2ee..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "DMI (Desktop Management Interface) table related utilities" -HOMEPAGE = "http://www.nongnu.org/dmidecode/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz" - -COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux" - -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -do_install() { - oe_runmake DESTDIR="${D}" install -} - -do_unpack_extra() { - sed -i -e '/^prefix/s:/usr/local:${exec_prefix}:' ${S}/Makefile -} -addtask unpack_extra after do_unpack before do_patch - -SRC_URI[md5sum] = "281ee572d45c78eca73a14834c495ffd" -SRC_URI[sha256sum] = "7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb new file mode 100644 index 000000000..f83281e23 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "DMI (Desktop Management Interface) table related utilities" +HOMEPAGE = "http://www.nongnu.org/dmidecode/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +do_install() { + oe_runmake DESTDIR="${D}" install +} + +do_unpack_extra() { + sed -i -e '/^prefix/s:/usr/local:${exec_prefix}:' ${S}/Makefile +} +addtask unpack_extra after do_unpack before do_patch + +SRC_URI[md5sum] = "679c2c015c515aa6ca5f229aee49c102" +SRC_URI[sha256sum] = "d766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0" + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch new file mode 100644 index 000000000..05f314151 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch @@ -0,0 +1,31 @@ +From 166833a88a928a574bf9143b9b65f544be482c77 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 18 Aug 2017 15:55:15 +0300 +Subject: [PATCH] Check conf.releasever instead of releasever + +The substitutions may actually set the conf.releasever correctly, +and so the check should use that instead of the passed-in function +parameter. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/901] +Signed-off-by: Alexander Kanavin +--- + dnf/cli/cli.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py +index 2d63420c..167943b8 100644 +--- a/dnf/cli/cli.py ++++ b/dnf/cli/cli.py +@@ -914,7 +914,7 @@ class Cli(object): + conf.releasever = releasever + subst = conf.substitutions + subst.update_from_etc(conf.installroot) +- if releasever is None: ++ if conf.releasever is None: + logger.warning(_("Unable to detect release version (use '--releasever' to specify " + "release version)")) + +-- +2.14.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch index 61328e6ec..1abd880da 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch @@ -10,8 +10,7 @@ Signed-off-by: Alexander Kanavin --- bin/dnf-automatic.in | 2 +- bin/dnf.in | 2 +- - bin/yum.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in index 5b06aa26..9f6f703e 100755 @@ -33,16 +32,6 @@ index 645d0f06..ab141abd 100755 # The dnf executable script. # # Copyright (C) 2012-2016 Red Hat, Inc. -diff --git a/bin/yum.in b/bin/yum.in -index f1fee071..013dc8c5 100755 ---- a/bin/yum.in -+++ b/bin/yum.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # The dnf executable script. - # - # Copyright (C) 2016 Red Hat, Inc. -- 2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb new file mode 100644 index 000000000..3ed6a7457 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb @@ -0,0 +1,52 @@ +SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \ + " + +SRC_URI = "git://github.com/rpm-software-management/dnf.git \ + file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ + file://0030-Run-python-scripts-using-env.patch \ + file://0001-Do-not-prepend-installroot-to-logdir.patch \ + file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ + file://0001-Corretly-install-tmpfiles.d-configuration.patch \ + file://0001-Check-conf.releasever-instead-of-releasever.patch \ + " + +SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +inherit cmake gettext bash-completion distutils3-base systemd + +DEPENDS += "libdnf librepo libcomps python3-iniparse" + +# manpages generation requires http://www.sphinx-doc.org/ +EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" + +BBCLASSEXTEND = "native nativesdk" +RDEPENDS_${PN}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg" +# Recommend gnupg so that GPG signature check on repository metadata is possible +RRECOMMENDS_${PN}_class-target += "gnupg" + +# Create a symlink called 'dnf' as 'make install' does not do it, but +# .spec file in dnf source tree does (and then Fedora and dnf documentation +# says that dnf binary is plain 'dnf'). +do_install_append() { + lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf + lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic +} + +# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in +do_install_append_class-native() { + create_wrapper ${D}/${bindir}/dnf \ + RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 +} + +SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \ + dnf-automatic-download.service dnf-automatic-download.timer \ + dnf-automatic-install.service dnf-automatic-install.timer \ + dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ +" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb deleted file mode 100644 index 9f814fb21..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \ - " - -SRC_URI = "git://github.com/rpm-software-management/dnf.git \ - file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0030-Run-python-scripts-using-env.patch \ - file://0001-Do-not-prepend-installroot-to-logdir.patch \ - file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ - file://0001-Corretly-install-tmpfiles.d-configuration.patch \ - " - -PV = "2.0.0+git${SRCPV}" -SRCREV = "f0093d672d3069cfee8447973ae70ef615fd8886" - -S = "${WORKDIR}/git" - -inherit cmake gettext bash-completion distutils3-base systemd - -DEPENDS += "libdnf librepo libcomps python3-pygpgme python3-iniparse" - -# manpages generation requires http://www.sphinx-doc.org/ -EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" - -BBCLASSEXTEND = "native nativesdk" -RDEPENDS_${PN}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-pygpgme python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc" - -# Create a symlink called 'dnf' as 'make install' does not do it, but -# .spec file in dnf source tree does (and then Fedora and dnf documentation -# says that dnf binary is plain 'dnf'). -do_install_append() { - lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf - lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic -} - -# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in -do_install_append_class-native() { - create_wrapper ${D}/${bindir}/dnf \ - RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 -} - -SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \ - dnf-automatic-download.service dnf-automatic-download.timer \ - dnf-automatic-install.service dnf-automatic-install.timer \ - dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ -" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch new file mode 100644 index 000000000..50e689440 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch @@ -0,0 +1,41 @@ +From a328c8bec0bf8071ae8f20fee4c7475205064ba1 Mon Sep 17 00:00:00 2001 +From: sweeaun +Date: Sun, 10 Sep 2017 00:14:15 -0700 +Subject: [PATCH] dpkg: Support muslx32 build + +Upstream-Status: Pending. +Changes made on ostable and tupletable to enable muslx32 build. + +Signed-off-by: sweeaun +--- + data/ostable | 1 + + data/tupletable | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/data/ostable b/data/ostable +index be64342..87db273 100644 +--- a/data/ostable ++++ b/data/ostable +@@ -19,6 +19,7 @@ base-uclibc-linux linux-uclibc linux[^-]*-uclibc + eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf + eabi-musl-linux linux-musleabi linux[^-]*-musleabi + base-musl-linux linux-musl linux[^-]*-musl ++x32-musl-linux linux-muslx32 linux[^-]*-muslx32 + eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf + eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi + abin32-gnu-linux linux-gnuabin32 linux[^-]*-gnuabin32 +diff --git a/data/tupletable b/data/tupletable +index 28f00bf..748ffab 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -10,6 +10,7 @@ base-uclibc-linux- uclibc-linux- + eabihf-musl-linux-arm musl-linux-armhf + eabi-musl-linux-arm musl-linux-armel + base-musl-linux- musl-linux- ++x32-musl-linux-amd64 x32 + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf + eabi-gnu-linux-arm armel +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch index 231a6a290..9fe0ca760 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch @@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [embedded specific] 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c -index 79b2908..7758aa5 100644 +index 453077fd9..f42ea2882 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c -@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string, - - /* XXX: Would be faster to use something like cisversion and cisrevision. */ +@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string, ptr = rversion->version; + if (!*ptr) + return dpkg_put_error(err, _("version number is empty")); - if (*ptr && !c_isdigit(*ptr++)) - return dpkg_put_warn(err, _("version number does not start with digit")); for (; *ptr; ptr++) { @@ -33,6 +33,6 @@ index 79b2908..7758aa5 100644 return dpkg_put_warn(err, _("invalid character in revision number")); } --- -2.1.4 +-- +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch index a6b00880c..d929466b7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch @@ -6,37 +6,36 @@ Subject: [PATCH] add musleabi to known target tripets helps compiling dpkg for musl/arm-softfloat Signed-off-by: Khem Raj +Signed-off-by: Aníbal Limón --- -Upstream-Status: Pending - - ostable | 1 + - triplettable | 1 + + data/ostable | 1 + + data/tupletable | 1 + 2 files changed, 2 insertions(+) -diff --git a/ostable b/ostable -index 3bb6819..d0ffdc7 100644 ---- a/ostable -+++ b/ostable -@@ -15,6 +15,7 @@ - uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi - uclibc-linux linux-uclibc linux[^-]*-uclibc - musleabihf-linux linux-musleabihf linux[^-]*-musleabihf -+musleabi-linux linux-musleabi linux[^-]*-musleabi - musl-linux linux-musl linux[^-]*-musl - gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf - gnueabi-linux linux-gnueabi linux[^-]*-gnueabi -diff --git a/triplettable b/triplettable -index 1213584..70d24c1 100644 ---- a/triplettable -+++ b/triplettable -@@ -6,6 +6,7 @@ - uclibceabi-linux-arm uclibc-linux-armel - uclibc-linux- uclibc-linux- - musleabihf-linux-arm musl-linux-armhf -+musleabi-linux-arm musl-linux-armel - musl-linux- musl-linux- - gnueabihf-linux-arm armhf - gnueabi-linux-arm armel +diff --git a/data/ostable b/data/ostable +index 99c1f889d..be6434271 100644 +--- a/data/ostable ++++ b/data/ostable +@@ -17,6 +17,7 @@ + eabi-uclibc-linux linux-uclibceabi linux[^-]*-uclibceabi + base-uclibc-linux linux-uclibc linux[^-]*-uclibc + eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf ++eabi-musl-linux linux-musleabi linux[^-]*-musleabi + base-musl-linux linux-musl linux[^-]*-musl + eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf + eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi +diff --git a/data/tupletable b/data/tupletable +index 5f500f6ca..28f00bfe6 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -8,6 +8,7 @@ + eabi-uclibc-linux-arm uclibc-linux-armel + base-uclibc-linux- uclibc-linux- + eabihf-musl-linux-arm musl-linux-armhf ++eabi-musl-linux-arm musl-linux-armel + base-musl-linux- musl-linux- + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf -- -2.6.4 +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch index 8bfaad14d..1b985df0f 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch @@ -23,18 +23,17 @@ Upstream-Status: Inappropriate [Configuration] 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c -index 655aa55..927f56f 100644 +index a92b58e..a3d1912 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c -@@ -447,7 +447,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, - snprintf(mtime, sizeof(mtime), "@%ld", timestamp); +@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, - execlp(TAR, "tar", "-cf", "-", "--format=gnu", -- "--mtime", mtime, "--clamp-mtime", -+ "--mtime", mtime, - "--null", "--no-unquote", - "--no-recursion", "-T", "-", NULL); - ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR); + command_init(&cmd, TAR, "tar -cf"); + command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu", +- "--mtime", mtime, "--clamp-mtime", NULL); ++ "--mtime", mtime, NULL); + /* Mode might become a positional argument, pass it before -T. */ + if (mode) + command_add_args(&cmd, "--mode", mode, NULL); -- -2.1.4 - +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch index dc69eb2d1..d165616a1 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch @@ -24,23 +24,25 @@ empty in configure script. Upstream-Status: Pending Signed-off-by: Krishnanjanappa, Jagadeesh +Signed-off-by: Aníbal Limón --- - triplettable | 1 + + data/tupletable | 1 + 1 file changed, 1 insertion(+) -diff --git a/triplettable b/triplettable -index abe4726..1e9c247 100644 ---- a/triplettable -+++ b/triplettable -@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf - gnueabi-linux-arm armel - gnuabin32-linux-mips64r6el mipsn32r6el - gnuabin32-linux-mips64r6 mipsn32r6 -+gnueabi-linux-armeb armeb - gnuabin32-linux-mips64el mipsn32el - gnuabin32-linux-mips64 mipsn32 - gnuabi64-linux-mips64r6el mips64r6el +diff --git a/data/tupletable b/data/tupletable +index b7802bec3..5f500f6ca 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -12,6 +12,7 @@ base-musl-linux- musl-linux- + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf + eabi-gnu-linux-arm armel ++eabi-gnu-linux-armeb armeb + abin32-gnu-linux-mips64r6el mipsn32r6el + abin32-gnu-linux-mips64r6 mipsn32r6 + abin32-gnu-linux-mips64el mipsn32el -- -2.1.4 +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch index cad4c0f0a..4e0d22acb 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch @@ -7,16 +7,23 @@ Upstream-Status: Pending Signed-off-by: Joe Slater +--- + scripts/Dpkg/Arch.pm | 3 --- + 1 file changed, 3 deletions(-) +diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm +index 1720847b8..6345ce3b9 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm -@@ -233,9 +233,6 @@ sub read_triplettable() - (my $dt = $debtriplet) =~ s//$_cpu/; +@@ -323,9 +323,6 @@ sub _load_tupletable() + (my $dt = $debtuple) =~ s//$_cpu/; (my $da = $debarch) =~ s//$_cpu/; -- next if exists $debarch_to_debtriplet{$da} -- or exists $debtriplet_to_debarch{$dt}; +- next if exists $debarch_to_debtuple{$da} +- or exists $debtuple_to_debarch{$dt}; - - $debarch_to_debtriplet{$da} = $dt; - $debtriplet_to_debarch{$dt} = $da; + $debarch_to_debtuple{$da} = $dt; + $debtuple_to_debarch{$dt} = $da; } +-- +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service index f0b0789e4..9a248ccb4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service @@ -8,7 +8,7 @@ Before=sysinit.target Type=oneshot EnvironmentFile=-@SYSCONFDIR@/default/postinst ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi" -ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service +ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable dpkg-configure.service StandardOutput=syslog RemainAfterExit=No diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch index d30c15018..a7f3cb8f4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -1,14 +1,22 @@ Upstream-Status: Inappropriate [disable feature] -diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am ---- dpkg-1.15.8.5-orig/Makefile.am 2010-10-08 12:27:15.042083703 +0800 -+++ dpkg-1.15.8.5/Makefile.am 2010-10-08 12:27:27.755148228 +0800 -@@ -12,8 +12,7 @@ - utils \ +--- + Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0da52cb16..a1f79e0a2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -13,8 +13,7 @@ SUBDIRS = \ $(MAYBE_DSELECT) \ scripts \ + t-func \ - po \ - man + po ACLOCAL_AMFLAGS = -I m4 + +-- +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb deleted file mode 100644 index 21385af87..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb +++ /dev/null @@ -1,20 +0,0 @@ -require dpkg.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \ - file://noman.patch \ - file://remove-tar-no-timestamp.patch \ - file://arch_pm.patch \ - file://dpkg-configure.service \ - file://add_armeb_triplet_entry.patch \ - file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \ - file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \ - file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ - file://0005-dpkg-compiler.m4-remove-Wvla.patch \ - file://0006-add-musleabi-to-known-target-tripets.patch \ - file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ - " -SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch " - -SRC_URI[md5sum] = "ccff17730c0964428fc186ded2f2f401" -SRC_URI[sha256sum] = "025524da41ba18b183ff11e388eb8686f7cc58ee835ed7d48bd159c46a8b6dc5" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb new file mode 100644 index 000000000..c0c59f141 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb @@ -0,0 +1,21 @@ +require dpkg.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "http://snapshot.debian.org/archive/debian/20170518T093838Z/pool/main/d/dpkg/dpkg_1.18.24.tar.xz \ + file://noman.patch \ + file://remove-tar-no-timestamp.patch \ + file://arch_pm.patch \ + file://dpkg-configure.service \ + file://add_armeb_triplet_entry.patch \ + file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \ + file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \ + file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ + file://0005-dpkg-compiler.m4-remove-Wvla.patch \ + file://0006-add-musleabi-to-known-target-tripets.patch \ + file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ + file://0001-dpkg-Support-muslx32-build.patch \ + " +SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch " + +SRC_URI[md5sum] = "02e8af8faf1e689228da806c3e8c6882" +SRC_URI[sha256sum] = "d853081d3e06bfd46a227056e591f094e42e78fa8a5793b0093bad30b710d7b4" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch deleted file mode 100644 index 1d1752025..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch +++ /dev/null @@ -1,255 +0,0 @@ -From bf9f3b6d5b10d19218b4ed904c12b22e36ec57dd Mon Sep 17 00:00:00 2001 -From: Theodore Ts'o -Date: Thu, 16 Feb 2017 22:02:35 -0500 -Subject: [PATCH] e2fsck: exit with exit status 0 if no errors were fixed - -Previously, e2fsck would exit with a status code of 1 even though the -only changes that it made to the file system were various -optimziations and not fixing file system corruption. Since the man -page states that an exit status of 1 means "file system errors -corrupted", fix e2fsck to return an exit status of 0. - -Upstream-Status: Backport - -Signed-off-by: Theodore Ts'o -Signed-off-by: Daniel Schultz ---- - e2fsck/e2fsck.conf.5.in | 7 +++++++ - e2fsck/journal.c | 1 + - e2fsck/problem.c | 8 +++++--- - e2fsck/problemP.h | 1 + - e2fsck/unix.c | 20 ++++++++++++++++---- - tests/f_collapse_extent_tree/expect.1 | 2 +- - tests/f_compress_extent_tree_level/expect.1 | 2 +- - tests/f_convert_bmap/expect.1 | 2 +- - tests/f_convert_bmap_and_extent/expect.1 | 2 +- - tests/f_extent_htree/expect.1 | 2 +- - tests/f_jnl_errno/expect.1 | 2 +- - tests/f_journal/expect.1 | 2 +- - tests/f_orphan/expect.1 | 2 +- - tests/f_orphan_extents_inode/expect.1 | 2 +- - tests/f_rehash_dir/expect.1 | 2 +- - tests/f_unsorted_EAs/expect.1 | 2 +- - 16 files changed, 41 insertions(+), 18 deletions(-) - -diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in -index 1848bdb..0bfc76a 100644 ---- a/e2fsck/e2fsck.conf.5.in -+++ b/e2fsck/e2fsck.conf.5.in -@@ -303,6 +303,13 @@ of 'should this problem be fixed?'. The - option even overrides the - .B -y - option given on the command-line (just for the specific problem, of course). -+.TP -+.I not_a_fix -+This boolean option, it set to true, marks the problem as -+one where if the user gives permission to make the requested change, -+it does not mean that the file system had a problem which has since -+been fixed. This is used for requests to optimize the file system's -+data structure, such as pruning an extent tree. - @TDB_MAN_COMMENT@.SH THE [scratch_files] STANZA - @TDB_MAN_COMMENT@The following relations are defined in the - @TDB_MAN_COMMENT@.I [scratch_files] -diff --git a/e2fsck/journal.c b/e2fsck/journal.c -index 46fe7b4..c4f58f1 100644 ---- a/e2fsck/journal.c -+++ b/e2fsck/journal.c -@@ -572,6 +572,7 @@ static void clear_v2_journal_fields(journal_t *journal) - if (!fix_problem(ctx, PR_0_CLEAR_V2_JOURNAL, &pctx)) - return; - -+ ctx->flags |= E2F_FLAG_PROBLEMS_FIXED; - memset(((char *) journal->j_superblock) + V1_SB_SIZE, 0, - ctx->fs->blocksize-V1_SB_SIZE); - mark_buffer_dirty(journal->j_sb_buffer); -diff --git a/e2fsck/problem.c b/e2fsck/problem.c -index 34a671e..4b25069 100644 ---- a/e2fsck/problem.c -+++ b/e2fsck/problem.c -@@ -1276,12 +1276,12 @@ static struct e2fsck_problem problem_table[] = { - /* Inode extent tree could be shorter */ - { PR_1E_CAN_COLLAPSE_EXTENT_TREE, - N_("@i %i @x tree (at level %b) could be shorter. "), -- PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK }, -+ PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX }, - - /* Inode extent tree could be narrower */ - { PR_1E_CAN_NARROW_EXTENT_TREE, - N_("@i %i @x tree (at level %b) could be narrower. "), -- PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK }, -+ PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX }, - - /* Pass 2 errors */ - -@@ -2166,6 +2166,7 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx) - reconfigure_bool(ctx, ptr, key, PR_NO_NOMSG, "no_nomsg"); - reconfigure_bool(ctx, ptr, key, PR_PREEN_NOHDR, "preen_noheader"); - reconfigure_bool(ctx, ptr, key, PR_FORCE_NO, "force_no"); -+ reconfigure_bool(ctx, ptr, key, PR_NOT_A_FIX, "not_a_fix"); - profile_get_integer(ctx->profile, "options", - "max_count_problems", 0, 0, - &ptr->max_count); -@@ -2283,7 +2284,8 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx) - if (ptr->flags & PR_AFTER_CODE) - answer = fix_problem(ctx, ptr->second_code, pctx); - -- if (answer && (ptr->prompt != PROMPT_NONE)) -+ if (answer && (ptr->prompt != PROMPT_NONE) && -+ !(ptr->flags & PR_NOT_A_FIX)) - ctx->flags |= E2F_FLAG_PROBLEMS_FIXED; - - return answer; -diff --git a/e2fsck/problemP.h b/e2fsck/problemP.h -index 7944cd6..63bb8df 100644 ---- a/e2fsck/problemP.h -+++ b/e2fsck/problemP.h -@@ -44,3 +44,4 @@ struct latch_descr { - #define PR_CONFIG 0x080000 /* This problem has been customized - from the config file */ - #define PR_FORCE_NO 0x100000 /* Force the answer to be no */ -+#define PR_NOT_A_FIX 0x200000 /* Yes doesn't mean a problem was fixed */ -diff --git a/e2fsck/unix.c b/e2fsck/unix.c -index eb9f311..9e4d31a 100644 ---- a/e2fsck/unix.c -+++ b/e2fsck/unix.c -@@ -1901,11 +1901,23 @@ no_journal: - fix_problem(ctx, PR_6_IO_FLUSH, &pctx); - - if (was_changed) { -- exit_value |= FSCK_NONDESTRUCT; -- if (!(ctx->options & E2F_OPT_PREEN)) -- log_out(ctx, _("\n%s: ***** FILE SYSTEM WAS " -- "MODIFIED *****\n"), -+ int fs_fixed = (ctx->flags & E2F_FLAG_PROBLEMS_FIXED); -+ -+ if (fs_fixed) -+ exit_value |= FSCK_NONDESTRUCT; -+ if (!(ctx->options & E2F_OPT_PREEN)) { -+#if 0 /* Do this later; it breaks too many tests' golden outputs */ -+ log_out(ctx, fs_fixed ? -+ _("\n%s: ***** FILE SYSTEM ERRORS " -+ "CORRECTED *****\n") : -+ _("%s: File system was modified.\n"), - ctx->device_name); -+#else -+ log_out(ctx, -+ _("\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n"), -+ ctx->device_name); -+#endif -+ } - if (ctx->mount_flags & EXT2_MF_ISROOT) { - log_out(ctx, _("%s: ***** REBOOT SYSTEM *****\n"), - ctx->device_name); -diff --git a/tests/f_collapse_extent_tree/expect.1 b/tests/f_collapse_extent_tree/expect.1 -index e2eb65e..8165a58 100644 ---- a/tests/f_collapse_extent_tree/expect.1 -+++ b/tests/f_collapse_extent_tree/expect.1 -@@ -13,4 +13,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_compress_extent_tree_level/expect.1 b/tests/f_compress_extent_tree_level/expect.1 -index a359c99..dd33f63 100644 ---- a/tests/f_compress_extent_tree_level/expect.1 -+++ b/tests/f_compress_extent_tree_level/expect.1 -@@ -20,4 +20,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/128 files (8.3% non-contiguous), 26/512 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_convert_bmap/expect.1 b/tests/f_convert_bmap/expect.1 -index 7d2ca86..c387962 100644 ---- a/tests/f_convert_bmap/expect.1 -+++ b/tests/f_convert_bmap/expect.1 -@@ -23,4 +23,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/128 files (8.3% non-contiguous), 570/2048 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_convert_bmap_and_extent/expect.1 b/tests/f_convert_bmap_and_extent/expect.1 -index 7af91aa..c86c571 100644 ---- a/tests/f_convert_bmap_and_extent/expect.1 -+++ b/tests/f_convert_bmap_and_extent/expect.1 -@@ -30,4 +30,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 13/128 files (15.4% non-contiguous), 574/2048 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_extent_htree/expect.1 b/tests/f_extent_htree/expect.1 -index 223ca69..ea48405 100644 ---- a/tests/f_extent_htree/expect.1 -+++ b/tests/f_extent_htree/expect.1 -@@ -26,4 +26,4 @@ test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - 0 sockets - ------------ - 343 files --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_jnl_errno/expect.1 b/tests/f_jnl_errno/expect.1 -index c572951..4134234 100644 ---- a/tests/f_jnl_errno/expect.1 -+++ b/tests/f_jnl_errno/expect.1 -@@ -6,4 +6,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_journal/expect.1 b/tests/f_journal/expect.1 -index a202c80..0a18654 100644 ---- a/tests/f_journal/expect.1 -+++ b/tests/f_journal/expect.1 -@@ -59,4 +59,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 53/2048 files (1.9% non-contiguous), 1409/8192 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_orphan/expect.1 b/tests/f_orphan/expect.1 -index eddc1f8..087ebee 100644 ---- a/tests/f_orphan/expect.1 -+++ b/tests/f_orphan/expect.1 -@@ -11,4 +11,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/2048 files (0.0% non-contiguous), 1303/8192 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_orphan_extents_inode/expect.1 b/tests/f_orphan_extents_inode/expect.1 -index 2eaab78..5d713b3 100644 ---- a/tests/f_orphan_extents_inode/expect.1 -+++ b/tests/f_orphan_extents_inode/expect.1 -@@ -7,4 +7,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_rehash_dir/expect.1 b/tests/f_rehash_dir/expect.1 -index 6076765..c1449ba 100644 ---- a/tests/f_rehash_dir/expect.1 -+++ b/tests/f_rehash_dir/expect.1 -@@ -7,4 +7,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 105/2048 files (2.9% non-contiguous), 336/512 blocks --Exit status is 1 -+Exit status is 0 -diff --git a/tests/f_unsorted_EAs/expect.1 b/tests/f_unsorted_EAs/expect.1 -index 7d588d7..64b9045 100644 ---- a/tests/f_unsorted_EAs/expect.1 -+++ b/tests/f_unsorted_EAs/expect.1 -@@ -8,4 +8,4 @@ Pass 5: Checking group summary information - - test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** - test_filesys: 12/2048 files (0.0% non-contiguous), 1294/2048 blocks --Exit status is 1 -+Exit status is 0 --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch new file mode 100644 index 000000000..fc4a54098 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch @@ -0,0 +1,41 @@ +From f6d188580c2c9599319076fee22f2424652c711c Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Wed, 13 Sep 2017 19:55:35 -0700 +Subject: [PATCH] misc/create_inode.c: set dir's mode correctly + +The dir's mode has been set by ext2fs_mkdir() with umask, so +reset it to the source's mode in set_inode_extra(). + +Fixed when source dir's mode is 521, but tarball would be 721, this was +incorrect. + +Upstream-Status: Submitted + +Signed-off-by: Robert Yang +--- + misc/create_inode.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/misc/create_inode.c b/misc/create_inode.c +index 8ce3faf..50fbaa8 100644 +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -116,7 +116,14 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino, + + inode.i_uid = st->st_uid; + inode.i_gid = st->st_gid; +- inode.i_mode |= st->st_mode; ++ /* ++ * The dir's mode has been set by ext2fs_mkdir() with umask, so ++ * reset it to the source's mode ++ */ ++ if S_ISDIR(st->st_mode) ++ inode.i_mode = LINUX_S_IFDIR | st->st_mode; ++ else ++ inode.i_mode |= st->st_mode; + inode.i_atime = st->st_atime; + inode.i_mtime = st->st_mtime; + inode.i_ctime = st->st_ctime; +-- +2.10.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch deleted file mode 100644 index abbf2bad2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 30ef41f68703b6a16027cc8787118b87f1462dff Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Mon, 28 Mar 2016 20:31:33 -0400 -Subject: [PATCH e2fsprogs] include sys/sysmacros.h as needed - -The minor/major/makedev macros are not entirely standard. glibc has had -the definitions in sys/sysmacros.h since the start, and wants to move away -from always defining them implicitly via sys/types.h (as this pollutes the -namespace in violation of POSIX). Other C libraries have already dropped -them. Since the configure script already checks for this header, use that -to pull in the header in files that use these macros. - -Signed-off-by: Mike Frysinger - -Taken from gentoo portage. - -Upstream-Status: Pending - ---- - debugfs/debugfs.c | 3 +++ - lib/blkid/devname.c | 3 +++ - lib/blkid/devno.c | 3 +++ - lib/ext2fs/finddev.c | 3 +++ - lib/ext2fs/ismounted.c | 3 +++ - misc/create_inode.c | 4 ++++ - misc/mk_hugefiles.c | 3 +++ - 7 files changed, 22 insertions(+) - -diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c -index ba8be40..7d481bc 100644 ---- a/debugfs/debugfs.c -+++ b/debugfs/debugfs.c -@@ -26,6 +26,9 @@ extern char *optarg; - #include - #endif - #include -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - - #include "debugfs.h" - #include "uuid/uuid.h" -diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c -index 3e2efa9..671e781 100644 ---- a/lib/blkid/devname.c -+++ b/lib/blkid/devname.c -@@ -36,6 +36,9 @@ - #if HAVE_SYS_MKDEV_H - #include - #endif -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - #include - - #include "blkidP.h" -diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c -index 479d977..61e6fc7 100644 ---- a/lib/blkid/devno.c -+++ b/lib/blkid/devno.c -@@ -31,6 +31,9 @@ - #if HAVE_SYS_MKDEV_H - #include - #endif -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - - #include "blkidP.h" - -diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c -index 311608d..62fa0db 100644 ---- a/lib/ext2fs/finddev.c -+++ b/lib/ext2fs/finddev.c -@@ -31,6 +31,9 @@ - #if HAVE_SYS_MKDEV_H - #include - #endif -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - - #include "ext2_fs.h" - #include "ext2fs.h" -diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c -index e0f69dd..7404996 100644 ---- a/lib/ext2fs/ismounted.c -+++ b/lib/ext2fs/ismounted.c -@@ -49,6 +49,9 @@ - #if HAVE_SYS_TYPES_H - #include - #endif -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - - #include "ext2_fs.h" - #include "ext2fs.h" -diff --git a/misc/create_inode.c b/misc/create_inode.c -index 4dbd8e5..98aeb41 100644 ---- a/misc/create_inode.c -+++ b/misc/create_inode.c -@@ -22,6 +22,10 @@ - #include - #endif - #include -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif -+ - #include - #include - #include -diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c -index 71a15c5..00e95cd 100644 ---- a/misc/mk_hugefiles.c -+++ b/misc/mk_hugefiles.c -@@ -35,6 +35,9 @@ extern int optind; - #include - #include - #include -+#ifdef HAVE_SYS_SYSMACROS_H -+#include -+#endif - #include - #include - #include --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch index 879d93625..7df096763 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch @@ -1,3 +1,5 @@ +Upstream-Status: Inappropriate + diff --git a/tests/Makefile.in b/tests/Makefile.in index c130f4a..d2ade03 100644 --- a/tests/Makefile.in diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch new file mode 100644 index 000000000..8e5d1d341 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch @@ -0,0 +1,21 @@ + +Suppport for binary reproducibility. +When compressing, do not save the original file name and time stamp. + +Upstream-Status: Submitted [Theodore Ts'o tytso@mit.edu (maintainer)] + +Signed-off-by: Juro Bystricky + +diff --git a/doc/Makefile.in b/doc/Makefile.in +index 9cb584c..0bee4e4 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -28,7 +28,7 @@ install-doc-libs: libext2fs.info libext2fs.dvi + $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \ + done + $(E) " GZIP $(infodir)/libext2fs.info*" +- -$(Q) gzip -9 $(DESTDIR)$(infodir)/libext2fs.info* ++ -$(Q) gzip -9 -n $(DESTDIR)$(infodir)/libext2fs.info* + + uninstall-doc-libs: + $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info* diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest index e02fc7f2b..ef10b08bc 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest @@ -1,11 +1,10 @@ #!/bin/sh cd ./test -./test_script &>../test.log -if [ $? -eq 0 ] -then - echo "PASS: e2fsprogs" - rm ../test.log -else - echo "FAIL: e2fsprogs" -fi +./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /' +rm -rf /var/volatile/tmp/*e2fsprogs* +rm -f tmp-* +rm -f *.tmp +rm -f *.ok +rm -f *.failed +rm -f *.log diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb deleted file mode 100644 index 5216c7027..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb +++ /dev/null @@ -1,112 +0,0 @@ -require e2fsprogs.inc - -SRC_URI += "file://acinclude.m4 \ - file://remove.ldconfig.call.patch \ - file://quiet-debugfs.patch \ - file://run-ptest \ - file://ptest.patch \ - file://mkdir.patch \ - file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ - file://e2fsprogs-1.43-sysmacros.patch \ - file://mkdir_p.patch \ - file://0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch \ -" - -SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch" - -SRCREV = "3d66c4b20f09f923078c1e6eb9b549865b549674" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)$" - -EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ - --enable-elf-shlibs --disable-libuuid --disable-uuidd \ - --disable-libblkid --enable-verbose-makecmds" - -EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' - -do_configure_prepend () { - cp ${WORKDIR}/acinclude.m4 ${S}/ -} - -do_install () { - oe_runmake 'DESTDIR=${D}' install - oe_runmake 'DESTDIR=${D}' install-libs - # We use blkid from util-linux now so remove from here - rm -f ${D}${base_libdir}/libblkid* - rm -rf ${D}${includedir}/blkid - rm -f ${D}${base_libdir}/pkgconfig/blkid.pc - rm -f ${D}${base_sbindir}/blkid - rm -f ${D}${base_sbindir}/fsck - rm -f ${D}${base_sbindir}/findfs - - # e2initrd_helper and the pkgconfig files belong in libdir - if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then - install -d ${D}${libdir} - mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} - mv ${D}${base_libdir}/pkgconfig ${D}${libdir} - fi - - oe_multilib_header ext2fs/ext2_types.h - install -d ${D}${base_bindir} - mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs - - install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ - - # Clean host path (build directory) in compile_et, mk_cmds - sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et - sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds -} - -# Need to find the right mke2fs.conf file -e2fsprogs_conf_fixup () { - for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do - create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf - done -} - -do_install_append_class-native() { - e2fsprogs_conf_fixup -} - -do_install_append_class-nativesdk() { - e2fsprogs_conf_fixup -} - -RDEPENDS_e2fsprogs = "e2fsprogs-badblocks" -RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" - -PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs" -PACKAGES =+ "libcomerr libss libe2p libext2fs" - -FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" -FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" -FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" -FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label" -FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks" -FILES_libcomerr = "${base_libdir}/libcom_err.so.*" -FILES_libss = "${base_libdir}/libss.so.*" -FILES_libe2p = "${base_libdir}/libe2p.so.*" -FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" -FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds" - -ALTERNATIVE_${PN} = "chattr" -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" -ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" - -ALTERNATIVE_${PN}-doc = "fsck.8" -ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" - -RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash" - -do_compile_ptest() { - oe_runmake -C ${B}/tests -} - -do_install_ptest() { - cp -a ${B}/tests ${D}${PTEST_PATH}/test - cp -a ${S}/tests/* ${D}${PTEST_PATH}/test - sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect* -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb new file mode 100644 index 000000000..00093cc20 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb @@ -0,0 +1,117 @@ +require e2fsprogs.inc + +SRC_URI += "file://acinclude.m4 \ + file://remove.ldconfig.call.patch \ + file://quiet-debugfs.patch \ + file://run-ptest \ + file://ptest.patch \ + file://mkdir.patch \ + file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ + file://mkdir_p.patch \ + file://reproducible-doc.patch \ + file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \ +" + +SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch" + +SRCREV = "2a13c84b513aa094d1cda727e92d35a89dd777da" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)$" + +EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ + --enable-elf-shlibs --disable-libuuid --disable-uuidd \ + --disable-libblkid --enable-verbose-makecmds" + +EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' + +do_configure_prepend () { + cp ${WORKDIR}/acinclude.m4 ${S}/ +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + oe_runmake 'DESTDIR=${D}' install-libs + # We use blkid from util-linux now so remove from here + rm -f ${D}${base_libdir}/libblkid* + rm -rf ${D}${includedir}/blkid + rm -f ${D}${base_libdir}/pkgconfig/blkid.pc + rm -f ${D}${base_sbindir}/blkid + rm -f ${D}${base_sbindir}/fsck + rm -f ${D}${base_sbindir}/findfs + + # e2initrd_helper and the pkgconfig files belong in libdir + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + install -d ${D}${libdir} + mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} + mv ${D}${base_libdir}/pkgconfig ${D}${libdir} + fi + + oe_multilib_header ext2fs/ext2_types.h + install -d ${D}${base_bindir} + mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs + + install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ + + # Clean host path (build directory) in compile_et, mk_cmds + sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et + sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds +} + +# Need to find the right mke2fs.conf file +e2fsprogs_conf_fixup () { + for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do + create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf + done +} + +do_install_append_class-native() { + e2fsprogs_conf_fixup +} + +do_install_append_class-nativesdk() { + e2fsprogs_conf_fixup +} + +RDEPENDS_e2fsprogs = "e2fsprogs-badblocks" +RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" + +PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs" +PACKAGES =+ "libcomerr libss libe2p libext2fs" + +FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" +FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" +FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" +FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label" +FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks" +FILES_libcomerr = "${base_libdir}/libcom_err.so.*" +FILES_libss = "${base_libdir}/libss.so.*" +FILES_libe2p = "${base_libdir}/libe2p.so.*" +FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" +FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds" + +ALTERNATIVE_${PN} = "chattr" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" +ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" + +ALTERNATIVE_${PN}-doc = "fsck.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" + +RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash" + +do_compile_ptest() { + oe_runmake -C ${B}/tests +} + +do_install_ptest() { + cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test + cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test + sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect* + + # Remove various files + find "${D}${PTEST_PATH}" -type f \ + \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\ + -exec rm -f {} + +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch deleted file mode 100644 index 020ffa141..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch +++ /dev/null @@ -1,1051 +0,0 @@ -From 054fedda5ab9b84160d40d90cb967f2f5822b889 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 31 Dec 2015 06:35:34 +0000 -Subject: [PATCH] build: Provide alternatives for glibc assumptions helps - compiling it on musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Rebase to 0.68 -Signed-off-by: Hongxu Jia ---- - Makefile.am | 2 +- - lib/color.c | 3 ++- - lib/crc32_file.c | 1 + - lib/fixedsizehash.h | 1 - - lib/system.h | 10 ++++++++++ - lib/xmalloc.c | 2 +- - libasm/asm_end.c | 2 +- - libasm/asm_newscn.c | 2 +- - libcpu/i386_gendis.c | 2 +- - libcpu/i386_lex.c | 2 +- - libcpu/i386_parse.c | 2 +- - libdw/Makefile.am | 4 +++- - libdw/libdw_alloc.c | 2 +- - libdwfl/dwfl_build_id_find_elf.c | 3 ++- - libdwfl/dwfl_error.c | 4 +++- - libdwfl/dwfl_module_getdwarf.c | 1 + - libdwfl/find-debuginfo.c | 2 +- - libdwfl/libdwfl_crc32_file.c | 10 ++++++++++ - libdwfl/linux-kernel-modules.c | 1 + - libebl/eblopenbackend.c | 2 +- - libelf/elf.h | 8 ++++++-- - libelf/libelf.h | 1 + - libelf/libelfP.h | 1 + - src/addr2line.c | 2 +- - src/ar.c | 2 +- - src/arlib.c | 2 +- - src/arlib2.c | 2 +- - src/elfcmp.c | 2 +- - src/elflint.c | 2 +- - src/findtextrel.c | 2 +- - src/nm.c | 2 +- - src/objdump.c | 2 +- - src/ranlib.c | 2 +- - src/readelf.c | 2 +- - src/size.c | 2 +- - src/stack.c | 2 +- - src/strings.c | 2 +- - src/strip.c | 2 +- - src/unstrip.c | 2 +- - tests/addrscopes.c | 2 +- - tests/allregs.c | 2 +- - tests/backtrace-data.c | 2 +- - tests/backtrace-dwarf.c | 2 +- - tests/backtrace.c | 2 +- - tests/buildid.c | 2 +- - tests/debugaltlink.c | 2 +- - tests/debuglink.c | 2 +- - tests/deleted.c | 2 +- - tests/dwfl-addr-sect.c | 2 +- - tests/dwfl-bug-addr-overflow.c | 2 +- - tests/dwfl-bug-fd-leak.c | 2 +- - tests/dwfl-bug-getmodules.c | 2 +- - tests/dwfl-report-elf-align.c | 2 +- - tests/dwfllines.c | 2 +- - tests/dwflmodtest.c | 2 +- - tests/dwflsyms.c | 2 +- - tests/early-offscn.c | 2 +- - tests/ecp.c | 2 +- - tests/find-prologues.c | 2 +- - tests/funcretval.c | 2 +- - tests/funcscopes.c | 2 +- - tests/getsrc_die.c | 2 +- - tests/line2addr.c | 2 +- - tests/low_high_pc.c | 2 +- - tests/md5-sha1-test.c | 2 +- - tests/rdwrmmap.c | 2 +- - tests/saridx.c | 2 +- - tests/sectiondump.c | 2 +- - tests/varlocs.c | 2 +- - tests/vdsosyms.c | 2 +- - 70 files changed, 98 insertions(+), 64 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 2ff444e..41f77df 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h - - # Add doc back when we have some real content. - SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ -- backends src po tests -+ backends po tests - - EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ - COPYING COPYING-GPLV2 COPYING-LGPLV3 -diff --git a/lib/color.c b/lib/color.c -index fde2d9d..73292ac 100644 ---- a/lib/color.c -+++ b/lib/color.c -@@ -32,12 +32,13 @@ - #endif - - #include --#include -+#include - #include - #include - #include - #include - #include "libeu.h" -+#include "system.h" - - - /* Prototype for option handler. */ -diff --git a/lib/crc32_file.c b/lib/crc32_file.c -index a8434d4..57e4298 100644 ---- a/lib/crc32_file.c -+++ b/lib/crc32_file.c -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include "system.h" - - int - crc32_file (int fd, uint32_t *resp) -diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h -index dac2a5f..43016fc 100644 ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #include - -diff --git a/lib/system.h b/lib/system.h -index ccd99d6..0e93e60 100644 ---- a/lib/system.h -+++ b/lib/system.h -@@ -55,6 +55,16 @@ - #else - # error "Unknown byte order" - #endif -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ -+#define error(status, errno, ...) err(status, __VA_ARGS__) - - #ifndef MAX - #define MAX(m, n) ((m) < (n) ? (n) : (m)) -diff --git a/lib/xmalloc.c b/lib/xmalloc.c -index 0cde384..217b054 100644 ---- a/lib/xmalloc.c -+++ b/lib/xmalloc.c -@@ -30,7 +30,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/libasm/asm_end.c b/libasm/asm_end.c -index 191a535..bf5ab06 100644 ---- a/libasm/asm_end.c -+++ b/libasm/asm_end.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c -index ddbb25d..74a598d 100644 ---- a/libasm/asm_newscn.c -+++ b/libasm/asm_newscn.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c -index aae5eae..6d76016 100644 ---- a/libcpu/i386_gendis.c -+++ b/libcpu/i386_gendis.c -@@ -31,7 +31,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c -index b670608..b842c25 100644 ---- a/libcpu/i386_lex.c -+++ b/libcpu/i386_lex.c -@@ -592,7 +592,7 @@ char *i386_text; - #endif - - #include --#include -+#include - #include - - #include -diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c -index 724addf..5b67802 100644 ---- a/libcpu/i386_parse.c -+++ b/libcpu/i386_parse.c -@@ -107,7 +107,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/libdw/Makefile.am b/libdw/Makefile.am -index 082d96c..51cbea0 100644 ---- a/libdw/Makefile.am -+++ b/libdw/Makefile.am -@@ -102,6 +102,8 @@ endif - libdw_pic_a_SOURCES = - am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) - -+fts_LDADD = -lfts -+ - libdw_so_SOURCES = - libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ -@@ -112,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ - -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ - -Wl,--version-script,$<,--no-undefined \ - -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ -- -ldl -lz $(argp_LDADD) $(zip_LIBS) -+ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD) - @$(textrel_check) - $(AM_V_at)ln -fs $@ $@.$(VERSION) - -diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c -index 28a8cf6..29aeb3f 100644 ---- a/libdw/libdw_alloc.c -+++ b/libdw/libdw_alloc.c -@@ -31,7 +31,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include "libdwP.h" -diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c -index 903e193..b00d10c 100644 ---- a/libdwfl/dwfl_build_id_find_elf.c -+++ b/libdwfl/dwfl_build_id_find_elf.c -@@ -27,6 +27,7 @@ - not, see . */ - - #include "libdwflP.h" -+#include "system.h" - #include - #include - #include -@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, - { - if (*file_name != NULL) - free (*file_name); -- *file_name = canonicalize_file_name (name); -+ *file_name = realpath (name, NULL); - if (*file_name == NULL) - { - *file_name = name; -diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c -index 7bcf61c..c345797 100644 ---- a/libdwfl/dwfl_error.c -+++ b/libdwfl/dwfl_error.c -@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) - const char * - dwfl_errmsg (int error) - { -+ static __thread char s[64] = ""; - if (error == 0 || error == -1) - { - int last_error = global_error; -@@ -154,7 +155,8 @@ dwfl_errmsg (int error) - switch (error &~ 0xffff) - { - case OTHER_ERROR (ERRNO): -- return strerror_r (error & 0xffff, "bad", 0); -+ strerror_r (error & 0xffff, s, sizeof(s)); -+ return s; - case OTHER_ERROR (LIBELF): - return elf_errmsg (error & 0xffff); - case OTHER_ERROR (LIBDW): -diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c -index 0e8810b..82ad665 100644 ---- a/libdwfl/dwfl_module_getdwarf.c -+++ b/libdwfl/dwfl_module_getdwarf.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include "system.h" - #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ - #include "../libelf/libelfP.h" - -diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c -index 80515db..80b0148 100644 ---- a/libdwfl/find-debuginfo.c -+++ b/libdwfl/find-debuginfo.c -@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, - /* If FILE_NAME is a symlink, the debug file might be associated - with the symlink target name instead. */ - -- char *canon = canonicalize_file_name (file_name); -+ char *canon = realpath (file_name, NULL); - if (canon != NULL && strcmp (file_name, canon)) - fd = find_debuginfo_in_path (mod, canon, - debuglink_file, debuglink_crc, -diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c -index 6b6b7d3..debc4a4 100644 ---- a/libdwfl/libdwfl_crc32_file.c -+++ b/libdwfl/libdwfl_crc32_file.c -@@ -31,6 +31,16 @@ - - #define crc32_file attribute_hidden __libdwfl_crc32_file - #define crc32 __libdwfl_crc32 -+ -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ - #define LIB_SYSTEM_H 1 - #include - #include "../lib/crc32_file.c" -diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c -index 9cd8ea9..4dbf4c5 100644 ---- a/libdwfl/linux-kernel-modules.c -+++ b/libdwfl/linux-kernel-modules.c -@@ -36,6 +36,7 @@ - #include - - #include "libdwflP.h" -+#include "system.h" - #include - #include - #include -diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c -index 34d439a..56d2345 100644 ---- a/libebl/eblopenbackend.c -+++ b/libebl/eblopenbackend.c -@@ -32,7 +32,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -diff --git a/libelf/elf.h b/libelf/elf.h -index 74654d6..81eee8b 100644 ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -21,7 +21,9 @@ - - #include - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /* Standard ELF types. */ - -@@ -3704,6 +3706,8 @@ enum - #define R_BPF_NONE 0 /* No reloc */ - #define R_BPF_MAP_FD 1 /* Map fd to pointer */ - --__END_DECLS -+#ifdef __cplusplus -+} -+#endif - - #endif /* elf.h */ -diff --git a/libelf/libelf.h b/libelf/libelf.h -index c0d6389..38a68fd 100644 ---- a/libelf/libelf.h -+++ b/libelf/libelf.h -@@ -29,6 +29,7 @@ - #ifndef _LIBELF_H - #define _LIBELF_H 1 - -+#include - #include - #include - -diff --git a/libelf/libelfP.h b/libelf/libelfP.h -index 4459982..1296f20 100644 ---- a/libelf/libelfP.h -+++ b/libelf/libelfP.h -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - #include - #include -diff --git a/src/addr2line.c b/src/addr2line.c -index 0222088..cd6a9a6 100644 ---- a/src/addr2line.c -+++ b/src/addr2line.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/ar.c b/src/ar.c -index f2f322b..6e70031 100644 ---- a/src/ar.c -+++ b/src/ar.c -@@ -22,7 +22,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/arlib.c b/src/arlib.c -index e0839aa..1143658 100644 ---- a/src/arlib.c -+++ b/src/arlib.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/arlib2.c b/src/arlib2.c -index 553fc57..46443d0 100644 ---- a/src/arlib2.c -+++ b/src/arlib2.c -@@ -20,7 +20,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/src/elfcmp.c b/src/elfcmp.c -index 401ab31..873d253 100644 ---- a/src/elfcmp.c -+++ b/src/elfcmp.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/elflint.c b/src/elflint.c -index 7d3f227..074d21c 100644 ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/findtextrel.c b/src/findtextrel.c -index dc41502..325888c 100644 ---- a/src/findtextrel.c -+++ b/src/findtextrel.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/nm.c b/src/nm.c -index c54e96f..9e031d9 100644 ---- a/src/nm.c -+++ b/src/nm.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/objdump.c b/src/objdump.c -index fff4b81..4b1f966 100644 ---- a/src/objdump.c -+++ b/src/objdump.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/ranlib.c b/src/ranlib.c -index 41a3bcf..0c7da2c 100644 ---- a/src/ranlib.c -+++ b/src/ranlib.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/readelf.c b/src/readelf.c -index d18a4b7..a6cfb35 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/size.c b/src/size.c -index de0d791..4639d42 100644 ---- a/src/size.c -+++ b/src/size.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/stack.c b/src/stack.c -index a5a7beb..4c075bc 100644 ---- a/src/stack.c -+++ b/src/stack.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/strings.c b/src/strings.c -index 49aab8b..09d5b1c 100644 ---- a/src/strings.c -+++ b/src/strings.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/strip.c b/src/strip.c -index a875ddf..fd76f7f 100644 ---- a/src/strip.c -+++ b/src/strip.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/unstrip.c b/src/unstrip.c -index d838ae9..0108272 100644 ---- a/src/unstrip.c -+++ b/src/unstrip.c -@@ -31,7 +31,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/addrscopes.c b/tests/addrscopes.c -index 791569f..54f4311 100644 ---- a/tests/addrscopes.c -+++ b/tests/addrscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - -diff --git a/tests/allregs.c b/tests/allregs.c -index 286f7e3..c9de089 100644 ---- a/tests/allregs.c -+++ b/tests/allregs.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c -index b7158da..354fa6a 100644 ---- a/tests/backtrace-data.c -+++ b/tests/backtrace-data.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #if defined(__x86_64__) && defined(__linux__) -diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c -index a644c8a..b8cbe27 100644 ---- a/tests/backtrace-dwarf.c -+++ b/tests/backtrace-dwarf.c -@@ -22,7 +22,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/backtrace.c b/tests/backtrace.c -index 1ff6353..47e3f7b 100644 ---- a/tests/backtrace.c -+++ b/tests/backtrace.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #ifdef __linux__ -diff --git a/tests/buildid.c b/tests/buildid.c -index 87c1877..2953e6b 100644 ---- a/tests/buildid.c -+++ b/tests/buildid.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(elf) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c -index 6d97d50..ee7e559 100644 ---- a/tests/debugaltlink.c -+++ b/tests/debugaltlink.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(dw) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/debuglink.c b/tests/debuglink.c -index 935d102..741cb81 100644 ---- a/tests/debuglink.c -+++ b/tests/debuglink.c -@@ -21,7 +21,7 @@ - #include - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/deleted.c b/tests/deleted.c -index 6be35bc..0190711 100644 ---- a/tests/deleted.c -+++ b/tests/deleted.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #ifdef __linux__ - #include -diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c -index 21e470a..1ea1e3b 100644 ---- a/tests/dwfl-addr-sect.c -+++ b/tests/dwfl-addr-sect.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c -index aa8030e..02c8bef 100644 ---- a/tests/dwfl-bug-addr-overflow.c -+++ b/tests/dwfl-bug-addr-overflow.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include ELFUTILS_HEADER(dwfl) - -diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c -index 689cdd7..5973da3 100644 ---- a/tests/dwfl-bug-fd-leak.c -+++ b/tests/dwfl-bug-fd-leak.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c -index 1ee989f..fd62e65 100644 ---- a/tests/dwfl-bug-getmodules.c -+++ b/tests/dwfl-bug-getmodules.c -@@ -18,7 +18,7 @@ - #include - #include ELFUTILS_HEADER(dwfl) - --#include -+#include - - static const Dwfl_Callbacks callbacks = - { -diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c -index a4e97d3..f471587 100644 ---- a/tests/dwfl-report-elf-align.c -+++ b/tests/dwfl-report-elf-align.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/dwfllines.c b/tests/dwfllines.c -index 90379dd..cbdf6c4 100644 ---- a/tests/dwfllines.c -+++ b/tests/dwfllines.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - - int - main (int argc, char *argv[]) -diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c -index 0027f96..e68d3bc 100644 ---- a/tests/dwflmodtest.c -+++ b/tests/dwflmodtest.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c -index 49ac334..cf07830 100644 ---- a/tests/dwflsyms.c -+++ b/tests/dwflsyms.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - static const char * -diff --git a/tests/early-offscn.c b/tests/early-offscn.c -index 924cb9e..6f60d5a 100644 ---- a/tests/early-offscn.c -+++ b/tests/early-offscn.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/ecp.c b/tests/ecp.c -index 38a6859..743cea5 100644 ---- a/tests/ecp.c -+++ b/tests/ecp.c -@@ -20,7 +20,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/find-prologues.c b/tests/find-prologues.c -index ba8ae37..76f5f04 100644 ---- a/tests/find-prologues.c -+++ b/tests/find-prologues.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/funcretval.c b/tests/funcretval.c -index 8d19d11..c8aaa93 100644 ---- a/tests/funcretval.c -+++ b/tests/funcretval.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/funcscopes.c b/tests/funcscopes.c -index 9c90185..dbccb89 100644 ---- a/tests/funcscopes.c -+++ b/tests/funcscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c -index 055aede..9c394dd 100644 ---- a/tests/getsrc_die.c -+++ b/tests/getsrc_die.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/line2addr.c b/tests/line2addr.c -index e0d65d3..9bf0023 100644 ---- a/tests/line2addr.c -+++ b/tests/line2addr.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - - - static void -diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c -index d0f4302..8da4fbd 100644 ---- a/tests/low_high_pc.c -+++ b/tests/low_high_pc.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c -index d50355e..3c41f40 100644 ---- a/tests/md5-sha1-test.c -+++ b/tests/md5-sha1-test.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - - #include "md5.h" - #include "sha1.h" -diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c -index 6f027df..1ce5e6e 100644 ---- a/tests/rdwrmmap.c -+++ b/tests/rdwrmmap.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/saridx.c b/tests/saridx.c -index 8a450d8..b387801 100644 ---- a/tests/saridx.c -+++ b/tests/saridx.c -@@ -17,7 +17,7 @@ - - #include - --#include -+#include - #include - #include - #include -diff --git a/tests/sectiondump.c b/tests/sectiondump.c -index 3033fed..8e888db 100644 ---- a/tests/sectiondump.c -+++ b/tests/sectiondump.c -@@ -18,7 +18,7 @@ - #include - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/varlocs.c b/tests/varlocs.c -index c3fba89..e043ea2 100644 ---- a/tests/varlocs.c -+++ b/tests/varlocs.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c -index b876c10..afb2823 100644 ---- a/tests/vdsosyms.c -+++ b/tests/vdsosyms.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include --- -2.8.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch deleted file mode 100644 index 3754c1c36..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Fri, 10 Apr 2015 00:29:18 +0200 -Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false - positive - -Upstream-Status: Pending -Signed-off-by: Martin Jansa ---- - libelf/elf_getarsym.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c -index d0bb28a..08954d2 100644 ---- a/libelf/elf_getarsym.c -+++ b/libelf/elf_getarsym.c -@@ -165,8 +165,13 @@ elf_getarsym (elf, ptr) - int w = index64_p ? 8 : 4; - - /* We have an archive. The first word in there is the number of -- entries in the table. */ -- uint64_t n; -+ entries in the table. -+ Set to SIZE_MAX just to silence -Werror=maybe-uninitialized -+ elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function -+ The read_number_entries function doesn't initialize n only when returning -+ -1 which in turn ensures to jump over usage of this uninitialized variable. -+ */ -+ uint64_t n = SIZE_MAX; - size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); - if (read_number_entries (&n, elf, &off, index64_p) < 0) - { --- -2.3.5 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch deleted file mode 100644 index 6923bf705..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -[PATCH] fix a stack-usage warning - -Upstream-Status: Pending - -not use a variable to as a array size, otherwise the warning to error that -stack usage might be unbounded [-Werror=stack-usage=] will happen - -Signed-off-by: Roy Li ---- - backends/ppc_initreg.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c -index 64f5379..52dde3e 100644 ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), - return false; - } - const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); -- Dwarf_Word dwarf_regs[gprs]; -+ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)]; - for (unsigned gpr = 0; gpr < gprs; gpr++) - dwarf_regs[gpr] = user_regs.r.gpr[gpr]; - if (! setfunc (0, gprs, dwarf_regs, arg)) --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch deleted file mode 100644 index 5be92d705..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch +++ /dev/null @@ -1,38 +0,0 @@ -Disable the test to convert euc-jp - -Remove the test "Test against HP-UX 11.11 bug: -No converter from EUC-JP to UTF-8 is provided" -since we don't support HP-UX and if the euc-jp is not -installed on the host, the dependence will be built without -iconv support and will cause guild-native building fail. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Roy Li ---- - m4/iconv.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/m4/iconv.m4 b/m4/iconv.m4 -index a503646..299f1eb 100644 ---- a/m4/iconv.m4 -+++ b/m4/iconv.m4 -@@ -159,6 +159,7 @@ int main () - } - } - #endif -+#if 0 - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ -@@ -170,6 +171,7 @@ int main () - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; -+#endif - return result; - }]])], - [am_cv_func_iconv_works=yes], --- -2.0.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch deleted file mode 100644 index d88f4ebd0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001 -From: Mark Wielaard -Date: Sun, 12 Feb 2017 21:51:34 +0100 -Subject: [PATCH] libasm: Fix one GCC7 -Wformat-truncation=2 warning. - -Make sure that if we have really lots of labels the tempsym doesn't get -truncated because it is too small to hold the whole name. - -This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed -out by enabling this warning because there are currently some issues -with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 - -Signed-off-by: Mark Wielaard - -Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95) -Signed-off-by: Joshua Lock - ---- - libasm/ChangeLog | 6 +++++- - libasm/asm_newsym.c | 6 ++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -Index: elfutils-0.168/libasm/asm_newsym.c -=================================================================== ---- elfutils-0.168.orig/libasm/asm_newsym.c -+++ elfutils-0.168/libasm/asm_newsym.c -@@ -1,5 +1,5 @@ - /* Define new symbol for current position in given section. -- Copyright (C) 2002, 2005, 2016 Red Hat, Inc. -+ Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2002. - -@@ -44,7 +44,9 @@ AsmSym_t * - asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, - int type, int binding) - { --#define TEMPSYMLEN 10 -+/* We don't really expect labels with many digits, but in theory it could -+ be 10 digits (plus ".L" and a zero terminator). */ -+#define TEMPSYMLEN 13 - char tempsym[TEMPSYMLEN]; - AsmSym_t *result; - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch deleted file mode 100644 index 38dc57bef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch +++ /dev/null @@ -1,47 +0,0 @@ -Fix build on aarch64/musl - -Errors - -invalid operands to binary & (have 'long double' and 'unsigned int') - -error: redefinition - of 'struct iovec' - struct iovec { void *iov_base; size_t iov_len; }; - ^ -Upstream-Status: Pending -Signed-off-by: Khem Raj -Index: elfutils-0.163/backends/aarch64_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/aarch64_initreg.c -+++ elfutils-0.163/backends/aarch64_initreg.c -@@ -33,7 +33,7 @@ - #include "system.h" - #include - #ifdef __aarch64__ --# include -+# include - # include - # include - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ -@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t - - Dwarf_Word dwarf_fregs[32]; - for (int r = 0; r < 32; r++) -- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; -+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF; - - if (! setfunc (64, 32, dwarf_fregs, arg)) - return false; -Index: elfutils-0.163/backends/arm_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/arm_initreg.c -+++ elfutils-0.163/backends/arm_initreg.c -@@ -37,7 +37,7 @@ - #endif - - #ifdef __aarch64__ --# include -+# include - # include - # include - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch deleted file mode 100644 index e0291b4cf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:16:58 +0000 -Subject: [PATCH 1/3] Ignore differences between mips machine identifiers - -Little endian binaries actually use EM_MIPS so you can't tell the endianness -from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the -kernel will not load binaries containing it). - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - ---- - backends/mips_init.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -Index: b/backends/mips_init.c -=================================================================== ---- a/backends/mips_init.c -+++ b/backends/mips_init.c -@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus - return NULL; - - /* We handle it. */ -- if (machine == EM_MIPS) -- eh->name = "MIPS R3000 big-endian"; -- else if (machine == EM_MIPS_RS3_LE) -- eh->name = "MIPS R3000 little-endian"; -- -+ eh->name = "MIPS"; - mips_init_reloc (eh); - HOOK (eh, reloc_simple_type); - HOOK (eh, return_value_location); diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch deleted file mode 100644 index b17498f5f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch +++ /dev/null @@ -1,171 +0,0 @@ -From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:17:01 +0000 -Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia ---- - backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 94 insertions(+), 10 deletions(-) - -diff --git a/backends/mips_retval.c b/backends/mips_retval.c -index 33f12a7..d5c6ef0 100644 ---- a/backends/mips_retval.c -+++ b/backends/mips_retval.c -@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf) - default: - if ((elf_flags & EF_MIPS_ABI2)) - return MIPS_ABI_N32; -+ else if ((ehdr->e_ident[EI_CLASS] == ELFCLASS64)) -+ return MIPS_ABI_N64; - } - - /* GCC creates a pseudo-section whose name describes the ABI. */ -@@ -195,6 +197,57 @@ static const Dwarf_Op loc_aggregate[] = - }; - #define nloc_aggregate 1 - -+/* Test if a struct member is a float */ -+static int is_float_child(Dwarf_Die *childdie) -+{ -+ /* Test if this is actually a struct member */ -+ if (dwarf_tag(childdie) != DW_TAG_member) -+ return 0; -+ -+ /* Get type of member */ -+ Dwarf_Attribute attr_mem; -+ Dwarf_Die child_type_mem; -+ Dwarf_Die *child_typedie = -+ dwarf_formref_die(dwarf_attr_integrate(childdie, -+ DW_AT_type, -+ &attr_mem), &child_type_mem); -+ -+ if (dwarf_tag(child_typedie) != DW_TAG_base_type) -+ return 0; -+ -+ /* Get base subtype */ -+ Dwarf_Word encoding; -+ if (dwarf_formudata (dwarf_attr_integrate (child_typedie, -+ DW_AT_encoding, -+ &attr_mem), &encoding) != 0) -+ return 0; -+ -+ return encoding == DW_ATE_float; -+} -+ -+/* Returns the number of fpregs which can be returned in the given struct */ -+static int get_struct_fpregs(Dwarf_Die *structtypedie) -+{ -+ Dwarf_Die child_mem; -+ int fpregs = 0; -+ -+ /* Get first structure member */ -+ if (dwarf_child(structtypedie, &child_mem) != 0) -+ return 0; -+ -+ do -+ { -+ /* Ensure this register is a float */ -+ if (!is_float_child(&child_mem)) -+ return 0; -+ -+ fpregs++; -+ } -+ while (dwarf_siblingof (&child_mem, &child_mem) == 0); -+ -+ return fpregs; -+} -+ - int - mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - { -@@ -240,6 +293,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - tag = dwarf_tag (typedie); - } - -+ Dwarf_Word size; - switch (tag) - { - case -1: -@@ -258,8 +312,6 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - case DW_TAG_enumeration_type: - case DW_TAG_pointer_type: - case DW_TAG_ptr_to_member_type: -- { -- Dwarf_Word size; - if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, - &attr_mem), &size) != 0) - { -@@ -289,7 +341,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - if (size <= 4*regsize && abi == MIPS_ABI_O32) - return nloc_fpregquad; - -- goto aggregate; -+ goto large; - } - } - *locp = ABI_LOC(loc_intreg, regsize); -@@ -298,18 +350,50 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - if (size <= 2*regsize) - return nloc_intregpair; - -- /* Else fall through. Shouldn't happen though (at least with gcc) */ -- } -+ /* Else pass in memory. Shouldn't happen though (at least with gcc) */ -+ goto large; - - case DW_TAG_structure_type: - case DW_TAG_class_type: - case DW_TAG_union_type: -- case DW_TAG_array_type: -- aggregate: -- /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */ -- if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64)) -- return -2; -+ /* Handle special cases for structures <= 128 bytes in newer ABIs */ -+ if (abi == MIPS_ABI_EABI32 || abi == MIPS_ABI_EABI64 || -+ abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64) -+ { -+ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 16) -+ { -+ /* -+ * Special case in N64 / N32 - -+ * structures containing only floats are returned in fp regs. -+ * Everything else is returned in integer regs. -+ */ -+ if (tag != DW_TAG_union_type && -+ (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)) -+ { -+ int num_fpregs = get_struct_fpregs(typedie); -+ if (num_fpregs == 1 || num_fpregs == 2) -+ { -+ *locp = loc_fpreg; -+ if (num_fpregs == 1) -+ return nloc_fpreg; -+ else -+ return nloc_fpregpair; -+ } -+ } -+ -+ *locp = loc_intreg; -+ if (size <= 8) -+ return nloc_intreg; -+ else -+ return nloc_intregpair; -+ } -+ } -+ -+ /* Fallthrough to handle large types */ - -+ case DW_TAG_array_type: -+ large: -+ /* Return large structures in memory */ - *locp = loc_aggregate; - return nloc_aggregate; - } --- -2.1.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch deleted file mode 100644 index 2a5f8628d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch +++ /dev/null @@ -1,229 +0,0 @@ -From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:17:02 +0000 -Subject: [PATCH 3/3] Add mips n64 relocation format hack - -MIPSEL N64 ELF files use a slightly different format for storing relocation -entries which is incompatible with the normal R_SYM / R_INFO macros. -To workaround this, we rearrange the bytes in the relocation's r_info field -when reading and writing the relocations. - -This patch also ensures that strip.c sets the correct value of e_machine -before manipulating relocations so that these changes take effect. - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia ---- - libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- - libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- - libelf/gelf_update_rel.c | 20 +++++++++++++++++++- - libelf/gelf_update_rela.c | 20 +++++++++++++++++++- - src/strip.c | 17 +++++++++++++++++ - 5 files changed, 101 insertions(+), 6 deletions(-) - -Index: b/libelf/gelf_getrel.c -=================================================================== ---- a/libelf/gelf_getrel.c -+++ b/libelf/gelf_getrel.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - GElf_Rel * - gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) -@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE - result = NULL; - } - else -- result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], -- sizeof (Elf64_Rel)); -+ { -+ GElf_Ehdr hdr; -+ result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], -+ sizeof (Elf64_Rel)); -+ -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* -+ * The relocation format is mangled on MIPSEL N64 -+ * We'll adjust it so at least R_SYM will work on it -+ */ -+ GElf_Xword r_info = dst->r_info; -+ dst->r_info = (r_info << 32) | -+ ((r_info >> 8) & 0xFF000000) | -+ ((r_info >> 24) & 0x00FF0000) | -+ ((r_info >> 40) & 0x0000FF00) | -+ ((r_info >> 56) & 0x000000FF); -+ } -+ } - } - - rwlock_unlock (scn->elf->lock); -Index: b/libelf/gelf_getrela.c -=================================================================== ---- a/libelf/gelf_getrela.c -+++ b/libelf/gelf_getrela.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - GElf_Rela * - gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) -@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G - result = NULL; - } - else -- result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], -- sizeof (Elf64_Rela)); -+ { -+ GElf_Ehdr hdr; -+ result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], -+ sizeof (Elf64_Rela)); -+ -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* -+ * The relocation format is mangled on MIPSEL N64 -+ * We'll adjust it so at least R_SYM will work on it -+ */ -+ GElf_Xword r_info = dst->r_info; -+ dst->r_info = (r_info << 32) | -+ ((r_info >> 8) & 0xFF000000) | -+ ((r_info >> 24) & 0x00FF0000) | -+ ((r_info >> 40) & 0x0000FF00) | -+ ((r_info >> 56) & 0x000000FF); -+ } -+ } - } - - rwlock_unlock (scn->elf->lock); -Index: b/libelf/gelf_update_rel.c -=================================================================== ---- a/libelf/gelf_update_rel.c -+++ b/libelf/gelf_update_rel.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - int - gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) -@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, - } - else - { -+ GElf_Ehdr hdr; -+ GElf_Rel value = *src; -+ - /* Check whether we have to resize the data buffer. */ - if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) - { -@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, - goto out; - } - -- ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = *src; -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* Undo the MIPSEL N64 hack from gelf_getrel */ -+ GElf_Xword r_info = value.r_info; -+ value.r_info = (r_info >> 32) | -+ ((r_info << 8) & 0x000000FF00000000) | -+ ((r_info << 24) & 0x0000FF0000000000) | -+ ((r_info << 40) & 0x00FF000000000000) | -+ ((r_info << 56) & 0xFF00000000000000); -+ } -+ -+ ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = value; - } - - result = 1; -Index: b/libelf/gelf_update_rela.c -=================================================================== ---- a/libelf/gelf_update_rela.c -+++ b/libelf/gelf_update_rela.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - int - gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) -@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx - } - else - { -+ GElf_Ehdr hdr; -+ GElf_Rela value = *src; -+ - /* Check whether we have to resize the data buffer. */ - if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) - { -@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx - goto out; - } - -- ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = *src; -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* Undo the MIPSEL N64 hack from gelf_getrel */ -+ GElf_Xword r_info = value.r_info; -+ value.r_info = (r_info >> 32) | -+ ((r_info << 8) & 0x000000FF00000000) | -+ ((r_info << 24) & 0x0000FF0000000000) | -+ ((r_info << 40) & 0x00FF000000000000) | -+ ((r_info << 56) & 0xFF00000000000000); -+ } -+ -+ ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = value; - } - - result = 1; -Index: b/src/strip.c -=================================================================== ---- a/src/strip.c -+++ b/src/strip.c -@@ -532,6 +532,23 @@ handle_elf (int fd, Elf *elf, const char - goto fail; - } - -+ /* Copy identity part of the ELF header now */ -+ newehdr = gelf_getehdr (newelf, &newehdr_mem); -+ if (newehdr == NULL) -+ INTERNAL_ERROR (fname); -+ -+ memcpy (newehdr->e_ident, ehdr->e_ident, EI_NIDENT); -+ newehdr->e_type = ehdr->e_type; -+ newehdr->e_machine = ehdr->e_machine; -+ newehdr->e_version = ehdr->e_version; -+ -+ if (gelf_update_ehdr (newelf, newehdr) == 0) -+ { -+ error (0, 0, gettext ("%s: error while creating ELF header: %s"), -+ fname, elf_errmsg (-1)); -+ return 1; -+ } -+ - /* Copy over the old program header if needed. */ - if (ehdr->e_type != ET_REL) - for (cnt = 0; cnt < phnum; ++cnt) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff deleted file mode 100644 index 50f4b059e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff +++ /dev/null @@ -1,603 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/backends/arm_init.c -=================================================================== ---- a/backends/arm_init.c -+++ b/backends/arm_init.c -@@ -35,20 +35,31 @@ - #define RELOC_PREFIX R_ARM_ - #include "libebl_CPU.h" - -+#include "libebl_arm.h" -+ - /* This defines the common reloc hooks based on arm_reloc.def. */ - #include "common-reloc.c" - - - const char * --arm_init (Elf *elf __attribute__ ((unused)), -+arm_init (Elf *elf, - GElf_Half machine __attribute__ ((unused)), - Ebl *eh, - size_t ehlen) - { -+ int soft_float = 0; -+ - /* Check whether the Elf_BH object has a sufficent size. */ - if (ehlen < sizeof (Ebl)) - return NULL; - -+ if (elf) { -+ GElf_Ehdr ehdr_mem; -+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); -+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT)) -+ soft_float = 1; -+ } -+ - /* We handle it. */ - eh->name = "ARM"; - arm_init_reloc (eh); -@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse - HOOK (eh, core_note); - HOOK (eh, auxv_info); - HOOK (eh, check_object_attribute); -- HOOK (eh, return_value_location); -+ if (soft_float) -+ eh->return_value_location = arm_return_value_location_soft; -+ else -+ eh->return_value_location = arm_return_value_location_hard; - HOOK (eh, abi_cfi); - HOOK (eh, check_reloc_target_type); - HOOK (eh, symbol_type_name); -Index: b/backends/arm_regs.c -=================================================================== ---- a/backends/arm_regs.c -+++ b/backends/arm_regs.c -@@ -31,6 +31,7 @@ - #endif - - #include -+#include - #include - - #define BACKEND arm_ -@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_ - break; - - case 16 + 0 ... 16 + 7: -+ /* AADWARF says that there are no registers in that range, -+ * but gcc maps FPA registers here -+ */ - regno += 96 - 16; - /* Fall through. */ - case 96 + 0 ... 96 + 7: -@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_ - namelen = 2; - break; - -+ case 64 + 0 ... 64 + 9: -+ *setname = "VFP"; -+ *bits = 32; -+ *type = DW_ATE_float; -+ name[0] = 's'; -+ name[1] = regno - 64 + '0'; -+ namelen = 2; -+ break; -+ -+ case 64 + 10 ... 64 + 31: -+ *setname = "VFP"; -+ *bits = 32; -+ *type = DW_ATE_float; -+ name[0] = 's'; -+ name[1] = (regno - 64) / 10 + '0'; -+ name[2] = (regno - 64) % 10 + '0'; -+ namelen = 3; -+ break; -+ -+ case 104 + 0 ... 104 + 7: -+ /* XXX TODO: -+ * This can be either intel wireless MMX general purpose/control -+ * registers or xscale accumulator, which have different usage. -+ * We only have the intel wireless MMX here now. -+ * The name needs to be changed for the xscale accumulator too. */ -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 32; -+ memcpy(name, "wcgr", 4); -+ name[4] = regno - 104 + '0'; -+ namelen = 5; -+ break; -+ -+ case 112 + 0 ... 112 + 9: -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 64; -+ name[0] = 'w'; -+ name[1] = 'r'; -+ name[2] = regno - 112 + '0'; -+ namelen = 3; -+ break; -+ -+ case 112 + 10 ... 112 + 15: -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 64; -+ name[0] = 'w'; -+ name[1] = 'r'; -+ name[2] = '1'; -+ name[3] = regno - 112 - 10 + '0'; -+ namelen = 4; -+ break; -+ - case 128: -+ *setname = "state"; - *type = DW_ATE_unsigned; - return stpcpy (name, "spsr") + 1 - name; - -+ case 129: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_fiq") + 1 - name; -+ -+ case 130: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_irq") + 1 - name; -+ -+ case 131: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_abt") + 1 - name; -+ -+ case 132: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_und") + 1 - name; -+ -+ case 133: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_svc") + 1 - name; -+ -+ case 144 ... 150: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1; -+ -+ case 151 ... 157: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1; -+ -+ case 158 ... 159: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1; -+ -+ case 160 ... 161: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1; -+ -+ case 162 ... 163: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_und", regno - 162 + 13) + 1; -+ -+ case 164 ... 165: -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1; -+ -+ case 192 ... 199: -+ *setname = "MMX"; -+ *bits = 32; -+ *type = DW_ATE_unsigned; -+ name[0] = 'w'; -+ name[1] = 'c'; -+ name[2] = regno - 192 + '0'; -+ namelen = 3; -+ break; -+ - case 256 + 0 ... 256 + 9: -+ /* XXX TODO: Neon also uses those registers and can contain -+ * both float and integers */ - *setname = "VFP"; - *type = DW_ATE_float; - *bits = 64; -Index: b/backends/arm_retval.c -=================================================================== ---- a/backends/arm_retval.c -+++ b/backends/arm_retval.c -@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = - #define nloc_intreg 1 - #define nloc_intregs(n) (2 * (n)) - -+/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */ -+static const Dwarf_Op loc_fpreg[] = -+ { -+ { .atom = DW_OP_reg16 }, -+ }; -+#define nloc_fpreg 1 -+ - /* The return value is a structure and is actually stored in stack space - passed in a hidden argument by the caller. But, the compiler - helpfully returns the address of that space in r0. */ -@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] = - #define nloc_aggregate 1 - - --int --arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+static int -+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, -+ int soft_float) - { - /* Start with the function's type, and get the DW_AT_type attribute, - which is the type of the return value. */ -@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu - else - return -1; - } -+ if (tag == DW_TAG_base_type) -+ { -+ Dwarf_Word encoding; -+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, -+ &attr_mem), &encoding) != 0) -+ return -1; -+ -+ if ((encoding == DW_ATE_float) && !soft_float) -+ { -+ *locp = loc_fpreg; -+ if (size <= 8) -+ return nloc_fpreg; -+ goto aggregate; -+ } -+ } - if (size <= 16) - { - intreg: -@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu - } - - aggregate: -+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */ - *locp = loc_aggregate; - return nloc_aggregate; - } -@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu - DWARF and might be valid. */ - return -2; - } -+ -+/* return location for -mabi=apcs-gnu -msoft-float */ -+int -+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+{ -+ return arm_return_value_location_ (functypedie, locp, 1); -+} -+ -+/* return location for -mabi=apcs-gnu -mhard-float (current default) */ -+int -+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+{ -+ return arm_return_value_location_ (functypedie, locp, 0); -+} -+ -Index: b/libelf/elf.h -=================================================================== ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -2593,6 +2593,9 @@ enum - #define EF_ARM_EABI_VER4 0x04000000 - #define EF_ARM_EABI_VER5 0x05000000 - -+/* EI_OSABI values */ -+#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */ -+ - /* Additional symbol types for Thumb. */ - #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ - #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ -@@ -2610,12 +2613,19 @@ enum - - /* Processor specific values for the Phdr p_type field. */ - #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ -+#define PT_ARM_UNWIND PT_ARM_EXIDX - - /* Processor specific values for the Shdr sh_type field. */ - #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */ - #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */ - #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */ - -+/* Processor specific values for the Dyn d_tag field. */ -+#define DT_ARM_RESERVED1 (DT_LOPROC + 0) -+#define DT_ARM_SYMTABSZ (DT_LOPROC + 1) -+#define DT_ARM_PREEMTMAB (DT_LOPROC + 2) -+#define DT_ARM_RESERVED2 (DT_LOPROC + 3) -+#define DT_ARM_NUM 4 - - /* AArch64 relocs. */ - -@@ -2908,6 +2918,7 @@ enum - TLS block (LDR, STR). */ - #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative - to GOT origin (LDR). */ -+/* 112 - 127 private range */ - #define R_ARM_ME_TOO 128 /* Obsolete. */ - #define R_ARM_THM_TLS_DESCSEQ 129 - #define R_ARM_THM_TLS_DESCSEQ16 129 -Index: b/backends/libebl_arm.h -=================================================================== ---- /dev/null -+++ b/backends/libebl_arm.h -@@ -0,0 +1,9 @@ -+#ifndef _LIBEBL_ARM_H -+#define _LIBEBL_ARM_H 1 -+ -+#include -+ -+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); -+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); -+ -+#endif -Index: b/tests/run-allregs.sh -=================================================================== ---- a/tests/run-allregs.sh -+++ b/tests/run-allregs.sh -@@ -2672,7 +2672,28 @@ integer registers: - 13: sp (sp), address 32 bits - 14: lr (lr), address 32 bits - 15: pc (pc), address 32 bits -- 128: spsr (spsr), unsigned 32 bits -+ 144: r8_usr (r8_usr), signed 32 bits -+ 145: r9_usr (r9_usr), signed 32 bits -+ 146: r10_usr (r10_usr), signed 32 bits -+ 147: r11_usr (r11_usr), signed 32 bits -+ 148: r12_usr (r12_usr), signed 32 bits -+ 149: r13_usr (r13_usr), signed 32 bits -+ 150: r14_usr (r14_usr), signed 32 bits -+ 151: r8_fiq (r8_fiq), signed 32 bits -+ 152: r9_fiq (r9_fiq), signed 32 bits -+ 153: r10_fiq (r10_fiq), signed 32 bits -+ 154: r11_fiq (r11_fiq), signed 32 bits -+ 155: r12_fiq (r12_fiq), signed 32 bits -+ 156: r13_fiq (r13_fiq), signed 32 bits -+ 157: r14_fiq (r14_fiq), signed 32 bits -+ 158: r13_irq (r13_irq), signed 32 bits -+ 159: r14_irq (r14_irq), signed 32 bits -+ 160: r13_abt (r13_abt), signed 32 bits -+ 161: r14_abt (r14_abt), signed 32 bits -+ 162: r13_und (r13_und), signed 32 bits -+ 163: r14_und (r14_und), signed 32 bits -+ 164: r13_svc (r13_svc), signed 32 bits -+ 165: r14_svc (r14_svc), signed 32 bits - FPA registers: - 16: f0 (f0), float 96 bits - 17: f1 (f1), float 96 bits -@@ -2690,7 +2711,72 @@ FPA registers: - 101: f5 (f5), float 96 bits - 102: f6 (f6), float 96 bits - 103: f7 (f7), float 96 bits -+MMX registers: -+ 104: wcgr0 (wcgr0), unsigned 32 bits -+ 105: wcgr1 (wcgr1), unsigned 32 bits -+ 106: wcgr2 (wcgr2), unsigned 32 bits -+ 107: wcgr3 (wcgr3), unsigned 32 bits -+ 108: wcgr4 (wcgr4), unsigned 32 bits -+ 109: wcgr5 (wcgr5), unsigned 32 bits -+ 110: wcgr6 (wcgr6), unsigned 32 bits -+ 111: wcgr7 (wcgr7), unsigned 32 bits -+ 112: wr0 (wr0), unsigned 64 bits -+ 113: wr1 (wr1), unsigned 64 bits -+ 114: wr2 (wr2), unsigned 64 bits -+ 115: wr3 (wr3), unsigned 64 bits -+ 116: wr4 (wr4), unsigned 64 bits -+ 117: wr5 (wr5), unsigned 64 bits -+ 118: wr6 (wr6), unsigned 64 bits -+ 119: wr7 (wr7), unsigned 64 bits -+ 120: wr8 (wr8), unsigned 64 bits -+ 121: wr9 (wr9), unsigned 64 bits -+ 122: wr10 (wr10), unsigned 64 bits -+ 123: wr11 (wr11), unsigned 64 bits -+ 124: wr12 (wr12), unsigned 64 bits -+ 125: wr13 (wr13), unsigned 64 bits -+ 126: wr14 (wr14), unsigned 64 bits -+ 127: wr15 (wr15), unsigned 64 bits -+ 192: wc0 (wc0), unsigned 32 bits -+ 193: wc1 (wc1), unsigned 32 bits -+ 194: wc2 (wc2), unsigned 32 bits -+ 195: wc3 (wc3), unsigned 32 bits -+ 196: wc4 (wc4), unsigned 32 bits -+ 197: wc5 (wc5), unsigned 32 bits -+ 198: wc6 (wc6), unsigned 32 bits -+ 199: wc7 (wc7), unsigned 32 bits - VFP registers: -+ 64: s0 (s0), float 32 bits -+ 65: s1 (s1), float 32 bits -+ 66: s2 (s2), float 32 bits -+ 67: s3 (s3), float 32 bits -+ 68: s4 (s4), float 32 bits -+ 69: s5 (s5), float 32 bits -+ 70: s6 (s6), float 32 bits -+ 71: s7 (s7), float 32 bits -+ 72: s8 (s8), float 32 bits -+ 73: s9 (s9), float 32 bits -+ 74: s10 (s10), float 32 bits -+ 75: s11 (s11), float 32 bits -+ 76: s12 (s12), float 32 bits -+ 77: s13 (s13), float 32 bits -+ 78: s14 (s14), float 32 bits -+ 79: s15 (s15), float 32 bits -+ 80: s16 (s16), float 32 bits -+ 81: s17 (s17), float 32 bits -+ 82: s18 (s18), float 32 bits -+ 83: s19 (s19), float 32 bits -+ 84: s20 (s20), float 32 bits -+ 85: s21 (s21), float 32 bits -+ 86: s22 (s22), float 32 bits -+ 87: s23 (s23), float 32 bits -+ 88: s24 (s24), float 32 bits -+ 89: s25 (s25), float 32 bits -+ 90: s26 (s26), float 32 bits -+ 91: s27 (s27), float 32 bits -+ 92: s28 (s28), float 32 bits -+ 93: s29 (s29), float 32 bits -+ 94: s30 (s30), float 32 bits -+ 95: s31 (s31), float 32 bits - 256: d0 (d0), float 64 bits - 257: d1 (d1), float 64 bits - 258: d2 (d2), float 64 bits -@@ -2723,6 +2809,13 @@ VFP registers: - 285: d29 (d29), float 64 bits - 286: d30 (d30), float 64 bits - 287: d31 (d31), float 64 bits -+state registers: -+ 128: spsr (spsr), unsigned 32 bits -+ 129: spsr_fiq (spsr_fiq), unsigned 32 bits -+ 130: spsr_irq (spsr_irq), unsigned 32 bits -+ 131: spsr_abt (spsr_abt), unsigned 32 bits -+ 132: spsr_und (spsr_und), unsigned 32 bits -+ 133: spsr_svc (spsr_svc), unsigned 32 bits - EOF - - # See run-readelf-mixed-corenote.sh for instructions to regenerate -Index: b/tests/run-readelf-mixed-corenote.sh -=================================================================== ---- a/tests/run-readelf-mixed-corenote.sh -+++ b/tests/run-readelf-mixed-corenote.sh -@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27 - pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 - utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000 - orig_r0: -1, fpvalid: 1 -- r0: 1 r1: -1091672508 r2: -1091672500 -- r3: 0 r4: 0 r5: 0 -- r6: 33728 r7: 0 r8: 0 -- r9: 0 r10: -1225703496 r11: -1091672844 -- r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 -- pc: 0x00008500 spsr: 0x60000010 -+ r0: 1 r1: -1091672508 r2: -1091672500 r3: 0 -+ r4: 0 r5: 0 r6: 33728 r7: 0 -+ r8: 0 r9: 0 r10: -1225703496 r11: -1091672844 -+ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 pc: 0x00008500 -+ spsr: 0x60000010 - CORE 124 PRPSINFO - state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 - uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 -Index: b/tests/run-addrcfi.sh -=================================================================== ---- a/tests/run-addrcfi.sh -+++ b/tests/run-addrcfi.sh -@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc - FPA reg21 (f5): undefined - FPA reg22 (f6): undefined - FPA reg23 (f7): undefined -+ VFP reg64 (s0): undefined -+ VFP reg65 (s1): undefined -+ VFP reg66 (s2): undefined -+ VFP reg67 (s3): undefined -+ VFP reg68 (s4): undefined -+ VFP reg69 (s5): undefined -+ VFP reg70 (s6): undefined -+ VFP reg71 (s7): undefined -+ VFP reg72 (s8): undefined -+ VFP reg73 (s9): undefined -+ VFP reg74 (s10): undefined -+ VFP reg75 (s11): undefined -+ VFP reg76 (s12): undefined -+ VFP reg77 (s13): undefined -+ VFP reg78 (s14): undefined -+ VFP reg79 (s15): undefined -+ VFP reg80 (s16): undefined -+ VFP reg81 (s17): undefined -+ VFP reg82 (s18): undefined -+ VFP reg83 (s19): undefined -+ VFP reg84 (s20): undefined -+ VFP reg85 (s21): undefined -+ VFP reg86 (s22): undefined -+ VFP reg87 (s23): undefined -+ VFP reg88 (s24): undefined -+ VFP reg89 (s25): undefined -+ VFP reg90 (s26): undefined -+ VFP reg91 (s27): undefined -+ VFP reg92 (s28): undefined -+ VFP reg93 (s29): undefined -+ VFP reg94 (s30): undefined -+ VFP reg95 (s31): undefined - FPA reg96 (f0): undefined - FPA reg97 (f1): undefined - FPA reg98 (f2): undefined -@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc - FPA reg101 (f5): undefined - FPA reg102 (f6): undefined - FPA reg103 (f7): undefined -- integer reg128 (spsr): undefined -+ MMX reg104 (wcgr0): undefined -+ MMX reg105 (wcgr1): undefined -+ MMX reg106 (wcgr2): undefined -+ MMX reg107 (wcgr3): undefined -+ MMX reg108 (wcgr4): undefined -+ MMX reg109 (wcgr5): undefined -+ MMX reg110 (wcgr6): undefined -+ MMX reg111 (wcgr7): undefined -+ MMX reg112 (wr0): undefined -+ MMX reg113 (wr1): undefined -+ MMX reg114 (wr2): undefined -+ MMX reg115 (wr3): undefined -+ MMX reg116 (wr4): undefined -+ MMX reg117 (wr5): undefined -+ MMX reg118 (wr6): undefined -+ MMX reg119 (wr7): undefined -+ MMX reg120 (wr8): undefined -+ MMX reg121 (wr9): undefined -+ MMX reg122 (wr10): undefined -+ MMX reg123 (wr11): undefined -+ MMX reg124 (wr12): undefined -+ MMX reg125 (wr13): undefined -+ MMX reg126 (wr14): undefined -+ MMX reg127 (wr15): undefined -+ state reg128 (spsr): undefined -+ state reg129 (spsr_fiq): undefined -+ state reg130 (spsr_irq): undefined -+ state reg131 (spsr_abt): undefined -+ state reg132 (spsr_und): undefined -+ state reg133 (spsr_svc): undefined -+ integer reg144 (r8_usr): undefined -+ integer reg145 (r9_usr): undefined -+ integer reg146 (r10_usr): undefined -+ integer reg147 (r11_usr): undefined -+ integer reg148 (r12_usr): undefined -+ integer reg149 (r13_usr): undefined -+ integer reg150 (r14_usr): undefined -+ integer reg151 (r8_fiq): undefined -+ integer reg152 (r9_fiq): undefined -+ integer reg153 (r10_fiq): undefined -+ integer reg154 (r11_fiq): undefined -+ integer reg155 (r12_fiq): undefined -+ integer reg156 (r13_fiq): undefined -+ integer reg157 (r14_fiq): undefined -+ integer reg158 (r13_irq): undefined -+ integer reg159 (r14_irq): undefined -+ integer reg160 (r13_abt): undefined -+ integer reg161 (r14_abt): undefined -+ integer reg162 (r13_und): undefined -+ integer reg163 (r14_und): undefined -+ integer reg164 (r13_svc): undefined -+ integer reg165 (r14_svc): undefined -+ MMX reg192 (wc0): undefined -+ MMX reg193 (wc1): undefined -+ MMX reg194 (wc2): undefined -+ MMX reg195 (wc3): undefined -+ MMX reg196 (wc4): undefined -+ MMX reg197 (wc5): undefined -+ MMX reg198 (wc6): undefined -+ MMX reg199 (wc7): undefined - VFP reg256 (d0): undefined - VFP reg257 (d1): undefined - VFP reg258 (d2): undefined diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff deleted file mode 100644 index 44fda7f30..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff +++ /dev/null @@ -1,802 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/backends/parisc_init.c -=================================================================== ---- /dev/null -+++ b/backends/parisc_init.c -@@ -0,0 +1,73 @@ -+/* Initialization of PA-RISC specific backend library. -+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ Written by Ulrich Drepper , 2002. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#define BACKEND parisc_ -+#define RELOC_PREFIX R_PARISC_ -+#include "libebl_CPU.h" -+#include "libebl_parisc.h" -+ -+/* This defines the common reloc hooks based on parisc_reloc.def. */ -+#include "common-reloc.c" -+ -+ -+const char * -+parisc_init (Elf *elf __attribute__ ((unused)), -+ GElf_Half machine __attribute__ ((unused)), -+ Ebl *eh, -+ size_t ehlen) -+{ -+ int pa64 = 0; -+ -+ /* Check whether the Elf_BH object has a sufficent size. */ -+ if (ehlen < sizeof (Ebl)) -+ return NULL; -+ -+ if (elf) { -+ GElf_Ehdr ehdr_mem; -+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); -+ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE)) -+ pa64 = 1; -+ } -+ /* We handle it. */ -+ eh->name = "PA-RISC"; -+ parisc_init_reloc (eh); -+ HOOK (eh, reloc_simple_type); -+ HOOK (eh, machine_flag_check); -+ HOOK (eh, symbol_type_name); -+ HOOK (eh, segment_type_name); -+ HOOK (eh, section_type_name); -+ HOOK (eh, register_info); -+ if (pa64) -+ eh->return_value_location = parisc_return_value_location_64; -+ else -+ eh->return_value_location = parisc_return_value_location_32; -+ -+ return MODVERSION; -+} -Index: b/backends/parisc_regs.c -=================================================================== ---- /dev/null -+++ b/backends/parisc_regs.c -@@ -0,0 +1,159 @@ -+/* Register names and numbers for PA-RISC DWARF. -+ Copyright (C) 2005, 2006 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+ -+#define BACKEND parisc_ -+#include "libebl_CPU.h" -+ -+ssize_t -+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen, -+ const char **prefix, const char **setname, -+ int *bits, int *type) -+{ -+ int pa64 = 0; -+ -+ if (ebl->elf) { -+ GElf_Ehdr ehdr_mem; -+ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem); -+ if (ehdr->e_flags & EF_PARISC_WIDE) -+ pa64 = 1; -+ } -+ -+ int nregs = pa64 ? 127 : 128; -+ -+ if (name == NULL) -+ return nregs; -+ -+ if (regno < 0 || regno >= nregs || namelen < 6) -+ return -1; -+ -+ *prefix = "%"; -+ -+ if (regno < 32) -+ { -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ if (pa64) -+ { -+ *bits = 64; -+ } -+ else -+ { -+ *bits = 32; -+ } -+ } -+ else if (regno == 32) -+ { -+ *setname = "special"; -+ if (pa64) -+ { -+ *bits = 6; -+ } -+ else -+ { -+ *bits = 5; -+ } -+ *type = DW_ATE_unsigned; -+ } -+ else -+ { -+ *setname = "FPU"; -+ *type = DW_ATE_float; -+ if (pa64) -+ { -+ *bits = 64; -+ } -+ else -+ { -+ *bits = 32; -+ } -+ } -+ -+ if (regno < 33) { -+ switch (regno) -+ { -+ case 0 ... 9: -+ name[0] = 'r'; -+ name[1] = regno + '0'; -+ namelen = 2; -+ break; -+ case 10 ... 31: -+ name[0] = 'r'; -+ name[1] = regno / 10 + '0'; -+ name[2] = regno % 10 + '0'; -+ namelen = 3; -+ break; -+ case 32: -+ *prefix = NULL; -+ name[0] = 'S'; -+ name[1] = 'A'; -+ name[2] = 'R'; -+ namelen = 3; -+ break; -+ } -+ } -+ else { -+ if (pa64 && ((regno - 72) % 2)) { -+ *setname = NULL; -+ return 0; -+ } -+ -+ switch (regno) -+ { -+ case 72 + 0 ... 72 + 11: -+ name[0] = 'f'; -+ name[1] = 'r'; -+ name[2] = (regno + 8 - 72) / 2 + '0'; -+ namelen = 3; -+ if ((regno + 8 - 72) % 2) { -+ name[3] = 'R'; -+ namelen++; -+ } -+ break; -+ case 72 + 12 ... 72 + 55: -+ name[0] = 'f'; -+ name[1] = 'r'; -+ name[2] = (regno + 8 - 72) / 2 / 10 + '0'; -+ name[3] = (regno + 8 - 72) / 2 % 10 + '0'; -+ namelen = 4; -+ if ((regno + 8 - 72) % 2) { -+ name[4] = 'R'; -+ namelen++; -+ } -+ break; -+ default: -+ *setname = NULL; -+ return 0; -+ } -+ } -+ name[namelen++] = '\0'; -+ return namelen; -+} -Index: b/backends/parisc_reloc.def -=================================================================== ---- /dev/null -+++ b/backends/parisc_reloc.def -@@ -0,0 +1,128 @@ -+/* List the relocation types for PA-RISC. -*- C -*- -+ Copyright (C) 2005 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+/* NAME, REL|EXEC|DYN */ -+ -+RELOC_TYPE (NONE, EXEC|DYN) -+RELOC_TYPE (DIR32, REL|EXEC|DYN) -+RELOC_TYPE (DIR21L, REL|EXEC|DYN) -+RELOC_TYPE (DIR17R, REL) -+RELOC_TYPE (DIR17F, REL) -+RELOC_TYPE (DIR14R, REL|DYN) -+RELOC_TYPE (PCREL32, REL) -+RELOC_TYPE (PCREL21L, REL) -+RELOC_TYPE (PCREL17R, REL) -+RELOC_TYPE (PCREL17F, REL) -+RELOC_TYPE (PCREL14R, REL|EXEC) -+RELOC_TYPE (DPREL21L, REL) -+RELOC_TYPE (DPREL14WR, REL) -+RELOC_TYPE (DPREL14DR, REL) -+RELOC_TYPE (DPREL14R, REL) -+RELOC_TYPE (GPREL21L, 0) -+RELOC_TYPE (GPREL14R, 0) -+RELOC_TYPE (LTOFF21L, REL) -+RELOC_TYPE (LTOFF14R, REL) -+RELOC_TYPE (DLTIND14F, 0) -+RELOC_TYPE (SETBASE, 0) -+RELOC_TYPE (SECREL32, REL) -+RELOC_TYPE (BASEREL21L, 0) -+RELOC_TYPE (BASEREL17R, 0) -+RELOC_TYPE (BASEREL14R, 0) -+RELOC_TYPE (SEGBASE, 0) -+RELOC_TYPE (SEGREL32, REL) -+RELOC_TYPE (PLTOFF21L, 0) -+RELOC_TYPE (PLTOFF14R, 0) -+RELOC_TYPE (PLTOFF14F, 0) -+RELOC_TYPE (LTOFF_FPTR32, 0) -+RELOC_TYPE (LTOFF_FPTR21L, 0) -+RELOC_TYPE (LTOFF_FPTR14R, 0) -+RELOC_TYPE (FPTR64, 0) -+RELOC_TYPE (PLABEL32, REL|DYN) -+RELOC_TYPE (PCREL64, 0) -+RELOC_TYPE (PCREL22C, 0) -+RELOC_TYPE (PCREL22F, 0) -+RELOC_TYPE (PCREL14WR, 0) -+RELOC_TYPE (PCREL14DR, 0) -+RELOC_TYPE (PCREL16F, 0) -+RELOC_TYPE (PCREL16WF, 0) -+RELOC_TYPE (PCREL16DF, 0) -+RELOC_TYPE (DIR64, REL|DYN) -+RELOC_TYPE (DIR14WR, REL) -+RELOC_TYPE (DIR14DR, REL) -+RELOC_TYPE (DIR16F, REL) -+RELOC_TYPE (DIR16WF, REL) -+RELOC_TYPE (DIR16DF, REL) -+RELOC_TYPE (GPREL64, 0) -+RELOC_TYPE (GPREL14WR, 0) -+RELOC_TYPE (GPREL14DR, 0) -+RELOC_TYPE (GPREL16F, 0) -+RELOC_TYPE (GPREL16WF, 0) -+RELOC_TYPE (GPREL16DF, 0) -+RELOC_TYPE (LTOFF64, 0) -+RELOC_TYPE (LTOFF14WR, 0) -+RELOC_TYPE (LTOFF14DR, 0) -+RELOC_TYPE (LTOFF16F, 0) -+RELOC_TYPE (LTOFF16WF, 0) -+RELOC_TYPE (LTOFF16DF, 0) -+RELOC_TYPE (SECREL64, 0) -+RELOC_TYPE (BASEREL14WR, 0) -+RELOC_TYPE (BASEREL14DR, 0) -+RELOC_TYPE (SEGREL64, 0) -+RELOC_TYPE (PLTOFF14WR, 0) -+RELOC_TYPE (PLTOFF14DR, 0) -+RELOC_TYPE (PLTOFF16F, 0) -+RELOC_TYPE (PLTOFF16WF, 0) -+RELOC_TYPE (PLTOFF16DF, 0) -+RELOC_TYPE (LTOFF_FPTR64, 0) -+RELOC_TYPE (LTOFF_FPTR14WR, 0) -+RELOC_TYPE (LTOFF_FPTR14DR, 0) -+RELOC_TYPE (LTOFF_FPTR16F, 0) -+RELOC_TYPE (LTOFF_FPTR16WF, 0) -+RELOC_TYPE (LTOFF_FPTR16DF, 0) -+RELOC_TYPE (COPY, EXEC) -+RELOC_TYPE (IPLT, EXEC|DYN) -+RELOC_TYPE (EPLT, 0) -+RELOC_TYPE (TPREL32, DYN) -+RELOC_TYPE (TPREL21L, 0) -+RELOC_TYPE (TPREL14R, 0) -+RELOC_TYPE (LTOFF_TP21L, 0) -+RELOC_TYPE (LTOFF_TP14R, 0) -+RELOC_TYPE (LTOFF_TP14F, 0) -+RELOC_TYPE (TPREL64, 0) -+RELOC_TYPE (TPREL14WR, 0) -+RELOC_TYPE (TPREL14DR, 0) -+RELOC_TYPE (TPREL16F, 0) -+RELOC_TYPE (TPREL16WF, 0) -+RELOC_TYPE (TPREL16DF, 0) -+RELOC_TYPE (LTOFF_TP64, 0) -+RELOC_TYPE (LTOFF_TP14WR, 0) -+RELOC_TYPE (LTOFF_TP14DR, 0) -+RELOC_TYPE (LTOFF_TP16F, 0) -+RELOC_TYPE (LTOFF_TP16WF, 0) -+RELOC_TYPE (LTOFF_TP16DF, 0) -+RELOC_TYPE (TLS_DTPMOD32, DYN) -+RELOC_TYPE (TLS_DTPMOD64, DYN) -+ -+#define NO_RELATIVE_RELOC 1 -Index: b/backends/parisc_retval.c -=================================================================== ---- /dev/null -+++ b/backends/parisc_retval.c -@@ -0,0 +1,213 @@ -+/* Function return value location for Linux/PA-RISC ABI. -+ Copyright (C) 2005 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+ -+#define BACKEND parisc_ -+#include "libebl_CPU.h" -+#include "libebl_parisc.h" -+ -+/* %r28, or pair %r28, %r29. */ -+static const Dwarf_Op loc_intreg32[] = -+ { -+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 }, -+ }; -+ -+static const Dwarf_Op loc_intreg[] = -+ { -+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 }, -+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 }, -+ }; -+#define nloc_intreg 1 -+#define nloc_intregpair 4 -+ -+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */ -+static const Dwarf_Op loc_fpreg32[] = -+ { -+ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 }, -+ }; -+#define nloc_fpreg32 2 -+#define nloc_fpregpair32 4 -+ -+/* $fr4 */ -+static const Dwarf_Op loc_fpreg[] = -+ { -+ { .atom = DW_OP_regx, .number = 72 }, -+ }; -+#define nloc_fpreg 1 -+ -+#if 0 -+/* The return value is a structure and is actually stored in stack space -+ passed in a hidden argument by the caller. Address of the location is stored -+ in %r28 before function call, but it may be changed by function. */ -+static const Dwarf_Op loc_aggregate[] = -+ { -+ { .atom = DW_OP_breg28 }, -+ }; -+#define nloc_aggregate 1 -+#endif -+ -+static int -+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64) -+{ -+ Dwarf_Word regsize = pa64 ? 8 : 4; -+ -+ /* Start with the function's type, and get the DW_AT_type attribute, -+ which is the type of the return value. */ -+ -+ Dwarf_Attribute attr_mem; -+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem); -+ if (attr == NULL) -+ /* The function has no return value, like a `void' function in C. */ -+ return 0; -+ -+ Dwarf_Die die_mem; -+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem); -+ int tag = dwarf_tag (typedie); -+ -+ /* Follow typedefs and qualifiers to get to the actual type. */ -+ while (tag == DW_TAG_typedef -+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type -+ || tag == DW_TAG_restrict_type) -+ { -+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); -+ typedie = dwarf_formref_die (attr, &die_mem); -+ tag = dwarf_tag (typedie); -+ } -+ -+ switch (tag) -+ { -+ case -1: -+ return -1; -+ -+ case DW_TAG_subrange_type: -+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size)) -+ { -+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); -+ typedie = dwarf_formref_die (attr, &die_mem); -+ tag = dwarf_tag (typedie); -+ } -+ /* Fall through. */ -+ -+ case DW_TAG_base_type: -+ case DW_TAG_enumeration_type: -+ case DW_TAG_pointer_type: -+ case DW_TAG_ptr_to_member_type: -+ { -+ Dwarf_Word size; -+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, -+ &attr_mem), &size) != 0) -+ { -+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type) -+ size = 4; -+ else -+ return -1; -+ } -+ if (tag == DW_TAG_base_type) -+ { -+ Dwarf_Word encoding; -+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, -+ &attr_mem), &encoding) != 0) -+ return -1; -+ -+ if (encoding == DW_ATE_float) -+ { -+ if (pa64) { -+ *locp = loc_fpreg; -+ if (size <= 8) -+ return nloc_fpreg; -+ } -+ else { -+ *locp = loc_fpreg32; -+ if (size <= 4) -+ return nloc_fpreg32; -+ else if (size <= 8) -+ return nloc_fpregpair32; -+ } -+ goto aggregate; -+ } -+ } -+ if (pa64) -+ *locp = loc_intreg; -+ else -+ *locp = loc_intreg32; -+ if (size <= regsize) -+ return nloc_intreg; -+ if (size <= 2 * regsize) -+ return nloc_intregpair; -+ -+ /* Else fall through. */ -+ } -+ -+ case DW_TAG_structure_type: -+ case DW_TAG_class_type: -+ case DW_TAG_union_type: -+ case DW_TAG_array_type: -+ aggregate: { -+ Dwarf_Word size; -+ if (dwarf_aggregate_size (typedie, &size) != 0) -+ return -1; -+ if (pa64) -+ *locp = loc_intreg; -+ else -+ *locp = loc_intreg32; -+ if (size <= regsize) -+ return nloc_intreg; -+ if (size <= 2 * regsize) -+ return nloc_intregpair; -+#if 0 -+ /* there should be some way to know this location... But I do not see it. */ -+ *locp = loc_aggregate; -+ return nloc_aggregate; -+#endif -+ /* fall through. */ -+ } -+ } -+ -+ /* XXX We don't have a good way to return specific errors from ebl calls. -+ This value means we do not understand the type, but it is well-formed -+ DWARF and might be valid. */ -+ return -2; -+} -+ -+int -+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+{ -+ return parisc_return_value_location_ (functypedie, locp, 0); -+} -+ -+int -+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+{ -+ return parisc_return_value_location_ (functypedie, locp, 1); -+} -+ -Index: b/backends/parisc_symbol.c -=================================================================== ---- /dev/null -+++ b/backends/parisc_symbol.c -@@ -0,0 +1,112 @@ -+/* PA-RISC specific symbolic name handling. -+ Copyright (C) 2002, 2005 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ Written by Ulrich Drepper , 2002. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+ -+#define BACKEND parisc_ -+#include "libebl_CPU.h" -+ -+const char * -+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)), -+ size_t len __attribute__ ((unused))) -+{ -+ switch (segment) -+ { -+ case PT_PARISC_ARCHEXT: -+ return "PARISC_ARCHEXT"; -+ case PT_PARISC_UNWIND: -+ return "PARISC_UNWIND"; -+ default: -+ break; -+ } -+ return NULL; -+} -+ -+/* Return symbolic representation of symbol type. */ -+const char * -+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)), -+ size_t len __attribute__ ((unused))) -+{ -+ if (symbol == STT_PARISC_MILLICODE) -+ return "PARISC_MILLI"; -+ return NULL; -+} -+ -+/* Return symbolic representation of section type. */ -+const char * -+parisc_section_type_name (int type, -+ char *buf __attribute__ ((unused)), -+ size_t len __attribute__ ((unused))) -+{ -+ switch (type) -+ { -+ case SHT_PARISC_EXT: -+ return "PARISC_EXT"; -+ case SHT_PARISC_UNWIND: -+ return "PARISC_UNWIND"; -+ case SHT_PARISC_DOC: -+ return "PARISC_DOC"; -+ } -+ -+ return NULL; -+} -+ -+/* Check whether machine flags are valid. */ -+bool -+parisc_machine_flag_check (GElf_Word flags) -+{ -+ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB | -+ EF_PARISC_WIDE | EF_PARISC_NO_KABP | -+ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH)) -+ return 0; -+ -+ GElf_Word arch = flags & EF_PARISC_ARCH; -+ -+ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) || -+ (arch == EFA_PARISC_2_0)); -+} -+ -+/* Check for the simple reloc types. */ -+Elf_Type -+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) -+{ -+ switch (type) -+ { -+ case R_PARISC_DIR64: -+ case R_PARISC_SECREL64: -+ return ELF_T_XWORD; -+ case R_PARISC_DIR32: -+ case R_PARISC_SECREL32: -+ return ELF_T_WORD; -+ default: -+ return ELF_T_NUM; -+ } -+} -Index: b/backends/libebl_parisc.h -=================================================================== ---- /dev/null -+++ b/backends/libebl_parisc.h -@@ -0,0 +1,9 @@ -+#ifndef _LIBEBL_HPPA_H -+#define _LIBEBL_HPPA_H 1 -+ -+#include -+ -+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp); -+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp); -+ -+#endif -Index: b/backends/Makefile.am -=================================================================== ---- a/backends/Makefile.am -+++ b/backends/Makefile.am -@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I - - - modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ -- tilegx m68k bpf -+ tilegx m68k bpf parisc - libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ - libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ - libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ - libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ -- libebl_m68k_pic.a libebl_bpf_pic.a -+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a - noinst_LIBRARIES = $(libebl_pic) - noinst_DATA = $(libebl_pic:_pic.a=.so) - -@@ -128,6 +128,9 @@ endif - libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) - am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) - -+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c -+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) -+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) - - libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) - @rm -f $(@:.so=.map) -Index: b/libelf/elf.h -=================================================================== ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -2055,16 +2055,24 @@ enum - #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ - #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ - #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ -+#define R_PARISC_DPREL14WR 19 -+#define R_PARISC_DPREL14DR 20 - #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */ - #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */ - #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */ - #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */ - #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */ -+#define R_PARISC_DLTIND14F 39 -+#define R_PARISC_SETBASE 40 - #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */ -+#define R_PARISC_BASEREL21L 42 -+#define R_PARISC_BASEREL17R 43 -+#define R_PARISC_BASEREL14R 46 - #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */ - #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */ - #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */ - #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */ -+#define R_PARISC_PLTOFF14F 55 - #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ - #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ - #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ -@@ -2073,6 +2081,7 @@ enum - #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ - #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ - #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ -+#define R_PARISC_PCREL22C 73 - #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ - #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ - #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ -@@ -2098,6 +2107,8 @@ enum - #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ - #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ - #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ -+#define R_PARISC_BASEREL14WR 107 -+#define R_PARISC_BASEREL14DR 108 - #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ - #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ - #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch deleted file mode 100644 index a4d568b08..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: elfutils-0.165/tests/run-native-test.sh -=================================================================== ---- elfutils-0.165.orig/tests/run-native-test.sh -+++ elfutils-0.165/tests/run-native-test.sh -@@ -83,6 +83,9 @@ native_test() - # "cannot attach to process: Function not implemented". - [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 - -+# hurd's /proc/$PID/maps does not give paths yet. -+[ "$(uname)" = "GNU" ] && exit 77 -+ - native_test ${abs_builddir}/allregs - native_test ${abs_builddir}/funcretval - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff deleted file mode 100644 index 3570deca9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - ---- elfutils-0.165.orig/tests/run-strip-strmerge.sh -+++ elfutils-0.165/tests/run-strip-strmerge.sh -@@ -30,7 +30,7 @@ remerged=remerged.elf - tempfiles $merged $stripped $debugfile $remerged - - echo elflint $input --testrun ${abs_top_builddir}/src/elflint --gnu $input -+testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input - echo elfstrmerge - testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input - echo elflint $merged diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch deleted file mode 100644 index 49085d1c8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/tests/run-native-test.sh -=================================================================== ---- a/tests/run-native-test.sh -+++ b/tests/run-native-test.sh -@@ -77,6 +77,12 @@ native_test() - test $native -eq 0 || testrun "$@" -p $native > /dev/null - } - -+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does -+# not give absolute paths due to sbuild's bind mounts (bug #570805) -+# therefore the next two test programs are expected to fail with -+# "cannot attach to process: Function not implemented". -+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 -+ - native_test ${abs_builddir}/allregs - native_test ${abs_builddir}/funcretval - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff deleted file mode 100644 index a5e76dda4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff +++ /dev/null @@ -1,686 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/backends/mips_init.c -=================================================================== ---- /dev/null -+++ b/backends/mips_init.c -@@ -0,0 +1,59 @@ -+/* Initialization of mips specific backend library. -+ Copyright (C) 2006 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#define BACKEND mips_ -+#define RELOC_PREFIX R_MIPS_ -+#include "libebl_CPU.h" -+ -+/* This defines the common reloc hooks based on mips_reloc.def. */ -+#include "common-reloc.c" -+ -+const char * -+mips_init (Elf *elf __attribute__ ((unused)), -+ GElf_Half machine __attribute__ ((unused)), -+ Ebl *eh, -+ size_t ehlen) -+{ -+ /* Check whether the Elf_BH object has a sufficent size. */ -+ if (ehlen < sizeof (Ebl)) -+ return NULL; -+ -+ /* We handle it. */ -+ if (machine == EM_MIPS) -+ eh->name = "MIPS R3000 big-endian"; -+ else if (machine == EM_MIPS_RS3_LE) -+ eh->name = "MIPS R3000 little-endian"; -+ -+ mips_init_reloc (eh); -+ HOOK (eh, reloc_simple_type); -+ HOOK (eh, return_value_location); -+ HOOK (eh, register_info); -+ -+ return MODVERSION; -+} -Index: b/backends/mips_regs.c -=================================================================== ---- /dev/null -+++ b/backends/mips_regs.c -@@ -0,0 +1,104 @@ -+/* Register names and numbers for MIPS DWARF. -+ Copyright (C) 2006 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+ -+#define BACKEND mips_ -+#include "libebl_CPU.h" -+ -+ssize_t -+mips_register_info (Ebl *ebl __attribute__((unused)), -+ int regno, char *name, size_t namelen, -+ const char **prefix, const char **setname, -+ int *bits, int *type) -+{ -+ if (name == NULL) -+ return 66; -+ -+ if (regno < 0 || regno > 65 || namelen < 4) -+ return -1; -+ -+ *prefix = "$"; -+ -+ if (regno < 32) -+ { -+ *setname = "integer"; -+ *type = DW_ATE_signed; -+ *bits = 32; -+ if (regno < 32 + 10) -+ { -+ name[0] = regno + '0'; -+ namelen = 1; -+ } -+ else -+ { -+ name[0] = (regno / 10) + '0'; -+ name[1] = (regno % 10) + '0'; -+ namelen = 2; -+ } -+ } -+ else if (regno < 64) -+ { -+ *setname = "FPU"; -+ *type = DW_ATE_float; -+ *bits = 32; -+ name[0] = 'f'; -+ if (regno < 32 + 10) -+ { -+ name[1] = (regno - 32) + '0'; -+ namelen = 2; -+ } -+ else -+ { -+ name[1] = (regno - 32) / 10 + '0'; -+ name[2] = (regno - 32) % 10 + '0'; -+ namelen = 3; -+ } -+ } -+ else if (regno == 64) -+ { -+ *type = DW_ATE_signed; -+ *bits = 32; -+ name[0] = 'h'; -+ name[1] = 'i'; -+ namelen = 2; -+ } -+ else -+ { -+ *type = DW_ATE_signed; -+ *bits = 32; -+ name[0] = 'l'; -+ name[1] = 'o'; -+ namelen = 2; -+ } -+ -+ name[namelen++] = '\0'; -+ return namelen; -+} -Index: b/backends/mips_reloc.def -=================================================================== ---- /dev/null -+++ b/backends/mips_reloc.def -@@ -0,0 +1,79 @@ -+/* List the relocation types for mips. -*- C -*- -+ Copyright (C) 2006 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+/* NAME, REL|EXEC|DYN */ -+ -+RELOC_TYPE (NONE, 0) -+RELOC_TYPE (16, 0) -+RELOC_TYPE (32, 0) -+RELOC_TYPE (REL32, 0) -+RELOC_TYPE (26, 0) -+RELOC_TYPE (HI16, 0) -+RELOC_TYPE (LO16, 0) -+RELOC_TYPE (GPREL16, 0) -+RELOC_TYPE (LITERAL, 0) -+RELOC_TYPE (GOT16, 0) -+RELOC_TYPE (PC16, 0) -+RELOC_TYPE (CALL16, 0) -+RELOC_TYPE (GPREL32, 0) -+ -+RELOC_TYPE (SHIFT5, 0) -+RELOC_TYPE (SHIFT6, 0) -+RELOC_TYPE (64, 0) -+RELOC_TYPE (GOT_DISP, 0) -+RELOC_TYPE (GOT_PAGE, 0) -+RELOC_TYPE (GOT_OFST, 0) -+RELOC_TYPE (GOT_HI16, 0) -+RELOC_TYPE (GOT_LO16, 0) -+RELOC_TYPE (SUB, 0) -+RELOC_TYPE (INSERT_A, 0) -+RELOC_TYPE (INSERT_B, 0) -+RELOC_TYPE (DELETE, 0) -+RELOC_TYPE (HIGHER, 0) -+RELOC_TYPE (HIGHEST, 0) -+RELOC_TYPE (CALL_HI16, 0) -+RELOC_TYPE (CALL_LO16, 0) -+RELOC_TYPE (SCN_DISP, 0) -+RELOC_TYPE (REL16, 0) -+RELOC_TYPE (ADD_IMMEDIATE, 0) -+RELOC_TYPE (PJUMP, 0) -+RELOC_TYPE (RELGOT, 0) -+RELOC_TYPE (JALR, 0) -+RELOC_TYPE (TLS_DTPMOD32, 0) -+RELOC_TYPE (TLS_DTPREL32, 0) -+RELOC_TYPE (TLS_DTPMOD64, 0) -+RELOC_TYPE (TLS_DTPREL64, 0) -+RELOC_TYPE (TLS_GD, 0) -+RELOC_TYPE (TLS_LDM, 0) -+RELOC_TYPE (TLS_DTPREL_HI16, 0) -+RELOC_TYPE (TLS_DTPREL_LO16, 0) -+RELOC_TYPE (TLS_GOTTPREL, 0) -+RELOC_TYPE (TLS_TPREL32, 0) -+RELOC_TYPE (TLS_TPREL64, 0) -+RELOC_TYPE (TLS_TPREL_HI16, 0) -+RELOC_TYPE (TLS_TPREL_LO16, 0) -+ -+#define NO_COPY_RELOC 1 -+#define NO_RELATIVE_RELOC 1 -Index: b/backends/mips_retval.c -=================================================================== ---- /dev/null -+++ b/backends/mips_retval.c -@@ -0,0 +1,321 @@ -+/* Function return value location for Linux/mips ABI. -+ Copyright (C) 2005 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include "../libebl/libeblP.h" -+#include "../libdw/libdwP.h" -+ -+#define BACKEND mips_ -+#include "libebl_CPU.h" -+ -+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */ -+#define EF_MIPS_ABI 0x0000F000 -+ -+/* The original o32 abi. */ -+#define E_MIPS_ABI_O32 0x00001000 -+ -+/* O32 extended to work on 64 bit architectures */ -+#define E_MIPS_ABI_O64 0x00002000 -+ -+/* EABI in 32 bit mode */ -+#define E_MIPS_ABI_EABI32 0x00003000 -+ -+/* EABI in 64 bit mode */ -+#define E_MIPS_ABI_EABI64 0x00004000 -+ -+/* All the possible MIPS ABIs. */ -+enum mips_abi -+ { -+ MIPS_ABI_UNKNOWN = 0, -+ MIPS_ABI_N32, -+ MIPS_ABI_O32, -+ MIPS_ABI_N64, -+ MIPS_ABI_O64, -+ MIPS_ABI_EABI32, -+ MIPS_ABI_EABI64, -+ MIPS_ABI_LAST -+ }; -+ -+/* Find the mips ABI of the current file */ -+enum mips_abi find_mips_abi(Elf *elf) -+{ -+ GElf_Ehdr ehdr_mem; -+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); -+ -+ if (ehdr == NULL) -+ return MIPS_ABI_LAST; -+ -+ GElf_Word elf_flags = ehdr->e_flags; -+ -+ /* Check elf_flags to see if it specifies the ABI being used. */ -+ switch ((elf_flags & EF_MIPS_ABI)) -+ { -+ case E_MIPS_ABI_O32: -+ return MIPS_ABI_O32; -+ case E_MIPS_ABI_O64: -+ return MIPS_ABI_O64; -+ case E_MIPS_ABI_EABI32: -+ return MIPS_ABI_EABI32; -+ case E_MIPS_ABI_EABI64: -+ return MIPS_ABI_EABI64; -+ default: -+ if ((elf_flags & EF_MIPS_ABI2)) -+ return MIPS_ABI_N32; -+ } -+ -+ /* GCC creates a pseudo-section whose name describes the ABI. */ -+ size_t shstrndx; -+ if (elf_getshdrstrndx (elf, &shstrndx) < 0) -+ return MIPS_ABI_LAST; -+ -+ const char *name; -+ Elf_Scn *scn = NULL; -+ while ((scn = elf_nextscn (elf, scn)) != NULL) -+ { -+ GElf_Shdr shdr_mem; -+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); -+ if (shdr == NULL) -+ return MIPS_ABI_LAST; -+ -+ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: ""; -+ if (strncmp (name, ".mdebug.", 8) != 0) -+ continue; -+ -+ if (strcmp (name, ".mdebug.abi32") == 0) -+ return MIPS_ABI_O32; -+ else if (strcmp (name, ".mdebug.abiN32") == 0) -+ return MIPS_ABI_N32; -+ else if (strcmp (name, ".mdebug.abi64") == 0) -+ return MIPS_ABI_N64; -+ else if (strcmp (name, ".mdebug.abiO64") == 0) -+ return MIPS_ABI_O64; -+ else if (strcmp (name, ".mdebug.eabi32") == 0) -+ return MIPS_ABI_EABI32; -+ else if (strcmp (name, ".mdebug.eabi64") == 0) -+ return MIPS_ABI_EABI64; -+ else -+ return MIPS_ABI_UNKNOWN; -+ } -+ -+ return MIPS_ABI_UNKNOWN; -+} -+ -+unsigned int -+mips_abi_regsize (enum mips_abi abi) -+{ -+ switch (abi) -+ { -+ case MIPS_ABI_EABI32: -+ case MIPS_ABI_O32: -+ return 4; -+ case MIPS_ABI_N32: -+ case MIPS_ABI_N64: -+ case MIPS_ABI_O64: -+ case MIPS_ABI_EABI64: -+ return 8; -+ case MIPS_ABI_UNKNOWN: -+ case MIPS_ABI_LAST: -+ default: -+ return 0; -+ } -+} -+ -+ -+/* $v0 or pair $v0, $v1 */ -+static const Dwarf_Op loc_intreg_o32[] = -+ { -+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 }, -+ }; -+ -+static const Dwarf_Op loc_intreg[] = -+ { -+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 }, -+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 }, -+ }; -+#define nloc_intreg 1 -+#define nloc_intregpair 4 -+ -+/* $f0 (float), or pair $f0, $f1 (double). -+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */ -+static const Dwarf_Op loc_fpreg_o32[] = -+ { -+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 }, -+ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 }, -+ }; -+ -+/* $f0, or pair $f0, $f2. */ -+static const Dwarf_Op loc_fpreg[] = -+ { -+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 }, -+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 }, -+ }; -+#define nloc_fpreg 1 -+#define nloc_fpregpair 4 -+#define nloc_fpregquad 8 -+ -+/* The return value is a structure and is actually stored in stack space -+ passed in a hidden argument by the caller. But, the compiler -+ helpfully returns the address of that space in $v0. */ -+static const Dwarf_Op loc_aggregate[] = -+ { -+ { .atom = DW_OP_breg2, .number = 0 } -+ }; -+#define nloc_aggregate 1 -+ -+int -+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) -+{ -+ /* First find the ABI used by the elf object */ -+ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf); -+ -+ /* Something went seriously wrong while trying to figure out the ABI */ -+ if (abi == MIPS_ABI_LAST) -+ return -1; -+ -+ /* We couldn't identify the ABI, but the file seems valid */ -+ if (abi == MIPS_ABI_UNKNOWN) -+ return -2; -+ -+ /* Can't handle EABI variants */ -+ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64)) -+ return -2; -+ -+ unsigned int regsize = mips_abi_regsize (abi); -+ if (!regsize) -+ return -2; -+ -+ /* Start with the function's type, and get the DW_AT_type attribute, -+ which is the type of the return value. */ -+ -+ Dwarf_Attribute attr_mem; -+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem); -+ if (attr == NULL) -+ /* The function has no return value, like a `void' function in C. */ -+ return 0; -+ -+ Dwarf_Die die_mem; -+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem); -+ int tag = dwarf_tag (typedie); -+ -+ /* Follow typedefs and qualifiers to get to the actual type. */ -+ while (tag == DW_TAG_typedef -+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type -+ || tag == DW_TAG_restrict_type) -+ { -+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); -+ typedie = dwarf_formref_die (attr, &die_mem); -+ tag = dwarf_tag (typedie); -+ } -+ -+ switch (tag) -+ { -+ case -1: -+ return -1; -+ -+ case DW_TAG_subrange_type: -+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size)) -+ { -+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); -+ typedie = dwarf_formref_die (attr, &die_mem); -+ tag = dwarf_tag (typedie); -+ } -+ /* Fall through. */ -+ -+ case DW_TAG_base_type: -+ case DW_TAG_enumeration_type: -+ case DW_TAG_pointer_type: -+ case DW_TAG_ptr_to_member_type: -+ { -+ Dwarf_Word size; -+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, -+ &attr_mem), &size) != 0) -+ { -+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type) -+ size = regsize; -+ else -+ return -1; -+ } -+ if (tag == DW_TAG_base_type) -+ { -+ Dwarf_Word encoding; -+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, -+ &attr_mem), &encoding) != 0) -+ return -1; -+ -+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc)) -+ -+ if (encoding == DW_ATE_float) -+ { -+ *locp = ABI_LOC(loc_fpreg, regsize); -+ if (size <= regsize) -+ return nloc_fpreg; -+ -+ if (size <= 2*regsize) -+ return nloc_fpregpair; -+ -+ if (size <= 4*regsize && abi == MIPS_ABI_O32) -+ return nloc_fpregquad; -+ -+ goto aggregate; -+ } -+ } -+ *locp = ABI_LOC(loc_intreg, regsize); -+ if (size <= regsize) -+ return nloc_intreg; -+ if (size <= 2*regsize) -+ return nloc_intregpair; -+ -+ /* Else fall through. Shouldn't happen though (at least with gcc) */ -+ } -+ -+ case DW_TAG_structure_type: -+ case DW_TAG_class_type: -+ case DW_TAG_union_type: -+ case DW_TAG_array_type: -+ aggregate: -+ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */ -+ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64)) -+ return -2; -+ -+ *locp = loc_aggregate; -+ return nloc_aggregate; -+ } -+ -+ /* XXX We don't have a good way to return specific errors from ebl calls. -+ This value means we do not understand the type, but it is well-formed -+ DWARF and might be valid. */ -+ return -2; -+} -Index: b/backends/mips_symbol.c -=================================================================== ---- /dev/null -+++ b/backends/mips_symbol.c -@@ -0,0 +1,52 @@ -+/* MIPS specific symbolic name handling. -+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc. -+ This file is part of Red Hat elfutils. -+ Written by Jakub Jelinek , 2002. -+ -+ Red Hat elfutils is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by the -+ Free Software Foundation; version 2 of the License. -+ -+ Red Hat elfutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with Red Hat elfutils; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -+ -+ Red Hat elfutils is an included package of the Open Invention Network. -+ An included package of the Open Invention Network is a package for which -+ Open Invention Network licensees cross-license their patents. No patent -+ license is granted, either expressly or impliedly, by designation as an -+ included package. Should you wish to participate in the Open Invention -+ Network licensing program, please visit www.openinventionnetwork.com -+ . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+ -+#define BACKEND mips_ -+#include "libebl_CPU.h" -+ -+/* Check for the simple reloc types. */ -+Elf_Type -+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) -+{ -+ switch (type) -+ { -+ case R_MIPS_16: -+ return ELF_T_HALF; -+ case R_MIPS_32: -+ return ELF_T_WORD; -+ case R_MIPS_64: -+ return ELF_T_XWORD; -+ default: -+ return ELF_T_NUM; -+ } -+} -Index: b/libebl/eblopenbackend.c -=================================================================== ---- a/libebl/eblopenbackend.c -+++ b/libebl/eblopenbackend.c -@@ -71,6 +71,8 @@ static const struct - { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, - { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, - { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, -+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 }, -+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 }, - - { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, - { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, -Index: b/backends/Makefile.am -=================================================================== ---- a/backends/Makefile.am -+++ b/backends/Makefile.am -@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I - - - modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ -- tilegx m68k bpf parisc -+ tilegx m68k bpf parisc mips - libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ - libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ - libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ - libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ -- libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a -+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a - noinst_LIBRARIES = $(libebl_pic) - noinst_DATA = $(libebl_pic:_pic.a=.so) - -@@ -132,6 +132,10 @@ parisc_SRCS = parisc_init.c parisc_symbo - libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) - am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) - -+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c -+libebl_mips_pic_a_SOURCES = $(mips_SRCS) -+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) -+ - libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) - @rm -f $(@:.so=.map) - $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch deleted file mode 100644 index 790930cf3..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Kurt Roeckx -Subject: Make readelf -w output debug information on mips -Bug-Debian: http://bugs.debian.org/662041 -Forwarded: not-needed - -Upstreams wants a change where this is handled by a hook that needs -to be filled in by the backend for the arch. - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/src/readelf.c -=================================================================== ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -8343,7 +8343,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl * - GElf_Shdr shdr_mem; - GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); - -- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS) -+ if (shdr != NULL && ( -+ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF))) - { - static const struct - { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff deleted file mode 100644 index 3df35768b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff +++ /dev/null @@ -1,42 +0,0 @@ -On many architectures this test fails because binaries/libs produced by -binutils don't pass elflint. However elfutils shouldn't FTBFS because of this. - -So we run the tests on all archs to see what breaks, but if it breaks we ignore -the result (exitcode 77 means: this test was skipped). - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/tests/run-elflint-self.sh -=================================================================== ---- a/tests/run-elflint-self.sh -+++ b/tests/run-elflint-self.sh -@@ -18,4 +18,4 @@ - - . $srcdir/test-subr.sh - --testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld -+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld -Index: b/tests/test-subr.sh -=================================================================== ---- a/tests/test-subr.sh -+++ b/tests/test-subr.sh -@@ -152,3 +152,18 @@ testrun_on_self_quiet() - # Only exit if something failed - if test $exit_status != 0; then exit $exit_status; fi - } -+ -+# Same as testrun_on_self(), but skip on failure. -+testrun_on_self_skip() -+{ -+ exit_status=0 -+ -+ for file in $self_test_files; do -+ testrun $* $file \ -+ || { echo "*** failure in $* $file"; exit_status=77; } -+ done -+ -+ # Only exit if something failed -+ if test $exit_status != 0; then exit $exit_status; fi -+} -+ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch deleted file mode 100644 index b2623f9d2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch +++ /dev/null @@ -1,36 +0,0 @@ -GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through, -however this causes warnings (which are promoted to errors) with the elfutils -patches from Debian for mips and parisc, which use fallthrough's by design. - -Explicitly mark the intentional fallthrough switch cases with a comment to -disable the warnings where the fallthrough behaviour is desired. - -Upstream-Status: Pending [debian] -Signed-off-by: Joshua Lock - -Index: elfutils-0.168/backends/parisc_retval.c -=================================================================== ---- elfutils-0.168.orig/backends/parisc_retval.c -+++ elfutils-0.168/backends/parisc_retval.c -@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die - return nloc_intregpair; - - /* Else fall through. */ -- } -+ } // fallthrough - - case DW_TAG_structure_type: - case DW_TAG_class_type: -Index: elfutils-0.168/backends/mips_retval.c -=================================================================== ---- elfutils-0.168.orig/backends/mips_retval.c -+++ elfutils-0.168/backends/mips_retval.c -@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f - else - return nloc_intregpair; - } -- } -+ } // fallthrough - - /* Fallthrough to handle large types */ - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch deleted file mode 100644 index 5de3b24c8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch +++ /dev/null @@ -1,23 +0,0 @@ -For some binaries we can get a invalid section alignment, for example if -sh_align = 1 and sh_addralign is 0. In the case of a zero size section like -".note.GNU-stack", this is irrelavent as far as I can tell and we shouldn't -error in this case. - -RP 2014/6/11 - -Upstream-Status: Pending - -diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c ---- a/libelf/elf32_updatenull.c -+++ b/libelf/elf32_updatenull.c -@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) - we test for the alignment of the section being large - enough for the largest alignment required by a data - block. */ -- if (unlikely (! powerof2 (shdr->sh_addralign)) -- || unlikely ((shdr->sh_addralign ?: 1) < sh_align)) -+ if (shdr->sh_size && (unlikely (! powerof2 (shdr->sh_addralign)) -+ || unlikely ((shdr->sh_addralign ?: 1) < sh_align))) - { - __libelf_seterrno (ELF_E_INVALID_ALIGN); - return -1; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch deleted file mode 100644 index d31961f94..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix control path where we have str as uninitialized string - -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm': -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized] -| memcpy (buf + bufcnt, _str, _len); \ -| ^ -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here -| const char *str; - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: elfutils-0.164/libcpu/i386_disasm.c -=================================================================== ---- elfutils-0.164.orig/libcpu/i386_disasm.c -+++ elfutils-0.164/libcpu/i386_disasm.c -@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con - } - - default: -+ str = ""; - assert (! "INVALID not handled"); - } - } diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch deleted file mode 100644 index f861e8990..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch +++ /dev/null @@ -1,29 +0,0 @@ -Fix elf_cvt_gunhash if dest and src are same. - -Upstream-Status: Pending - -The 'dest' and 'src' can be same, we need to save the value of src32[2] -before swaping it. - -Signed-off-by: Baoshan Pang -diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h -index 6faf113..04d9ca1 100644 ---- a/libelf/gnuhash_xlate.h -+++ b/libelf/gnuhash_xlate.h -@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) - words. We must detangle them here. */ - Elf32_Word *dest32 = dest; - const Elf32_Word *src32 = src; -+ Elf32_Word save_src32_2 = src32[2]; // dest could be equal to src - - /* First four control words, 32 bits. */ - for (unsigned int cnt = 0; cnt < 4; ++cnt) -@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) - len -= 4; - } - -- Elf32_Word bitmask_words = encode ? src32[2] : dest32[2]; -+ Elf32_Word bitmask_words = encode ? save_src32_2 : dest32[2]; - - /* Now the 64 bit words. */ - Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch deleted file mode 100644 index d0cd3ed6f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch +++ /dev/null @@ -1,32 +0,0 @@ -Upstream-Status: Pending - -# This patch makes the link to the dependencies of libdw explicit, as recent -# ld no longer implicitly links them. See -# http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as -# a similar example of the error message you can encounter without this patch, -# and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and -# https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more -# details. - ---- elfutils-0.148.orig/src/Makefile.am -+++ elfutils-0.148/src/Makefile.am -@@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l - libelf = ../libelf/libelf.a - else - libasm = ../libasm/libasm.so --libdw = ../libdw/libdw.so -+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl - libelf = ../libelf/libelf.so - endif - libebl = ../libebl/libebl.a ---- elfutils-0.148.orig/tests/Makefile.am -+++ elfutils-0.148/tests/Makefile.am -@@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l - libelf = ../libelf/libelf.a - libasm = ../libasm/libasm.a - else --libdw = ../libdw/libdw.so -+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl - libelf = ../libelf/libelf.so - libasm = ../libasm/libasm.so - endif diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb deleted file mode 100644 index b977ce0ea..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb +++ /dev/null @@ -1,90 +0,0 @@ -SUMMARY = "Utilities and libraries for handling compiled object files" -HOMEPAGE = "https://sourceware.org/elfutils" -SECTION = "base" -LICENSE = "(GPLv3 & Elfutils-Exception)" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "libtool bzip2 zlib virtual/libintl" -DEPENDS_append_libc-musl = " argp-standalone fts " -SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2" -SRC_URI[md5sum] = "52adfa40758d0d39e5d5c57689bf38d6" -SRC_URI[sha256sum] = "b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276" - -SRC_URI += "\ - file://dso-link-change.patch \ - file://Fix_elf_cvt_gunhash.patch \ - file://fixheadercheck.patch \ - file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \ - file://0001-remove-the-unneed-checking.patch \ - file://0001-fix-a-stack-usage-warning.patch \ - file://aarch64_uio.patch \ - file://Fix_one_GCC7_warning.patch \ - file://shadow.patch \ -" - -# pick the patch from debian -# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz -SRC_URI += "\ - file://debian/hppa_backend.diff \ - file://debian/arm_backend.diff \ - file://debian/mips_backend.diff \ - file://debian/testsuite-ignore-elflint.diff \ - file://debian/mips_readelf_w.patch \ - file://debian/kfreebsd_path.patch \ - file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ - file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ - file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ - file://debian/hurd_path.patch \ - file://debian/ignore_strmerge.diff \ -" -# Fix the patches from Debian with GCC7 -SRC_URI += "file://fallthrough.patch" -SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch " - -# The buildsystem wants to generate 2 .h files from source using a binary it just built, -# which can not pass the cross compiling, so let's work around it by adding 2 .h files -# along with the do_configure_prepend() - -inherit autotools gettext - -EXTRA_OECONF = "--program-prefix=eu- --without-lzma" -EXTRA_OECONF_append_class-native = " --without-bzlib" -EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc" - -do_install_append() { - if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then - rm -f ${D}${bindir}/eu-objdump - fi -} - -# we can not build complete elfutils when using uclibc -# but some recipes e.g. gcc 4.5 depends on libelf so we -# build only libelf for uclibc case - -EXTRA_OEMAKE_libc-uclibc = "-C libelf" -EXTRA_OEMAKE_class-native = "" -EXTRA_OEMAKE_class-nativesdk = "" - -ALLOW_EMPTY_${PN}_libc-musl = "1" - -BBCLASSEXTEND = "native nativesdk" - -# Package utilities separately -PACKAGES =+ "${PN}-binutils libelf libasm libdw" -FILES_${PN}-binutils = "\ - ${bindir}/eu-addr2line \ - ${bindir}/eu-ld \ - ${bindir}/eu-nm \ - ${bindir}/eu-readelf \ - ${bindir}/eu-size \ - ${bindir}/eu-strip" - -FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" -FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" -FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" -# Some packages have the version preceeding the .so instead properly -# versioned .so., so we need to reorder and repackage. -#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" -#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" - -# The package contains symlinks that trip up insane -INSANE_SKIP_${MLPREFIX}libdw = "dev-so" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb new file mode 100644 index 000000000..3b81e287b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb @@ -0,0 +1,79 @@ +SUMMARY = "Utilities and libraries for handling compiled object files" +HOMEPAGE = "https://sourceware.org/elfutils" +SECTION = "base" +LICENSE = "(GPLv3 & Elfutils-Exception)" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +DEPENDS = "libtool bzip2 zlib virtual/libintl" +DEPENDS_append_libc-musl = " argp-standalone fts " +SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2" +SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5" +SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066" + +SRC_URI += "\ + file://0001-dso-link-change.patch \ + file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ + file://0003-fixheadercheck.patch \ + file://0004-Disable-the-test-to-convert-euc-jp.patch \ + file://0005-fix-a-stack-usage-warning.patch \ + file://0006-Fix-build-on-aarch64-musl.patch \ + file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ + file://0001-libasm-may-link-with-libbz2-if-found.patch \ +" +SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch" + +# Pick patches from debian +# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz +SRC_URI += "\ + file://debian/hppa_backend.diff \ + file://debian/arm_backend.diff \ + file://debian/mips_backend.patch \ + file://debian/mips_readelf_w.patch \ + file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ + file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ + file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ +" +# Fix the patches from Debian with GCC7 +SRC_URI += "file://debian/fallthrough.patch" + +# The buildsystem wants to generate 2 .h files from source using a binary it just built, +# which can not pass the cross compiling, so let's work around it by adding 2 .h files +# along with the do_configure_prepend() + +inherit autotools gettext + +EXTRA_OECONF = "--program-prefix=eu- --without-lzma" +EXTRA_OECONF_append_class-native = " --without-bzlib" + +do_install_append() { + if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then + rm -f ${D}${bindir}/eu-objdump + fi +} + +EXTRA_OEMAKE_class-native = "" +EXTRA_OEMAKE_class-nativesdk = "" + +ALLOW_EMPTY_${PN}_libc-musl = "1" + +BBCLASSEXTEND = "native nativesdk" + +# Package utilities separately +PACKAGES =+ "${PN}-binutils libelf libasm libdw" +FILES_${PN}-binutils = "\ + ${bindir}/eu-addr2line \ + ${bindir}/eu-ld \ + ${bindir}/eu-nm \ + ${bindir}/eu-readelf \ + ${bindir}/eu-size \ + ${bindir}/eu-strip" + +FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" +FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" +FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" +# Some packages have the version preceeding the .so instead properly +# versioned .so., so we need to reorder and repackage. +#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" +#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" + +# The package contains symlinks that trip up insane +INSANE_SKIP_${MLPREFIX}libdw = "dev-so" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch new file mode 100644 index 000000000..28c57f236 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch @@ -0,0 +1,52 @@ +From 0a69a26c9f7487daca900db87cd1195857a4603f Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:10:57 +0800 +Subject: [PATCH 1/7] dso link change + +Upstream-Status: Pending + +This patch makes the link to the dependencies of libdw explicit, as +recent ld no longer implicitly links them. See +http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html +as a similar example of the error message you can encounter without this +patch, and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and +https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for +more details. + +Rebase to 0.170 + +Signed-off-by: Hongxu Jia +--- + src/Makefile.am | 2 +- + tests/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 2b1c0dc..9305b84 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.a -lz + else + libasm = ../libasm/libasm.so +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + endif + libebl = ../libebl/libebl.a +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 3735084..528615d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -400,7 +400,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.a -lz + libasm = ../libasm/libasm.a + else +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + libasm = ../libasm/libasm.so + endif +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch new file mode 100644 index 000000000..fb0b060b4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch @@ -0,0 +1,39 @@ +From 7672e363468271b4c63ff58770c5aac15ab8f722 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 Oct 2017 22:30:46 -0700 +Subject: [PATCH] libasm may link with libbz2 if found + +This can fail to link binaries like objdump +where indirect libraries may be not found by linker + +| /mnt/a/oe/build/tmp/work/riscv64-bec-linux/elfutils/0.170-r0/recipe-sysroot/usr/lib/libbz2.so.1: error adding symbols: DSO missing from command line +| collect2: error: ld returned 1 exit status + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + src/Makefile.am | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index e03bc32..9b7e853 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -39,11 +39,11 @@ EXTRA_DIST += make-debug-archive.in + CLEANFILES += make-debug-archive + + if BUILD_STATIC +-libasm = ../libasm/libasm.a ++libasm = ../libasm/libasm.a $(zip_LIBS) + libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.a -lz + else +-libasm = ../libasm/libasm.so ++libasm = ../libasm/libasm.so $(zip_LIBS) + libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + endif +-- +2.14.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch new file mode 100644 index 000000000..2f718eb82 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch @@ -0,0 +1,42 @@ +From e98670f7c7b4c73fb65534949716fd8d043960d5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:13:59 +0800 +Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same. + +Upstream-Status: Pending + +The 'dest' and 'src' can be same, we need to save the value of src32[2] +before swaping it. + +Signed-off-by: Baoshan Pang + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + libelf/gnuhash_xlate.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h +index 6faf113..04d9ca1 100644 +--- a/libelf/gnuhash_xlate.h ++++ b/libelf/gnuhash_xlate.h +@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) + words. We must detangle them here. */ + Elf32_Word *dest32 = dest; + const Elf32_Word *src32 = src; ++ Elf32_Word save_src32_2 = src32[2]; // dest could be equal to src + + /* First four control words, 32 bits. */ + for (unsigned int cnt = 0; cnt < 4; ++cnt) +@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) + len -= 4; + } + +- Elf32_Word bitmask_words = encode ? src32[2] : dest32[2]; ++ Elf32_Word bitmask_words = encode ? save_src32_2 : dest32[2]; + + /* Now the 64 bit words. */ + Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch new file mode 100644 index 000000000..7c49fced1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch @@ -0,0 +1,40 @@ +From 565d5935abf5b58773f9c8385c00189221980d98 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:17:20 +0800 +Subject: [PATCH 3/7] fixheadercheck + +For some binaries we can get a invalid section alignment, for example if +sh_align = 1 and sh_addralign is 0. In the case of a zero size section +like +".note.GNU-stack", this is irrelavent as far as I can tell and we +shouldn't +error in this case. + +RP 2014/6/11 + +Upstream-Status: Pending + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + libelf/elf32_updatenull.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c +index d83c0b3..a51bf70 100644 +--- a/libelf/elf32_updatenull.c ++++ b/libelf/elf32_updatenull.c +@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) + we test for the alignment of the section being large + enough for the largest alignment required by a data + block. */ +- if (unlikely (! powerof2 (shdr->sh_addralign)) +- || unlikely ((shdr->sh_addralign ?: 1) < sh_align)) ++ if (shdr->sh_size && (unlikely (! powerof2 (shdr->sh_addralign)) ++ || unlikely ((shdr->sh_addralign ?: 1) < sh_align))) + { + __libelf_seterrno (ELF_E_INVALID_ALIGN); + return -1; +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch new file mode 100644 index 000000000..d893ad68f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch @@ -0,0 +1,44 @@ +From bb7ed11950101798aae82f7fda8b3dcb05f755c5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:24:06 +0800 +Subject: [PATCH 4/7] Disable the test to convert euc-jp + +Remove the test "Test against HP-UX 11.11 bug: +No converter from EUC-JP to UTF-8 is provided" +since we don't support HP-UX and if the euc-jp is not +installed on the host, the dependence will be built without +iconv support and will cause guild-native building fail. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Roy Li + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + m4/iconv.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/m4/iconv.m4 b/m4/iconv.m4 +index a503646..299f1eb 100644 +--- a/m4/iconv.m4 ++++ b/m4/iconv.m4 +@@ -159,6 +159,7 @@ int main () + } + } + #endif ++#if 0 + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ +@@ -170,6 +171,7 @@ int main () + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; ++#endif + return result; + }]])], + [am_cv_func_iconv_works=yes], +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch new file mode 100644 index 000000000..22a01cfa7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch @@ -0,0 +1,35 @@ +From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:25:16 +0800 +Subject: [PATCH 5/7] fix a stack-usage warning + +Upstream-Status: Pending + +not use a variable to as a array size, otherwise the warning to error +that +stack usage might be unbounded [-Werror=stack-usage=] will happen + +Signed-off-by: Roy Li + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + backends/ppc_initreg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c +index 69d623b..de41dec 100644 +--- a/backends/ppc_initreg.c ++++ b/backends/ppc_initreg.c +@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + return false; + } + const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); +- Dwarf_Word dwarf_regs[gprs]; ++ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)]; + for (unsigned gpr = 0; gpr < gprs; gpr++) + dwarf_regs[gpr] = user_regs.r.gpr[gpr]; + if (! setfunc (0, gprs, dwarf_regs, arg)) +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch new file mode 100644 index 000000000..5f29a0375 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch @@ -0,0 +1,61 @@ +From e57ad47fc8549353ca80c23b9b4f38f31fde13e5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:27:30 +0800 +Subject: [PATCH 6/7] Fix build on aarch64/musl + +Errors + +invalid operands to binary & (have 'long double' and 'unsigned int') + +error: redefinition + of 'struct iovec' + struct iovec { void *iov_base; size_t iov_len; }; + ^ +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + backends/aarch64_initreg.c | 4 ++-- + backends/arm_initreg.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c +index daf6f37..6445276 100644 +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -33,7 +33,7 @@ + #include "system.h" + #include + #if defined(__aarch64__) && defined(__linux__) +-# include ++# include + # include + # include + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ +@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + + Dwarf_Word dwarf_fregs[32]; + for (int r = 0; r < 32; r++) +- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; ++ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF; + + if (! setfunc (64, 32, dwarf_fregs, arg)) + return false; +diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c +index efcabaf..062bb9e 100644 +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -38,7 +38,7 @@ + #endif + + #ifdef __aarch64__ +-# include ++# include + # include + # include + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch new file mode 100644 index 000000000..224770478 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch @@ -0,0 +1,45 @@ +From 1e91c1d4e37c05cf95058b4b3c3f352d72886f58 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:31:38 +0800 +Subject: [PATCH 7/7] Fix control path where we have str as uninitialized + string + +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: +In function 'i386_disasm': +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: +error: 'str' may be used uninitialized in this function +[-Werror=maybe-uninitialized] +| memcpy (buf + bufcnt, _str, _len); \ +| ^ +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: +note: 'str' was declared here +| const char *str; + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Rebase to 0.170 + +Signed-off-by: Hongxu Jia +--- + libcpu/i386_disasm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c +index 831afbe..60fd6d4 100644 +--- a/libcpu/i386_disasm.c ++++ b/libcpu/i386_disasm.c +@@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)), + } + /* Fallthrough */ + default: ++ str = ""; + assert (! "INVALID not handled"); + } + } +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch new file mode 100644 index 000000000..8864d4436 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch @@ -0,0 +1,1031 @@ +From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 16 Aug 2017 10:06:26 +0800 +Subject: [PATCH] build: Provide alternatives for glibc assumptions helps + compiling it on musl + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Rebase to 0.170 + +Signed-off-by: Hongxu Jia +--- + Makefile.am | 2 +- + lib/color.c | 3 ++- + lib/fixedsizehash.h | 1 - + lib/system.h | 10 ++++++++++ + lib/xmalloc.c | 2 +- + libasm/asm_end.c | 2 +- + libasm/asm_newscn.c | 2 +- + libcpu/i386_gendis.c | 2 +- + libcpu/i386_lex.c | 2 +- + libcpu/i386_parse.c | 2 +- + libdw/Makefile.am | 3 ++- + libdw/libdw_alloc.c | 2 +- + libdwfl/dwfl_build_id_find_elf.c | 3 ++- + libdwfl/dwfl_error.c | 4 +++- + libdwfl/dwfl_module_getdwarf.c | 1 + + libdwfl/find-debuginfo.c | 2 +- + libdwfl/libdwfl_crc32_file.c | 9 +++++++++ + libdwfl/linux-kernel-modules.c | 1 + + libebl/eblopenbackend.c | 2 +- + libelf/elf.h | 8 ++++++-- + libelf/libelf.h | 1 + + libelf/libelfP.h | 1 + + src/addr2line.c | 2 +- + src/ar.c | 2 +- + src/arlib.c | 2 +- + src/arlib2.c | 2 +- + src/elfcmp.c | 2 +- + src/elflint.c | 2 +- + src/findtextrel.c | 2 +- + src/nm.c | 2 +- + src/objdump.c | 2 +- + src/ranlib.c | 2 +- + src/readelf.c | 2 +- + src/size.c | 2 +- + src/stack.c | 2 +- + src/strings.c | 2 +- + src/strip.c | 2 +- + src/unstrip.c | 2 +- + tests/addrscopes.c | 2 +- + tests/allregs.c | 2 +- + tests/backtrace-data.c | 2 +- + tests/backtrace-dwarf.c | 2 +- + tests/backtrace.c | 2 +- + tests/buildid.c | 2 +- + tests/debugaltlink.c | 2 +- + tests/debuglink.c | 2 +- + tests/deleted.c | 2 +- + tests/dwfl-addr-sect.c | 2 +- + tests/dwfl-bug-addr-overflow.c | 2 +- + tests/dwfl-bug-fd-leak.c | 2 +- + tests/dwfl-bug-getmodules.c | 2 +- + tests/dwfl-report-elf-align.c | 2 +- + tests/dwfllines.c | 2 +- + tests/dwflmodtest.c | 2 +- + tests/dwflsyms.c | 2 +- + tests/early-offscn.c | 2 +- + tests/ecp.c | 2 +- + tests/find-prologues.c | 2 +- + tests/funcretval.c | 2 +- + tests/funcscopes.c | 2 +- + tests/getsrc_die.c | 2 +- + tests/line2addr.c | 2 +- + tests/low_high_pc.c | 2 +- + tests/md5-sha1-test.c | 2 +- + tests/rdwrmmap.c | 2 +- + tests/saridx.c | 2 +- + tests/sectiondump.c | 2 +- + tests/varlocs.c | 2 +- + tests/vdsosyms.c | 2 +- + 69 files changed, 95 insertions(+), 64 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 2ff444e..41f77df 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h + + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ +- backends src po tests ++ backends po tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 +diff --git a/lib/color.c b/lib/color.c +index f62389d..a2a84b4 100644 +--- a/lib/color.c ++++ b/lib/color.c +@@ -32,13 +32,14 @@ + #endif + + #include +-#include ++#include + #include + #include + #include + #include + #include "libeu.h" + #include "color.h" ++#include "system.h" + + /* Prototype for option handler. */ + static error_t parse_opt (int key, char *arg, struct argp_state *state); +diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h +index dac2a5f..43016fc 100644 +--- a/lib/fixedsizehash.h ++++ b/lib/fixedsizehash.h +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + + #include + +diff --git a/lib/system.h b/lib/system.h +index 9203335..1a60131 100644 +--- a/lib/system.h ++++ b/lib/system.h +@@ -50,6 +50,16 @@ + #else + # error "Unknown byte order" + #endif ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ ++#define error(status, errno, ...) err(status, __VA_ARGS__) + + #ifndef MAX + #define MAX(m, n) ((m) < (n) ? (n) : (m)) +diff --git a/lib/xmalloc.c b/lib/xmalloc.c +index 0cde384..217b054 100644 +--- a/lib/xmalloc.c ++++ b/lib/xmalloc.c +@@ -30,7 +30,7 @@ + # include + #endif + +-#include ++#include + #include + #include + #include +diff --git a/libasm/asm_end.c b/libasm/asm_end.c +index ced24f5..4ad918c 100644 +--- a/libasm/asm_end.c ++++ b/libasm/asm_end.c +@@ -32,7 +32,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c +index ddbb25d..74a598d 100644 +--- a/libasm/asm_newscn.c ++++ b/libasm/asm_newscn.c +@@ -32,7 +32,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c +index aae5eae..6d76016 100644 +--- a/libcpu/i386_gendis.c ++++ b/libcpu/i386_gendis.c +@@ -31,7 +31,7 @@ + # include + #endif + +-#include ++#include + #include + #include + #include +diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c +index ba5f4aa..b1e4191 100644 +--- a/libcpu/i386_lex.c ++++ b/libcpu/i386_lex.c +@@ -577,7 +577,7 @@ char *i386_text; + #endif + + #include +-#include ++#include + #include + + #include +diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c +index ef1ac35..48f2e64 100644 +--- a/libcpu/i386_parse.c ++++ b/libcpu/i386_parse.c +@@ -107,7 +107,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/libdw/Makefile.am b/libdw/Makefile.am +index ff8c291..89e792a 100644 +--- a/libdw/Makefile.am ++++ b/libdw/Makefile.am +@@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) + libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ + ../libdwfl/libdwfl_pic.a ../libebl/libebl.a + libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so +-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) ++fts_LDADD = -lfts ++libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD) + libdw_so_SOURCES = + libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) + # The rpath is necessary for libebl because its $ORIGIN use will +diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c +index 28a8cf6..29aeb3f 100644 +--- a/libdw/libdw_alloc.c ++++ b/libdw/libdw_alloc.c +@@ -31,7 +31,7 @@ + # include + #endif + +-#include ++#include + #include + #include + #include "libdwP.h" +diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c +index ee0c164..b06ab59 100644 +--- a/libdwfl/dwfl_build_id_find_elf.c ++++ b/libdwfl/dwfl_build_id_find_elf.c +@@ -31,6 +31,7 @@ + #endif + + #include "libdwflP.h" ++#include "system.h" + #include + #include + #include +@@ -99,7 +100,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, + { + if (*file_name != NULL) + free (*file_name); +- *file_name = canonicalize_file_name (name); ++ *file_name = realpath (name, NULL); + if (*file_name == NULL) + { + *file_name = name; +diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c +index 7bcf61c..c345797 100644 +--- a/libdwfl/dwfl_error.c ++++ b/libdwfl/dwfl_error.c +@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) + const char * + dwfl_errmsg (int error) + { ++ static __thread char s[64] = ""; + if (error == 0 || error == -1) + { + int last_error = global_error; +@@ -154,7 +155,8 @@ dwfl_errmsg (int error) + switch (error &~ 0xffff) + { + case OTHER_ERROR (ERRNO): +- return strerror_r (error & 0xffff, "bad", 0); ++ strerror_r (error & 0xffff, s, sizeof(s)); ++ return s; + case OTHER_ERROR (LIBELF): + return elf_errmsg (error & 0xffff); + case OTHER_ERROR (LIBDW): +diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c +index 9775ace..511c4a6 100644 +--- a/libdwfl/dwfl_module_getdwarf.c ++++ b/libdwfl/dwfl_module_getdwarf.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include "system.h" + #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ + #include "../libelf/libelfP.h" + #include "system.h" +diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c +index 6d5a42a..9267788 100644 +--- a/libdwfl/find-debuginfo.c ++++ b/libdwfl/find-debuginfo.c +@@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, + /* If FILE_NAME is a symlink, the debug file might be associated + with the symlink target name instead. */ + +- char *canon = canonicalize_file_name (file_name); ++ char *canon = realpath (file_name, NULL); + if (canon != NULL && strcmp (file_name, canon)) + fd = find_debuginfo_in_path (mod, canon, + debuglink_file, debuglink_crc, +diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c +index f849128..6f0aca1 100644 +--- a/libdwfl/libdwfl_crc32_file.c ++++ b/libdwfl/libdwfl_crc32_file.c +@@ -29,6 +29,15 @@ + # include + #endif + ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + #define crc32_file attribute_hidden __libdwfl_crc32_file + #define crc32 __libdwfl_crc32 + #include +diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c +index 9d0fef2..9fc09b8 100644 +--- a/libdwfl/linux-kernel-modules.c ++++ b/libdwfl/linux-kernel-modules.c +@@ -40,6 +40,7 @@ + #include + + #include "libdwflP.h" ++#include "system.h" + #include + #include + #include +diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c +index 5371396..2e66dfd 100644 +--- a/libebl/eblopenbackend.c ++++ b/libebl/eblopenbackend.c +@@ -32,7 +32,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/libelf/elf.h b/libelf/elf.h +index 5cf2b93..990b3af 100644 +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -21,7 +21,9 @@ + + #include + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Standard ELF types. */ + +@@ -3705,6 +3707,8 @@ enum + #define R_BPF_NONE 0 /* No reloc */ + #define R_BPF_MAP_FD 1 /* Map fd to pointer */ + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* elf.h */ +diff --git a/libelf/libelf.h b/libelf/libelf.h +index 547c0f5..dd78799 100644 +--- a/libelf/libelf.h ++++ b/libelf/libelf.h +@@ -29,6 +29,7 @@ + #ifndef _LIBELF_H + #define _LIBELF_H 1 + ++#include + #include + #include + +diff --git a/libelf/libelfP.h b/libelf/libelfP.h +index 7ee6625..5840899 100644 +--- a/libelf/libelfP.h ++++ b/libelf/libelfP.h +@@ -32,6 +32,7 @@ + + #include + #include ++#include + + #include + #include +diff --git a/src/addr2line.c b/src/addr2line.c +index ba414a7..04b7116 100644 +--- a/src/addr2line.c ++++ b/src/addr2line.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/ar.c b/src/ar.c +index ec32cee..4efd729 100644 +--- a/src/ar.c ++++ b/src/ar.c +@@ -22,7 +22,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/arlib.c b/src/arlib.c +index e0839aa..1143658 100644 +--- a/src/arlib.c ++++ b/src/arlib.c +@@ -21,7 +21,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/src/arlib2.c b/src/arlib2.c +index 553fc57..46443d0 100644 +--- a/src/arlib2.c ++++ b/src/arlib2.c +@@ -20,7 +20,7 @@ + # include + #endif + +-#include ++#include + #include + #include + #include +diff --git a/src/elfcmp.c b/src/elfcmp.c +index 5046420..cff183f 100644 +--- a/src/elfcmp.c ++++ b/src/elfcmp.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/elflint.c b/src/elflint.c +index 51e53c2..da0b0dc 100644 +--- a/src/elflint.c ++++ b/src/elflint.c +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/findtextrel.c b/src/findtextrel.c +index 8f1e239..71463af 100644 +--- a/src/findtextrel.c ++++ b/src/findtextrel.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/nm.c b/src/nm.c +index 969c6d3..3113c04 100644 +--- a/src/nm.c ++++ b/src/nm.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/objdump.c b/src/objdump.c +index 860cfac..61e67bf 100644 +--- a/src/objdump.c ++++ b/src/objdump.c +@@ -21,7 +21,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/src/ranlib.c b/src/ranlib.c +index cc0ee23..ae851e4 100644 +--- a/src/ranlib.c ++++ b/src/ranlib.c +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/readelf.c b/src/readelf.c +index 346eccd..c831aa8 100644 +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/size.c b/src/size.c +index ad8dbcb..fd83be0 100644 +--- a/src/size.c ++++ b/src/size.c +@@ -21,7 +21,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/src/stack.c b/src/stack.c +index 6f2ff69..6da0243 100644 +--- a/src/stack.c ++++ b/src/stack.c +@@ -18,7 +18,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/strings.c b/src/strings.c +index d214356..76cb26b 100644 +--- a/src/strings.c ++++ b/src/strings.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/strip.c b/src/strip.c +index c7830ec..0d7f148 100644 +--- a/src/strip.c ++++ b/src/strip.c +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/unstrip.c b/src/unstrip.c +index 5074909..3d4f952 100644 +--- a/src/unstrip.c ++++ b/src/unstrip.c +@@ -31,7 +31,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/addrscopes.c b/tests/addrscopes.c +index 791569f..54f4311 100644 +--- a/tests/addrscopes.c ++++ b/tests/addrscopes.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + + +diff --git a/tests/allregs.c b/tests/allregs.c +index 286f7e3..c9de089 100644 +--- a/tests/allregs.c ++++ b/tests/allregs.c +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c +index a387d8f..955c27d 100644 +--- a/tests/backtrace-data.c ++++ b/tests/backtrace-data.c +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #if defined(__x86_64__) && defined(__linux__) +diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c +index 2dc8a9a..24ca7fb 100644 +--- a/tests/backtrace-dwarf.c ++++ b/tests/backtrace-dwarf.c +@@ -22,7 +22,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/backtrace.c b/tests/backtrace.c +index 21abe8a..d733248 100644 +--- a/tests/backtrace.c ++++ b/tests/backtrace.c +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #ifdef __linux__ +diff --git a/tests/buildid.c b/tests/buildid.c +index 87c1877..2953e6b 100644 +--- a/tests/buildid.c ++++ b/tests/buildid.c +@@ -23,7 +23,7 @@ + #include ELFUTILS_HEADER(elf) + #include ELFUTILS_HEADER(dwelf) + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c +index 6d97d50..ee7e559 100644 +--- a/tests/debugaltlink.c ++++ b/tests/debugaltlink.c +@@ -23,7 +23,7 @@ + #include ELFUTILS_HEADER(dw) + #include ELFUTILS_HEADER(dwelf) + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/debuglink.c b/tests/debuglink.c +index 935d102..741cb81 100644 +--- a/tests/debuglink.c ++++ b/tests/debuglink.c +@@ -21,7 +21,7 @@ + #include + #include ELFUTILS_HEADER(dwelf) + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/deleted.c b/tests/deleted.c +index 6be35bc..0190711 100644 +--- a/tests/deleted.c ++++ b/tests/deleted.c +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include + #ifdef __linux__ + #include +diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c +index 21e470a..1ea1e3b 100644 +--- a/tests/dwfl-addr-sect.c ++++ b/tests/dwfl-addr-sect.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include ELFUTILS_HEADER(dwfl) +diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c +index aa8030e..02c8bef 100644 +--- a/tests/dwfl-bug-addr-overflow.c ++++ b/tests/dwfl-bug-addr-overflow.c +@@ -20,7 +20,7 @@ + #include + #include + #include +-#include ++#include + #include + #include ELFUTILS_HEADER(dwfl) + +diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c +index 689cdd7..5973da3 100644 +--- a/tests/dwfl-bug-fd-leak.c ++++ b/tests/dwfl-bug-fd-leak.c +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c +index 1ee989f..fd62e65 100644 +--- a/tests/dwfl-bug-getmodules.c ++++ b/tests/dwfl-bug-getmodules.c +@@ -18,7 +18,7 @@ + #include + #include ELFUTILS_HEADER(dwfl) + +-#include ++#include + + static const Dwfl_Callbacks callbacks = + { +diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c +index a4e97d3..f471587 100644 +--- a/tests/dwfl-report-elf-align.c ++++ b/tests/dwfl-report-elf-align.c +@@ -20,7 +20,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/dwfllines.c b/tests/dwfllines.c +index 90379dd..cbdf6c4 100644 +--- a/tests/dwfllines.c ++++ b/tests/dwfllines.c +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include + + int + main (int argc, char *argv[]) +diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c +index 0027f96..e68d3bc 100644 +--- a/tests/dwflmodtest.c ++++ b/tests/dwflmodtest.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include ELFUTILS_HEADER(dwfl) +diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c +index 49ac334..cf07830 100644 +--- a/tests/dwflsyms.c ++++ b/tests/dwflsyms.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + + static const char * +diff --git a/tests/early-offscn.c b/tests/early-offscn.c +index 924cb9e..6f60d5a 100644 +--- a/tests/early-offscn.c ++++ b/tests/early-offscn.c +@@ -19,7 +19,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/ecp.c b/tests/ecp.c +index 38a6859..743cea5 100644 +--- a/tests/ecp.c ++++ b/tests/ecp.c +@@ -20,7 +20,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/find-prologues.c b/tests/find-prologues.c +index ba8ae37..76f5f04 100644 +--- a/tests/find-prologues.c ++++ b/tests/find-prologues.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tests/funcretval.c b/tests/funcretval.c +index 8d19d11..c8aaa93 100644 +--- a/tests/funcretval.c ++++ b/tests/funcretval.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tests/funcscopes.c b/tests/funcscopes.c +index 9c90185..dbccb89 100644 +--- a/tests/funcscopes.c ++++ b/tests/funcscopes.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c +index 055aede..9c394dd 100644 +--- a/tests/getsrc_die.c ++++ b/tests/getsrc_die.c +@@ -19,7 +19,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/line2addr.c b/tests/line2addr.c +index e0d65d3..9bf0023 100644 +--- a/tests/line2addr.c ++++ b/tests/line2addr.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + + + static void +diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c +index d0f4302..8da4fbd 100644 +--- a/tests/low_high_pc.c ++++ b/tests/low_high_pc.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c +index d50355e..3c41f40 100644 +--- a/tests/md5-sha1-test.c ++++ b/tests/md5-sha1-test.c +@@ -19,7 +19,7 @@ + #endif + + #include +-#include ++#include + + #include "md5.h" + #include "sha1.h" +diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c +index 6f027df..1ce5e6e 100644 +--- a/tests/rdwrmmap.c ++++ b/tests/rdwrmmap.c +@@ -19,7 +19,7 @@ + #endif + + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/saridx.c b/tests/saridx.c +index 8a450d8..b387801 100644 +--- a/tests/saridx.c ++++ b/tests/saridx.c +@@ -17,7 +17,7 @@ + + #include + +-#include ++#include + #include + #include + #include +diff --git a/tests/sectiondump.c b/tests/sectiondump.c +index 3033fed..8e888db 100644 +--- a/tests/sectiondump.c ++++ b/tests/sectiondump.c +@@ -18,7 +18,7 @@ + #include + + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/varlocs.c b/tests/varlocs.c +index c3fba89..e043ea2 100644 +--- a/tests/varlocs.c ++++ b/tests/varlocs.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c +index b876c10..afb2823 100644 +--- a/tests/vdsosyms.c ++++ b/tests/vdsosyms.c +@@ -18,7 +18,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch new file mode 100644 index 000000000..e0291b4cf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch @@ -0,0 +1,35 @@ +From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Mon, 5 Jan 2015 15:16:58 +0000 +Subject: [PATCH 1/3] Ignore differences between mips machine identifiers + +Little endian binaries actually use EM_MIPS so you can't tell the endianness +from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the +kernel will not load binaries containing it). + +Signed-off-by: James Cowgill + +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia + +--- + backends/mips_init.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +Index: b/backends/mips_init.c +=================================================================== +--- a/backends/mips_init.c ++++ b/backends/mips_init.c +@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus + return NULL; + + /* We handle it. */ +- if (machine == EM_MIPS) +- eh->name = "MIPS R3000 big-endian"; +- else if (machine == EM_MIPS_RS3_LE) +- eh->name = "MIPS R3000 little-endian"; +- ++ eh->name = "MIPS"; + mips_init_reloc (eh); + HOOK (eh, reloc_simple_type); + HOOK (eh, return_value_location); diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch new file mode 100644 index 000000000..b17498f5f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch @@ -0,0 +1,171 @@ +From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Mon, 5 Jan 2015 15:17:01 +0000 +Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c + +Signed-off-by: James Cowgill + +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia +--- + backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 94 insertions(+), 10 deletions(-) + +diff --git a/backends/mips_retval.c b/backends/mips_retval.c +index 33f12a7..d5c6ef0 100644 +--- a/backends/mips_retval.c ++++ b/backends/mips_retval.c +@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf) + default: + if ((elf_flags & EF_MIPS_ABI2)) + return MIPS_ABI_N32; ++ else if ((ehdr->e_ident[EI_CLASS] == ELFCLASS64)) ++ return MIPS_ABI_N64; + } + + /* GCC creates a pseudo-section whose name describes the ABI. */ +@@ -195,6 +197,57 @@ static const Dwarf_Op loc_aggregate[] = + }; + #define nloc_aggregate 1 + ++/* Test if a struct member is a float */ ++static int is_float_child(Dwarf_Die *childdie) ++{ ++ /* Test if this is actually a struct member */ ++ if (dwarf_tag(childdie) != DW_TAG_member) ++ return 0; ++ ++ /* Get type of member */ ++ Dwarf_Attribute attr_mem; ++ Dwarf_Die child_type_mem; ++ Dwarf_Die *child_typedie = ++ dwarf_formref_die(dwarf_attr_integrate(childdie, ++ DW_AT_type, ++ &attr_mem), &child_type_mem); ++ ++ if (dwarf_tag(child_typedie) != DW_TAG_base_type) ++ return 0; ++ ++ /* Get base subtype */ ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (child_typedie, ++ DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return 0; ++ ++ return encoding == DW_ATE_float; ++} ++ ++/* Returns the number of fpregs which can be returned in the given struct */ ++static int get_struct_fpregs(Dwarf_Die *structtypedie) ++{ ++ Dwarf_Die child_mem; ++ int fpregs = 0; ++ ++ /* Get first structure member */ ++ if (dwarf_child(structtypedie, &child_mem) != 0) ++ return 0; ++ ++ do ++ { ++ /* Ensure this register is a float */ ++ if (!is_float_child(&child_mem)) ++ return 0; ++ ++ fpregs++; ++ } ++ while (dwarf_siblingof (&child_mem, &child_mem) == 0); ++ ++ return fpregs; ++} ++ + int + mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) + { +@@ -240,6 +293,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) + tag = dwarf_tag (typedie); + } + ++ Dwarf_Word size; + switch (tag) + { + case -1: +@@ -258,8 +312,6 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) + case DW_TAG_enumeration_type: + case DW_TAG_pointer_type: + case DW_TAG_ptr_to_member_type: +- { +- Dwarf_Word size; + if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, + &attr_mem), &size) != 0) + { +@@ -289,7 +341,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) + if (size <= 4*regsize && abi == MIPS_ABI_O32) + return nloc_fpregquad; + +- goto aggregate; ++ goto large; + } + } + *locp = ABI_LOC(loc_intreg, regsize); +@@ -298,18 +350,50 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) + if (size <= 2*regsize) + return nloc_intregpair; + +- /* Else fall through. Shouldn't happen though (at least with gcc) */ +- } ++ /* Else pass in memory. Shouldn't happen though (at least with gcc) */ ++ goto large; + + case DW_TAG_structure_type: + case DW_TAG_class_type: + case DW_TAG_union_type: +- case DW_TAG_array_type: +- aggregate: +- /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */ +- if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64)) +- return -2; ++ /* Handle special cases for structures <= 128 bytes in newer ABIs */ ++ if (abi == MIPS_ABI_EABI32 || abi == MIPS_ABI_EABI64 || ++ abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64) ++ { ++ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 16) ++ { ++ /* ++ * Special case in N64 / N32 - ++ * structures containing only floats are returned in fp regs. ++ * Everything else is returned in integer regs. ++ */ ++ if (tag != DW_TAG_union_type && ++ (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)) ++ { ++ int num_fpregs = get_struct_fpregs(typedie); ++ if (num_fpregs == 1 || num_fpregs == 2) ++ { ++ *locp = loc_fpreg; ++ if (num_fpregs == 1) ++ return nloc_fpreg; ++ else ++ return nloc_fpregpair; ++ } ++ } ++ ++ *locp = loc_intreg; ++ if (size <= 8) ++ return nloc_intreg; ++ else ++ return nloc_intregpair; ++ } ++ } ++ ++ /* Fallthrough to handle large types */ + ++ case DW_TAG_array_type: ++ large: ++ /* Return large structures in memory */ + *locp = loc_aggregate; + return nloc_aggregate; + } +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch new file mode 100644 index 000000000..2a5f8628d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch @@ -0,0 +1,229 @@ +From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Mon, 5 Jan 2015 15:17:02 +0000 +Subject: [PATCH 3/3] Add mips n64 relocation format hack + +MIPSEL N64 ELF files use a slightly different format for storing relocation +entries which is incompatible with the normal R_SYM / R_INFO macros. +To workaround this, we rearrange the bytes in the relocation's r_info field +when reading and writing the relocations. + +This patch also ensures that strip.c sets the correct value of e_machine +before manipulating relocations so that these changes take effect. + +Signed-off-by: James Cowgill + +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia +--- + libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- + libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- + libelf/gelf_update_rel.c | 20 +++++++++++++++++++- + libelf/gelf_update_rela.c | 20 +++++++++++++++++++- + src/strip.c | 17 +++++++++++++++++ + 5 files changed, 101 insertions(+), 6 deletions(-) + +Index: b/libelf/gelf_getrel.c +=================================================================== +--- a/libelf/gelf_getrel.c ++++ b/libelf/gelf_getrel.c +@@ -36,6 +36,7 @@ + + #include "libelfP.h" + ++#define EF_MIPS_ABI 0x0000F000 + + GElf_Rel * + gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) +@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE + result = NULL; + } + else +- result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], +- sizeof (Elf64_Rel)); ++ { ++ GElf_Ehdr hdr; ++ result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], ++ sizeof (Elf64_Rel)); ++ ++ if (gelf_getehdr(scn->elf, &hdr) != NULL && ++ hdr.e_ident[EI_DATA] == ELFDATA2LSB && ++ hdr.e_machine == EM_MIPS && ++ (hdr.e_flags & EF_MIPS_ABI) == 0) ++ { ++ /* ++ * The relocation format is mangled on MIPSEL N64 ++ * We'll adjust it so at least R_SYM will work on it ++ */ ++ GElf_Xword r_info = dst->r_info; ++ dst->r_info = (r_info << 32) | ++ ((r_info >> 8) & 0xFF000000) | ++ ((r_info >> 24) & 0x00FF0000) | ++ ((r_info >> 40) & 0x0000FF00) | ++ ((r_info >> 56) & 0x000000FF); ++ } ++ } + } + + rwlock_unlock (scn->elf->lock); +Index: b/libelf/gelf_getrela.c +=================================================================== +--- a/libelf/gelf_getrela.c ++++ b/libelf/gelf_getrela.c +@@ -36,6 +36,7 @@ + + #include "libelfP.h" + ++#define EF_MIPS_ABI 0x0000F000 + + GElf_Rela * + gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) +@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G + result = NULL; + } + else +- result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], +- sizeof (Elf64_Rela)); ++ { ++ GElf_Ehdr hdr; ++ result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], ++ sizeof (Elf64_Rela)); ++ ++ if (gelf_getehdr(scn->elf, &hdr) != NULL && ++ hdr.e_ident[EI_DATA] == ELFDATA2LSB && ++ hdr.e_machine == EM_MIPS && ++ (hdr.e_flags & EF_MIPS_ABI) == 0) ++ { ++ /* ++ * The relocation format is mangled on MIPSEL N64 ++ * We'll adjust it so at least R_SYM will work on it ++ */ ++ GElf_Xword r_info = dst->r_info; ++ dst->r_info = (r_info << 32) | ++ ((r_info >> 8) & 0xFF000000) | ++ ((r_info >> 24) & 0x00FF0000) | ++ ((r_info >> 40) & 0x0000FF00) | ++ ((r_info >> 56) & 0x000000FF); ++ } ++ } + } + + rwlock_unlock (scn->elf->lock); +Index: b/libelf/gelf_update_rel.c +=================================================================== +--- a/libelf/gelf_update_rel.c ++++ b/libelf/gelf_update_rel.c +@@ -36,6 +36,7 @@ + + #include "libelfP.h" + ++#define EF_MIPS_ABI 0x0000F000 + + int + gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) +@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, + } + else + { ++ GElf_Ehdr hdr; ++ GElf_Rel value = *src; ++ + /* Check whether we have to resize the data buffer. */ + if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) + { +@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, + goto out; + } + +- ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = *src; ++ if (gelf_getehdr(scn->elf, &hdr) != NULL && ++ hdr.e_ident[EI_DATA] == ELFDATA2LSB && ++ hdr.e_machine == EM_MIPS && ++ (hdr.e_flags & EF_MIPS_ABI) == 0) ++ { ++ /* Undo the MIPSEL N64 hack from gelf_getrel */ ++ GElf_Xword r_info = value.r_info; ++ value.r_info = (r_info >> 32) | ++ ((r_info << 8) & 0x000000FF00000000) | ++ ((r_info << 24) & 0x0000FF0000000000) | ++ ((r_info << 40) & 0x00FF000000000000) | ++ ((r_info << 56) & 0xFF00000000000000); ++ } ++ ++ ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = value; + } + + result = 1; +Index: b/libelf/gelf_update_rela.c +=================================================================== +--- a/libelf/gelf_update_rela.c ++++ b/libelf/gelf_update_rela.c +@@ -36,6 +36,7 @@ + + #include "libelfP.h" + ++#define EF_MIPS_ABI 0x0000F000 + + int + gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) +@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx + } + else + { ++ GElf_Ehdr hdr; ++ GElf_Rela value = *src; ++ + /* Check whether we have to resize the data buffer. */ + if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) + { +@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx + goto out; + } + +- ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = *src; ++ if (gelf_getehdr(scn->elf, &hdr) != NULL && ++ hdr.e_ident[EI_DATA] == ELFDATA2LSB && ++ hdr.e_machine == EM_MIPS && ++ (hdr.e_flags & EF_MIPS_ABI) == 0) ++ { ++ /* Undo the MIPSEL N64 hack from gelf_getrel */ ++ GElf_Xword r_info = value.r_info; ++ value.r_info = (r_info >> 32) | ++ ((r_info << 8) & 0x000000FF00000000) | ++ ((r_info << 24) & 0x0000FF0000000000) | ++ ((r_info << 40) & 0x00FF000000000000) | ++ ((r_info << 56) & 0xFF00000000000000); ++ } ++ ++ ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = value; + } + + result = 1; +Index: b/src/strip.c +=================================================================== +--- a/src/strip.c ++++ b/src/strip.c +@@ -532,6 +532,23 @@ handle_elf (int fd, Elf *elf, const char + goto fail; + } + ++ /* Copy identity part of the ELF header now */ ++ newehdr = gelf_getehdr (newelf, &newehdr_mem); ++ if (newehdr == NULL) ++ INTERNAL_ERROR (fname); ++ ++ memcpy (newehdr->e_ident, ehdr->e_ident, EI_NIDENT); ++ newehdr->e_type = ehdr->e_type; ++ newehdr->e_machine = ehdr->e_machine; ++ newehdr->e_version = ehdr->e_version; ++ ++ if (gelf_update_ehdr (newelf, newehdr) == 0) ++ { ++ error (0, 0, gettext ("%s: error while creating ELF header: %s"), ++ fname, elf_errmsg (-1)); ++ return 1; ++ } ++ + /* Copy over the old program header if needed. */ + if (ehdr->e_type != ET_REL) + for (cnt = 0; cnt < phnum; ++cnt) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff new file mode 100644 index 000000000..50f4b059e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff @@ -0,0 +1,603 @@ +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia + +Index: b/backends/arm_init.c +=================================================================== +--- a/backends/arm_init.c ++++ b/backends/arm_init.c +@@ -35,20 +35,31 @@ + #define RELOC_PREFIX R_ARM_ + #include "libebl_CPU.h" + ++#include "libebl_arm.h" ++ + /* This defines the common reloc hooks based on arm_reloc.def. */ + #include "common-reloc.c" + + + const char * +-arm_init (Elf *elf __attribute__ ((unused)), ++arm_init (Elf *elf, + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) + { ++ int soft_float = 0; ++ + /* Check whether the Elf_BH object has a sufficent size. */ + if (ehlen < sizeof (Ebl)) + return NULL; + ++ if (elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT)) ++ soft_float = 1; ++ } ++ + /* We handle it. */ + eh->name = "ARM"; + arm_init_reloc (eh); +@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse + HOOK (eh, core_note); + HOOK (eh, auxv_info); + HOOK (eh, check_object_attribute); +- HOOK (eh, return_value_location); ++ if (soft_float) ++ eh->return_value_location = arm_return_value_location_soft; ++ else ++ eh->return_value_location = arm_return_value_location_hard; + HOOK (eh, abi_cfi); + HOOK (eh, check_reloc_target_type); + HOOK (eh, symbol_type_name); +Index: b/backends/arm_regs.c +=================================================================== +--- a/backends/arm_regs.c ++++ b/backends/arm_regs.c +@@ -31,6 +31,7 @@ + #endif + + #include ++#include + #include + + #define BACKEND arm_ +@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_ + break; + + case 16 + 0 ... 16 + 7: ++ /* AADWARF says that there are no registers in that range, ++ * but gcc maps FPA registers here ++ */ + regno += 96 - 16; + /* Fall through. */ + case 96 + 0 ... 96 + 7: +@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_ + namelen = 2; + break; + ++ case 64 + 0 ... 64 + 9: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = regno - 64 + '0'; ++ namelen = 2; ++ break; ++ ++ case 64 + 10 ... 64 + 31: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = (regno - 64) / 10 + '0'; ++ name[2] = (regno - 64) % 10 + '0'; ++ namelen = 3; ++ break; ++ ++ case 104 + 0 ... 104 + 7: ++ /* XXX TODO: ++ * This can be either intel wireless MMX general purpose/control ++ * registers or xscale accumulator, which have different usage. ++ * We only have the intel wireless MMX here now. ++ * The name needs to be changed for the xscale accumulator too. */ ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 32; ++ memcpy(name, "wcgr", 4); ++ name[4] = regno - 104 + '0'; ++ namelen = 5; ++ break; ++ ++ case 112 + 0 ... 112 + 9: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = regno - 112 + '0'; ++ namelen = 3; ++ break; ++ ++ case 112 + 10 ... 112 + 15: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = '1'; ++ name[3] = regno - 112 - 10 + '0'; ++ namelen = 4; ++ break; ++ + case 128: ++ *setname = "state"; + *type = DW_ATE_unsigned; + return stpcpy (name, "spsr") + 1 - name; + ++ case 129: ++ *setname = "state"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_fiq") + 1 - name; ++ ++ case 130: ++ *setname = "state"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_irq") + 1 - name; ++ ++ case 131: ++ *setname = "state"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_abt") + 1 - name; ++ ++ case 132: ++ *setname = "state"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_und") + 1 - name; ++ ++ case 133: ++ *setname = "state"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_svc") + 1 - name; ++ ++ case 144 ... 150: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1; ++ ++ case 151 ... 157: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1; ++ ++ case 158 ... 159: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1; ++ ++ case 160 ... 161: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1; ++ ++ case 162 ... 163: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_und", regno - 162 + 13) + 1; ++ ++ case 164 ... 165: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1; ++ ++ case 192 ... 199: ++ *setname = "MMX"; ++ *bits = 32; ++ *type = DW_ATE_unsigned; ++ name[0] = 'w'; ++ name[1] = 'c'; ++ name[2] = regno - 192 + '0'; ++ namelen = 3; ++ break; ++ + case 256 + 0 ... 256 + 9: ++ /* XXX TODO: Neon also uses those registers and can contain ++ * both float and integers */ + *setname = "VFP"; + *type = DW_ATE_float; + *bits = 64; +Index: b/backends/arm_retval.c +=================================================================== +--- a/backends/arm_retval.c ++++ b/backends/arm_retval.c +@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = + #define nloc_intreg 1 + #define nloc_intregs(n) (2 * (n)) + ++/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_reg16 }, ++ }; ++#define nloc_fpreg 1 ++ + /* The return value is a structure and is actually stored in stack space + passed in a hidden argument by the caller. But, the compiler + helpfully returns the address of that space in r0. */ +@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] = + #define nloc_aggregate 1 + + +-int +-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++static int ++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, ++ int soft_float) + { + /* Start with the function's type, and get the DW_AT_type attribute, + which is the type of the return value. */ +@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu + else + return -1; + } ++ if (tag == DW_TAG_base_type) ++ { ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return -1; ++ ++ if ((encoding == DW_ATE_float) && !soft_float) ++ { ++ *locp = loc_fpreg; ++ if (size <= 8) ++ return nloc_fpreg; ++ goto aggregate; ++ } ++ } + if (size <= 16) + { + intreg: +@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu + } + + aggregate: ++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */ + *locp = loc_aggregate; + return nloc_aggregate; + } +@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu + DWARF and might be valid. */ + return -2; + } ++ ++/* return location for -mabi=apcs-gnu -msoft-float */ ++int ++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 1); ++} ++ ++/* return location for -mabi=apcs-gnu -mhard-float (current default) */ ++int ++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 0); ++} ++ +Index: b/libelf/elf.h +=================================================================== +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -2593,6 +2593,9 @@ enum + #define EF_ARM_EABI_VER4 0x04000000 + #define EF_ARM_EABI_VER5 0x05000000 + ++/* EI_OSABI values */ ++#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */ ++ + /* Additional symbol types for Thumb. */ + #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ + #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ +@@ -2610,12 +2613,19 @@ enum + + /* Processor specific values for the Phdr p_type field. */ + #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ ++#define PT_ARM_UNWIND PT_ARM_EXIDX + + /* Processor specific values for the Shdr sh_type field. */ + #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */ + #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */ + #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */ + ++/* Processor specific values for the Dyn d_tag field. */ ++#define DT_ARM_RESERVED1 (DT_LOPROC + 0) ++#define DT_ARM_SYMTABSZ (DT_LOPROC + 1) ++#define DT_ARM_PREEMTMAB (DT_LOPROC + 2) ++#define DT_ARM_RESERVED2 (DT_LOPROC + 3) ++#define DT_ARM_NUM 4 + + /* AArch64 relocs. */ + +@@ -2908,6 +2918,7 @@ enum + TLS block (LDR, STR). */ + #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative + to GOT origin (LDR). */ ++/* 112 - 127 private range */ + #define R_ARM_ME_TOO 128 /* Obsolete. */ + #define R_ARM_THM_TLS_DESCSEQ 129 + #define R_ARM_THM_TLS_DESCSEQ16 129 +Index: b/backends/libebl_arm.h +=================================================================== +--- /dev/null ++++ b/backends/libebl_arm.h +@@ -0,0 +1,9 @@ ++#ifndef _LIBEBL_ARM_H ++#define _LIBEBL_ARM_H 1 ++ ++#include ++ ++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); ++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); ++ ++#endif +Index: b/tests/run-allregs.sh +=================================================================== +--- a/tests/run-allregs.sh ++++ b/tests/run-allregs.sh +@@ -2672,7 +2672,28 @@ integer registers: + 13: sp (sp), address 32 bits + 14: lr (lr), address 32 bits + 15: pc (pc), address 32 bits +- 128: spsr (spsr), unsigned 32 bits ++ 144: r8_usr (r8_usr), signed 32 bits ++ 145: r9_usr (r9_usr), signed 32 bits ++ 146: r10_usr (r10_usr), signed 32 bits ++ 147: r11_usr (r11_usr), signed 32 bits ++ 148: r12_usr (r12_usr), signed 32 bits ++ 149: r13_usr (r13_usr), signed 32 bits ++ 150: r14_usr (r14_usr), signed 32 bits ++ 151: r8_fiq (r8_fiq), signed 32 bits ++ 152: r9_fiq (r9_fiq), signed 32 bits ++ 153: r10_fiq (r10_fiq), signed 32 bits ++ 154: r11_fiq (r11_fiq), signed 32 bits ++ 155: r12_fiq (r12_fiq), signed 32 bits ++ 156: r13_fiq (r13_fiq), signed 32 bits ++ 157: r14_fiq (r14_fiq), signed 32 bits ++ 158: r13_irq (r13_irq), signed 32 bits ++ 159: r14_irq (r14_irq), signed 32 bits ++ 160: r13_abt (r13_abt), signed 32 bits ++ 161: r14_abt (r14_abt), signed 32 bits ++ 162: r13_und (r13_und), signed 32 bits ++ 163: r14_und (r14_und), signed 32 bits ++ 164: r13_svc (r13_svc), signed 32 bits ++ 165: r14_svc (r14_svc), signed 32 bits + FPA registers: + 16: f0 (f0), float 96 bits + 17: f1 (f1), float 96 bits +@@ -2690,7 +2711,72 @@ FPA registers: + 101: f5 (f5), float 96 bits + 102: f6 (f6), float 96 bits + 103: f7 (f7), float 96 bits ++MMX registers: ++ 104: wcgr0 (wcgr0), unsigned 32 bits ++ 105: wcgr1 (wcgr1), unsigned 32 bits ++ 106: wcgr2 (wcgr2), unsigned 32 bits ++ 107: wcgr3 (wcgr3), unsigned 32 bits ++ 108: wcgr4 (wcgr4), unsigned 32 bits ++ 109: wcgr5 (wcgr5), unsigned 32 bits ++ 110: wcgr6 (wcgr6), unsigned 32 bits ++ 111: wcgr7 (wcgr7), unsigned 32 bits ++ 112: wr0 (wr0), unsigned 64 bits ++ 113: wr1 (wr1), unsigned 64 bits ++ 114: wr2 (wr2), unsigned 64 bits ++ 115: wr3 (wr3), unsigned 64 bits ++ 116: wr4 (wr4), unsigned 64 bits ++ 117: wr5 (wr5), unsigned 64 bits ++ 118: wr6 (wr6), unsigned 64 bits ++ 119: wr7 (wr7), unsigned 64 bits ++ 120: wr8 (wr8), unsigned 64 bits ++ 121: wr9 (wr9), unsigned 64 bits ++ 122: wr10 (wr10), unsigned 64 bits ++ 123: wr11 (wr11), unsigned 64 bits ++ 124: wr12 (wr12), unsigned 64 bits ++ 125: wr13 (wr13), unsigned 64 bits ++ 126: wr14 (wr14), unsigned 64 bits ++ 127: wr15 (wr15), unsigned 64 bits ++ 192: wc0 (wc0), unsigned 32 bits ++ 193: wc1 (wc1), unsigned 32 bits ++ 194: wc2 (wc2), unsigned 32 bits ++ 195: wc3 (wc3), unsigned 32 bits ++ 196: wc4 (wc4), unsigned 32 bits ++ 197: wc5 (wc5), unsigned 32 bits ++ 198: wc6 (wc6), unsigned 32 bits ++ 199: wc7 (wc7), unsigned 32 bits + VFP registers: ++ 64: s0 (s0), float 32 bits ++ 65: s1 (s1), float 32 bits ++ 66: s2 (s2), float 32 bits ++ 67: s3 (s3), float 32 bits ++ 68: s4 (s4), float 32 bits ++ 69: s5 (s5), float 32 bits ++ 70: s6 (s6), float 32 bits ++ 71: s7 (s7), float 32 bits ++ 72: s8 (s8), float 32 bits ++ 73: s9 (s9), float 32 bits ++ 74: s10 (s10), float 32 bits ++ 75: s11 (s11), float 32 bits ++ 76: s12 (s12), float 32 bits ++ 77: s13 (s13), float 32 bits ++ 78: s14 (s14), float 32 bits ++ 79: s15 (s15), float 32 bits ++ 80: s16 (s16), float 32 bits ++ 81: s17 (s17), float 32 bits ++ 82: s18 (s18), float 32 bits ++ 83: s19 (s19), float 32 bits ++ 84: s20 (s20), float 32 bits ++ 85: s21 (s21), float 32 bits ++ 86: s22 (s22), float 32 bits ++ 87: s23 (s23), float 32 bits ++ 88: s24 (s24), float 32 bits ++ 89: s25 (s25), float 32 bits ++ 90: s26 (s26), float 32 bits ++ 91: s27 (s27), float 32 bits ++ 92: s28 (s28), float 32 bits ++ 93: s29 (s29), float 32 bits ++ 94: s30 (s30), float 32 bits ++ 95: s31 (s31), float 32 bits + 256: d0 (d0), float 64 bits + 257: d1 (d1), float 64 bits + 258: d2 (d2), float 64 bits +@@ -2723,6 +2809,13 @@ VFP registers: + 285: d29 (d29), float 64 bits + 286: d30 (d30), float 64 bits + 287: d31 (d31), float 64 bits ++state registers: ++ 128: spsr (spsr), unsigned 32 bits ++ 129: spsr_fiq (spsr_fiq), unsigned 32 bits ++ 130: spsr_irq (spsr_irq), unsigned 32 bits ++ 131: spsr_abt (spsr_abt), unsigned 32 bits ++ 132: spsr_und (spsr_und), unsigned 32 bits ++ 133: spsr_svc (spsr_svc), unsigned 32 bits + EOF + + # See run-readelf-mixed-corenote.sh for instructions to regenerate +Index: b/tests/run-readelf-mixed-corenote.sh +=================================================================== +--- a/tests/run-readelf-mixed-corenote.sh ++++ b/tests/run-readelf-mixed-corenote.sh +@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27 + pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 + utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000 + orig_r0: -1, fpvalid: 1 +- r0: 1 r1: -1091672508 r2: -1091672500 +- r3: 0 r4: 0 r5: 0 +- r6: 33728 r7: 0 r8: 0 +- r9: 0 r10: -1225703496 r11: -1091672844 +- r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 +- pc: 0x00008500 spsr: 0x60000010 ++ r0: 1 r1: -1091672508 r2: -1091672500 r3: 0 ++ r4: 0 r5: 0 r6: 33728 r7: 0 ++ r8: 0 r9: 0 r10: -1225703496 r11: -1091672844 ++ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48 pc: 0x00008500 ++ spsr: 0x60000010 + CORE 124 PRPSINFO + state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 + uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 +Index: b/tests/run-addrcfi.sh +=================================================================== +--- a/tests/run-addrcfi.sh ++++ b/tests/run-addrcfi.sh +@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc + FPA reg21 (f5): undefined + FPA reg22 (f6): undefined + FPA reg23 (f7): undefined ++ VFP reg64 (s0): undefined ++ VFP reg65 (s1): undefined ++ VFP reg66 (s2): undefined ++ VFP reg67 (s3): undefined ++ VFP reg68 (s4): undefined ++ VFP reg69 (s5): undefined ++ VFP reg70 (s6): undefined ++ VFP reg71 (s7): undefined ++ VFP reg72 (s8): undefined ++ VFP reg73 (s9): undefined ++ VFP reg74 (s10): undefined ++ VFP reg75 (s11): undefined ++ VFP reg76 (s12): undefined ++ VFP reg77 (s13): undefined ++ VFP reg78 (s14): undefined ++ VFP reg79 (s15): undefined ++ VFP reg80 (s16): undefined ++ VFP reg81 (s17): undefined ++ VFP reg82 (s18): undefined ++ VFP reg83 (s19): undefined ++ VFP reg84 (s20): undefined ++ VFP reg85 (s21): undefined ++ VFP reg86 (s22): undefined ++ VFP reg87 (s23): undefined ++ VFP reg88 (s24): undefined ++ VFP reg89 (s25): undefined ++ VFP reg90 (s26): undefined ++ VFP reg91 (s27): undefined ++ VFP reg92 (s28): undefined ++ VFP reg93 (s29): undefined ++ VFP reg94 (s30): undefined ++ VFP reg95 (s31): undefined + FPA reg96 (f0): undefined + FPA reg97 (f1): undefined + FPA reg98 (f2): undefined +@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc + FPA reg101 (f5): undefined + FPA reg102 (f6): undefined + FPA reg103 (f7): undefined +- integer reg128 (spsr): undefined ++ MMX reg104 (wcgr0): undefined ++ MMX reg105 (wcgr1): undefined ++ MMX reg106 (wcgr2): undefined ++ MMX reg107 (wcgr3): undefined ++ MMX reg108 (wcgr4): undefined ++ MMX reg109 (wcgr5): undefined ++ MMX reg110 (wcgr6): undefined ++ MMX reg111 (wcgr7): undefined ++ MMX reg112 (wr0): undefined ++ MMX reg113 (wr1): undefined ++ MMX reg114 (wr2): undefined ++ MMX reg115 (wr3): undefined ++ MMX reg116 (wr4): undefined ++ MMX reg117 (wr5): undefined ++ MMX reg118 (wr6): undefined ++ MMX reg119 (wr7): undefined ++ MMX reg120 (wr8): undefined ++ MMX reg121 (wr9): undefined ++ MMX reg122 (wr10): undefined ++ MMX reg123 (wr11): undefined ++ MMX reg124 (wr12): undefined ++ MMX reg125 (wr13): undefined ++ MMX reg126 (wr14): undefined ++ MMX reg127 (wr15): undefined ++ state reg128 (spsr): undefined ++ state reg129 (spsr_fiq): undefined ++ state reg130 (spsr_irq): undefined ++ state reg131 (spsr_abt): undefined ++ state reg132 (spsr_und): undefined ++ state reg133 (spsr_svc): undefined ++ integer reg144 (r8_usr): undefined ++ integer reg145 (r9_usr): undefined ++ integer reg146 (r10_usr): undefined ++ integer reg147 (r11_usr): undefined ++ integer reg148 (r12_usr): undefined ++ integer reg149 (r13_usr): undefined ++ integer reg150 (r14_usr): undefined ++ integer reg151 (r8_fiq): undefined ++ integer reg152 (r9_fiq): undefined ++ integer reg153 (r10_fiq): undefined ++ integer reg154 (r11_fiq): undefined ++ integer reg155 (r12_fiq): undefined ++ integer reg156 (r13_fiq): undefined ++ integer reg157 (r14_fiq): undefined ++ integer reg158 (r13_irq): undefined ++ integer reg159 (r14_irq): undefined ++ integer reg160 (r13_abt): undefined ++ integer reg161 (r14_abt): undefined ++ integer reg162 (r13_und): undefined ++ integer reg163 (r14_und): undefined ++ integer reg164 (r13_svc): undefined ++ integer reg165 (r14_svc): undefined ++ MMX reg192 (wc0): undefined ++ MMX reg193 (wc1): undefined ++ MMX reg194 (wc2): undefined ++ MMX reg195 (wc3): undefined ++ MMX reg196 (wc4): undefined ++ MMX reg197 (wc5): undefined ++ MMX reg198 (wc6): undefined ++ MMX reg199 (wc7): undefined + VFP reg256 (d0): undefined + VFP reg257 (d1): undefined + VFP reg258 (d2): undefined diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch new file mode 100644 index 000000000..b2623f9d2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch @@ -0,0 +1,36 @@ +GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through, +however this causes warnings (which are promoted to errors) with the elfutils +patches from Debian for mips and parisc, which use fallthrough's by design. + +Explicitly mark the intentional fallthrough switch cases with a comment to +disable the warnings where the fallthrough behaviour is desired. + +Upstream-Status: Pending [debian] +Signed-off-by: Joshua Lock + +Index: elfutils-0.168/backends/parisc_retval.c +=================================================================== +--- elfutils-0.168.orig/backends/parisc_retval.c ++++ elfutils-0.168/backends/parisc_retval.c +@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die + return nloc_intregpair; + + /* Else fall through. */ +- } ++ } // fallthrough + + case DW_TAG_structure_type: + case DW_TAG_class_type: +Index: elfutils-0.168/backends/mips_retval.c +=================================================================== +--- elfutils-0.168.orig/backends/mips_retval.c ++++ elfutils-0.168/backends/mips_retval.c +@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f + else + return nloc_intregpair; + } +- } ++ } // fallthrough + + /* Fallthrough to handle large types */ + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff new file mode 100644 index 000000000..44fda7f30 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff @@ -0,0 +1,802 @@ +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia + +Index: b/backends/parisc_init.c +=================================================================== +--- /dev/null ++++ b/backends/parisc_init.c +@@ -0,0 +1,73 @@ ++/* Initialization of PA-RISC specific backend library. ++ Copyright (C) 2002, 2005, 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ Written by Ulrich Drepper , 2002. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#define BACKEND parisc_ ++#define RELOC_PREFIX R_PARISC_ ++#include "libebl_CPU.h" ++#include "libebl_parisc.h" ++ ++/* This defines the common reloc hooks based on parisc_reloc.def. */ ++#include "common-reloc.c" ++ ++ ++const char * ++parisc_init (Elf *elf __attribute__ ((unused)), ++ GElf_Half machine __attribute__ ((unused)), ++ Ebl *eh, ++ size_t ehlen) ++{ ++ int pa64 = 0; ++ ++ /* Check whether the Elf_BH object has a sufficent size. */ ++ if (ehlen < sizeof (Ebl)) ++ return NULL; ++ ++ if (elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE)) ++ pa64 = 1; ++ } ++ /* We handle it. */ ++ eh->name = "PA-RISC"; ++ parisc_init_reloc (eh); ++ HOOK (eh, reloc_simple_type); ++ HOOK (eh, machine_flag_check); ++ HOOK (eh, symbol_type_name); ++ HOOK (eh, segment_type_name); ++ HOOK (eh, section_type_name); ++ HOOK (eh, register_info); ++ if (pa64) ++ eh->return_value_location = parisc_return_value_location_64; ++ else ++ eh->return_value_location = parisc_return_value_location_32; ++ ++ return MODVERSION; ++} +Index: b/backends/parisc_regs.c +=================================================================== +--- /dev/null ++++ b/backends/parisc_regs.c +@@ -0,0 +1,159 @@ ++/* Register names and numbers for PA-RISC DWARF. ++ Copyright (C) 2005, 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND parisc_ ++#include "libebl_CPU.h" ++ ++ssize_t ++parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen, ++ const char **prefix, const char **setname, ++ int *bits, int *type) ++{ ++ int pa64 = 0; ++ ++ if (ebl->elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem); ++ if (ehdr->e_flags & EF_PARISC_WIDE) ++ pa64 = 1; ++ } ++ ++ int nregs = pa64 ? 127 : 128; ++ ++ if (name == NULL) ++ return nregs; ++ ++ if (regno < 0 || regno >= nregs || namelen < 6) ++ return -1; ++ ++ *prefix = "%"; ++ ++ if (regno < 32) ++ { ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ if (pa64) ++ { ++ *bits = 64; ++ } ++ else ++ { ++ *bits = 32; ++ } ++ } ++ else if (regno == 32) ++ { ++ *setname = "special"; ++ if (pa64) ++ { ++ *bits = 6; ++ } ++ else ++ { ++ *bits = 5; ++ } ++ *type = DW_ATE_unsigned; ++ } ++ else ++ { ++ *setname = "FPU"; ++ *type = DW_ATE_float; ++ if (pa64) ++ { ++ *bits = 64; ++ } ++ else ++ { ++ *bits = 32; ++ } ++ } ++ ++ if (regno < 33) { ++ switch (regno) ++ { ++ case 0 ... 9: ++ name[0] = 'r'; ++ name[1] = regno + '0'; ++ namelen = 2; ++ break; ++ case 10 ... 31: ++ name[0] = 'r'; ++ name[1] = regno / 10 + '0'; ++ name[2] = regno % 10 + '0'; ++ namelen = 3; ++ break; ++ case 32: ++ *prefix = NULL; ++ name[0] = 'S'; ++ name[1] = 'A'; ++ name[2] = 'R'; ++ namelen = 3; ++ break; ++ } ++ } ++ else { ++ if (pa64 && ((regno - 72) % 2)) { ++ *setname = NULL; ++ return 0; ++ } ++ ++ switch (regno) ++ { ++ case 72 + 0 ... 72 + 11: ++ name[0] = 'f'; ++ name[1] = 'r'; ++ name[2] = (regno + 8 - 72) / 2 + '0'; ++ namelen = 3; ++ if ((regno + 8 - 72) % 2) { ++ name[3] = 'R'; ++ namelen++; ++ } ++ break; ++ case 72 + 12 ... 72 + 55: ++ name[0] = 'f'; ++ name[1] = 'r'; ++ name[2] = (regno + 8 - 72) / 2 / 10 + '0'; ++ name[3] = (regno + 8 - 72) / 2 % 10 + '0'; ++ namelen = 4; ++ if ((regno + 8 - 72) % 2) { ++ name[4] = 'R'; ++ namelen++; ++ } ++ break; ++ default: ++ *setname = NULL; ++ return 0; ++ } ++ } ++ name[namelen++] = '\0'; ++ return namelen; ++} +Index: b/backends/parisc_reloc.def +=================================================================== +--- /dev/null ++++ b/backends/parisc_reloc.def +@@ -0,0 +1,128 @@ ++/* List the relocation types for PA-RISC. -*- C -*- ++ Copyright (C) 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++/* NAME, REL|EXEC|DYN */ ++ ++RELOC_TYPE (NONE, EXEC|DYN) ++RELOC_TYPE (DIR32, REL|EXEC|DYN) ++RELOC_TYPE (DIR21L, REL|EXEC|DYN) ++RELOC_TYPE (DIR17R, REL) ++RELOC_TYPE (DIR17F, REL) ++RELOC_TYPE (DIR14R, REL|DYN) ++RELOC_TYPE (PCREL32, REL) ++RELOC_TYPE (PCREL21L, REL) ++RELOC_TYPE (PCREL17R, REL) ++RELOC_TYPE (PCREL17F, REL) ++RELOC_TYPE (PCREL14R, REL|EXEC) ++RELOC_TYPE (DPREL21L, REL) ++RELOC_TYPE (DPREL14WR, REL) ++RELOC_TYPE (DPREL14DR, REL) ++RELOC_TYPE (DPREL14R, REL) ++RELOC_TYPE (GPREL21L, 0) ++RELOC_TYPE (GPREL14R, 0) ++RELOC_TYPE (LTOFF21L, REL) ++RELOC_TYPE (LTOFF14R, REL) ++RELOC_TYPE (DLTIND14F, 0) ++RELOC_TYPE (SETBASE, 0) ++RELOC_TYPE (SECREL32, REL) ++RELOC_TYPE (BASEREL21L, 0) ++RELOC_TYPE (BASEREL17R, 0) ++RELOC_TYPE (BASEREL14R, 0) ++RELOC_TYPE (SEGBASE, 0) ++RELOC_TYPE (SEGREL32, REL) ++RELOC_TYPE (PLTOFF21L, 0) ++RELOC_TYPE (PLTOFF14R, 0) ++RELOC_TYPE (PLTOFF14F, 0) ++RELOC_TYPE (LTOFF_FPTR32, 0) ++RELOC_TYPE (LTOFF_FPTR21L, 0) ++RELOC_TYPE (LTOFF_FPTR14R, 0) ++RELOC_TYPE (FPTR64, 0) ++RELOC_TYPE (PLABEL32, REL|DYN) ++RELOC_TYPE (PCREL64, 0) ++RELOC_TYPE (PCREL22C, 0) ++RELOC_TYPE (PCREL22F, 0) ++RELOC_TYPE (PCREL14WR, 0) ++RELOC_TYPE (PCREL14DR, 0) ++RELOC_TYPE (PCREL16F, 0) ++RELOC_TYPE (PCREL16WF, 0) ++RELOC_TYPE (PCREL16DF, 0) ++RELOC_TYPE (DIR64, REL|DYN) ++RELOC_TYPE (DIR14WR, REL) ++RELOC_TYPE (DIR14DR, REL) ++RELOC_TYPE (DIR16F, REL) ++RELOC_TYPE (DIR16WF, REL) ++RELOC_TYPE (DIR16DF, REL) ++RELOC_TYPE (GPREL64, 0) ++RELOC_TYPE (GPREL14WR, 0) ++RELOC_TYPE (GPREL14DR, 0) ++RELOC_TYPE (GPREL16F, 0) ++RELOC_TYPE (GPREL16WF, 0) ++RELOC_TYPE (GPREL16DF, 0) ++RELOC_TYPE (LTOFF64, 0) ++RELOC_TYPE (LTOFF14WR, 0) ++RELOC_TYPE (LTOFF14DR, 0) ++RELOC_TYPE (LTOFF16F, 0) ++RELOC_TYPE (LTOFF16WF, 0) ++RELOC_TYPE (LTOFF16DF, 0) ++RELOC_TYPE (SECREL64, 0) ++RELOC_TYPE (BASEREL14WR, 0) ++RELOC_TYPE (BASEREL14DR, 0) ++RELOC_TYPE (SEGREL64, 0) ++RELOC_TYPE (PLTOFF14WR, 0) ++RELOC_TYPE (PLTOFF14DR, 0) ++RELOC_TYPE (PLTOFF16F, 0) ++RELOC_TYPE (PLTOFF16WF, 0) ++RELOC_TYPE (PLTOFF16DF, 0) ++RELOC_TYPE (LTOFF_FPTR64, 0) ++RELOC_TYPE (LTOFF_FPTR14WR, 0) ++RELOC_TYPE (LTOFF_FPTR14DR, 0) ++RELOC_TYPE (LTOFF_FPTR16F, 0) ++RELOC_TYPE (LTOFF_FPTR16WF, 0) ++RELOC_TYPE (LTOFF_FPTR16DF, 0) ++RELOC_TYPE (COPY, EXEC) ++RELOC_TYPE (IPLT, EXEC|DYN) ++RELOC_TYPE (EPLT, 0) ++RELOC_TYPE (TPREL32, DYN) ++RELOC_TYPE (TPREL21L, 0) ++RELOC_TYPE (TPREL14R, 0) ++RELOC_TYPE (LTOFF_TP21L, 0) ++RELOC_TYPE (LTOFF_TP14R, 0) ++RELOC_TYPE (LTOFF_TP14F, 0) ++RELOC_TYPE (TPREL64, 0) ++RELOC_TYPE (TPREL14WR, 0) ++RELOC_TYPE (TPREL14DR, 0) ++RELOC_TYPE (TPREL16F, 0) ++RELOC_TYPE (TPREL16WF, 0) ++RELOC_TYPE (TPREL16DF, 0) ++RELOC_TYPE (LTOFF_TP64, 0) ++RELOC_TYPE (LTOFF_TP14WR, 0) ++RELOC_TYPE (LTOFF_TP14DR, 0) ++RELOC_TYPE (LTOFF_TP16F, 0) ++RELOC_TYPE (LTOFF_TP16WF, 0) ++RELOC_TYPE (LTOFF_TP16DF, 0) ++RELOC_TYPE (TLS_DTPMOD32, DYN) ++RELOC_TYPE (TLS_DTPMOD64, DYN) ++ ++#define NO_RELATIVE_RELOC 1 +Index: b/backends/parisc_retval.c +=================================================================== +--- /dev/null ++++ b/backends/parisc_retval.c +@@ -0,0 +1,213 @@ ++/* Function return value location for Linux/PA-RISC ABI. ++ Copyright (C) 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND parisc_ ++#include "libebl_CPU.h" ++#include "libebl_parisc.h" ++ ++/* %r28, or pair %r28, %r29. */ ++static const Dwarf_Op loc_intreg32[] = ++ { ++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++ ++static const Dwarf_Op loc_intreg[] = ++ { ++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 }, ++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 }, ++ }; ++#define nloc_intreg 1 ++#define nloc_intregpair 4 ++ ++/* %fr4L, or pair %fr4L, %fr4R on pa-32 */ ++static const Dwarf_Op loc_fpreg32[] = ++ { ++ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++#define nloc_fpreg32 2 ++#define nloc_fpregpair32 4 ++ ++/* $fr4 */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_regx, .number = 72 }, ++ }; ++#define nloc_fpreg 1 ++ ++#if 0 ++/* The return value is a structure and is actually stored in stack space ++ passed in a hidden argument by the caller. Address of the location is stored ++ in %r28 before function call, but it may be changed by function. */ ++static const Dwarf_Op loc_aggregate[] = ++ { ++ { .atom = DW_OP_breg28 }, ++ }; ++#define nloc_aggregate 1 ++#endif ++ ++static int ++parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64) ++{ ++ Dwarf_Word regsize = pa64 ? 8 : 4; ++ ++ /* Start with the function's type, and get the DW_AT_type attribute, ++ which is the type of the return value. */ ++ ++ Dwarf_Attribute attr_mem; ++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem); ++ if (attr == NULL) ++ /* The function has no return value, like a `void' function in C. */ ++ return 0; ++ ++ Dwarf_Die die_mem; ++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem); ++ int tag = dwarf_tag (typedie); ++ ++ /* Follow typedefs and qualifiers to get to the actual type. */ ++ while (tag == DW_TAG_typedef ++ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type ++ || tag == DW_TAG_restrict_type) ++ { ++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); ++ typedie = dwarf_formref_die (attr, &die_mem); ++ tag = dwarf_tag (typedie); ++ } ++ ++ switch (tag) ++ { ++ case -1: ++ return -1; ++ ++ case DW_TAG_subrange_type: ++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size)) ++ { ++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); ++ typedie = dwarf_formref_die (attr, &die_mem); ++ tag = dwarf_tag (typedie); ++ } ++ /* Fall through. */ ++ ++ case DW_TAG_base_type: ++ case DW_TAG_enumeration_type: ++ case DW_TAG_pointer_type: ++ case DW_TAG_ptr_to_member_type: ++ { ++ Dwarf_Word size; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, ++ &attr_mem), &size) != 0) ++ { ++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type) ++ size = 4; ++ else ++ return -1; ++ } ++ if (tag == DW_TAG_base_type) ++ { ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return -1; ++ ++ if (encoding == DW_ATE_float) ++ { ++ if (pa64) { ++ *locp = loc_fpreg; ++ if (size <= 8) ++ return nloc_fpreg; ++ } ++ else { ++ *locp = loc_fpreg32; ++ if (size <= 4) ++ return nloc_fpreg32; ++ else if (size <= 8) ++ return nloc_fpregpair32; ++ } ++ goto aggregate; ++ } ++ } ++ if (pa64) ++ *locp = loc_intreg; ++ else ++ *locp = loc_intreg32; ++ if (size <= regsize) ++ return nloc_intreg; ++ if (size <= 2 * regsize) ++ return nloc_intregpair; ++ ++ /* Else fall through. */ ++ } ++ ++ case DW_TAG_structure_type: ++ case DW_TAG_class_type: ++ case DW_TAG_union_type: ++ case DW_TAG_array_type: ++ aggregate: { ++ Dwarf_Word size; ++ if (dwarf_aggregate_size (typedie, &size) != 0) ++ return -1; ++ if (pa64) ++ *locp = loc_intreg; ++ else ++ *locp = loc_intreg32; ++ if (size <= regsize) ++ return nloc_intreg; ++ if (size <= 2 * regsize) ++ return nloc_intregpair; ++#if 0 ++ /* there should be some way to know this location... But I do not see it. */ ++ *locp = loc_aggregate; ++ return nloc_aggregate; ++#endif ++ /* fall through. */ ++ } ++ } ++ ++ /* XXX We don't have a good way to return specific errors from ebl calls. ++ This value means we do not understand the type, but it is well-formed ++ DWARF and might be valid. */ ++ return -2; ++} ++ ++int ++parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return parisc_return_value_location_ (functypedie, locp, 0); ++} ++ ++int ++parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return parisc_return_value_location_ (functypedie, locp, 1); ++} ++ +Index: b/backends/parisc_symbol.c +=================================================================== +--- /dev/null ++++ b/backends/parisc_symbol.c +@@ -0,0 +1,112 @@ ++/* PA-RISC specific symbolic name handling. ++ Copyright (C) 2002, 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ Written by Ulrich Drepper , 2002. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND parisc_ ++#include "libebl_CPU.h" ++ ++const char * ++parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)), ++ size_t len __attribute__ ((unused))) ++{ ++ switch (segment) ++ { ++ case PT_PARISC_ARCHEXT: ++ return "PARISC_ARCHEXT"; ++ case PT_PARISC_UNWIND: ++ return "PARISC_UNWIND"; ++ default: ++ break; ++ } ++ return NULL; ++} ++ ++/* Return symbolic representation of symbol type. */ ++const char * ++parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)), ++ size_t len __attribute__ ((unused))) ++{ ++ if (symbol == STT_PARISC_MILLICODE) ++ return "PARISC_MILLI"; ++ return NULL; ++} ++ ++/* Return symbolic representation of section type. */ ++const char * ++parisc_section_type_name (int type, ++ char *buf __attribute__ ((unused)), ++ size_t len __attribute__ ((unused))) ++{ ++ switch (type) ++ { ++ case SHT_PARISC_EXT: ++ return "PARISC_EXT"; ++ case SHT_PARISC_UNWIND: ++ return "PARISC_UNWIND"; ++ case SHT_PARISC_DOC: ++ return "PARISC_DOC"; ++ } ++ ++ return NULL; ++} ++ ++/* Check whether machine flags are valid. */ ++bool ++parisc_machine_flag_check (GElf_Word flags) ++{ ++ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB | ++ EF_PARISC_WIDE | EF_PARISC_NO_KABP | ++ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH)) ++ return 0; ++ ++ GElf_Word arch = flags & EF_PARISC_ARCH; ++ ++ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) || ++ (arch == EFA_PARISC_2_0)); ++} ++ ++/* Check for the simple reloc types. */ ++Elf_Type ++parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) ++{ ++ switch (type) ++ { ++ case R_PARISC_DIR64: ++ case R_PARISC_SECREL64: ++ return ELF_T_XWORD; ++ case R_PARISC_DIR32: ++ case R_PARISC_SECREL32: ++ return ELF_T_WORD; ++ default: ++ return ELF_T_NUM; ++ } ++} +Index: b/backends/libebl_parisc.h +=================================================================== +--- /dev/null ++++ b/backends/libebl_parisc.h +@@ -0,0 +1,9 @@ ++#ifndef _LIBEBL_HPPA_H ++#define _LIBEBL_HPPA_H 1 ++ ++#include ++ ++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp); ++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp); ++ ++#endif +Index: b/backends/Makefile.am +=================================================================== +--- a/backends/Makefile.am ++++ b/backends/Makefile.am +@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I + + + modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ +- tilegx m68k bpf ++ tilegx m68k bpf parisc + libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ + libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ + libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ + libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ +- libebl_m68k_pic.a libebl_bpf_pic.a ++ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a + noinst_LIBRARIES = $(libebl_pic) + noinst_DATA = $(libebl_pic:_pic.a=.so) + +@@ -128,6 +128,9 @@ endif + libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) + am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) + ++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c ++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) ++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) + + libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) + @rm -f $(@:.so=.map) +Index: b/libelf/elf.h +=================================================================== +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -2055,16 +2055,24 @@ enum + #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ + #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ + #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ ++#define R_PARISC_DPREL14WR 19 ++#define R_PARISC_DPREL14DR 20 + #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */ + #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */ + #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */ + #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */ + #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */ ++#define R_PARISC_DLTIND14F 39 ++#define R_PARISC_SETBASE 40 + #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */ ++#define R_PARISC_BASEREL21L 42 ++#define R_PARISC_BASEREL17R 43 ++#define R_PARISC_BASEREL14R 46 + #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */ + #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */ + #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */ + #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */ ++#define R_PARISC_PLTOFF14F 55 + #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ + #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ + #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ +@@ -2073,6 +2081,7 @@ enum + #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ + #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ + #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ ++#define R_PARISC_PCREL22C 73 + #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ + #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ + #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ +@@ -2098,6 +2107,8 @@ enum + #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ + #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ + #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ ++#define R_PARISC_BASEREL14WR 107 ++#define R_PARISC_BASEREL14DR 108 + #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ + #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ + #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch new file mode 100644 index 000000000..2e0e54b0c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch @@ -0,0 +1,715 @@ +From 46d0d0ca718093486eeeedf1b44134e9e29b56f7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 16 Aug 2017 09:18:59 +0800 +Subject: [PATCH] mips backends + +Upstream-Status: Backport [from debian] + +Rebase to 0.170 +Signed-off-by: Hongxu Jia +--- + backends/Makefile.am | 8 +- + backends/mips_init.c | 59 +++++++++ + backends/mips_regs.c | 104 ++++++++++++++++ + backends/mips_reloc.def | 79 ++++++++++++ + backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++ + backends/mips_symbol.c | 52 ++++++++ + libebl/eblopenbackend.c | 2 + + 7 files changed, 623 insertions(+), 2 deletions(-) + create mode 100644 backends/mips_init.c + create mode 100644 backends/mips_regs.c + create mode 100644 backends/mips_reloc.def + create mode 100644 backends/mips_retval.c + create mode 100644 backends/mips_symbol.c + +diff --git a/backends/Makefile.am b/backends/Makefile.am +index 7f1f5d4..91baf6e 100644 +--- a/backends/Makefile.am ++++ b/backends/Makefile.am +@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ + + + modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ +- tilegx m68k bpf parisc ++ tilegx m68k bpf parisc mips + libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ + libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ + libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ + libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ +- libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a ++ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a + noinst_LIBRARIES = $(libebl_pic) + noinst_DATA = $(libebl_pic:_pic.a=.so) + +@@ -128,6 +128,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c + libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) + am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) + ++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c ++libebl_mips_pic_a_SOURCES = $(mips_SRCS) ++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) ++ + libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) + @rm -f $(@:.so=.map) + $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ +diff --git a/backends/mips_init.c b/backends/mips_init.c +new file mode 100644 +index 0000000..975c04e +--- /dev/null ++++ b/backends/mips_init.c +@@ -0,0 +1,59 @@ ++/* Initialization of mips specific backend library. ++ Copyright (C) 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#define BACKEND mips_ ++#define RELOC_PREFIX R_MIPS_ ++#include "libebl_CPU.h" ++ ++/* This defines the common reloc hooks based on mips_reloc.def. */ ++#include "common-reloc.c" ++ ++const char * ++mips_init (Elf *elf __attribute__ ((unused)), ++ GElf_Half machine __attribute__ ((unused)), ++ Ebl *eh, ++ size_t ehlen) ++{ ++ /* Check whether the Elf_BH object has a sufficent size. */ ++ if (ehlen < sizeof (Ebl)) ++ return NULL; ++ ++ /* We handle it. */ ++ if (machine == EM_MIPS) ++ eh->name = "MIPS R3000 big-endian"; ++ else if (machine == EM_MIPS_RS3_LE) ++ eh->name = "MIPS R3000 little-endian"; ++ ++ mips_init_reloc (eh); ++ HOOK (eh, reloc_simple_type); ++ HOOK (eh, return_value_location); ++ HOOK (eh, register_info); ++ ++ return MODVERSION; ++} +diff --git a/backends/mips_regs.c b/backends/mips_regs.c +new file mode 100644 +index 0000000..44f86cb +--- /dev/null ++++ b/backends/mips_regs.c +@@ -0,0 +1,104 @@ ++/* Register names and numbers for MIPS DWARF. ++ Copyright (C) 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND mips_ ++#include "libebl_CPU.h" ++ ++ssize_t ++mips_register_info (Ebl *ebl __attribute__((unused)), ++ int regno, char *name, size_t namelen, ++ const char **prefix, const char **setname, ++ int *bits, int *type) ++{ ++ if (name == NULL) ++ return 66; ++ ++ if (regno < 0 || regno > 65 || namelen < 4) ++ return -1; ++ ++ *prefix = "$"; ++ ++ if (regno < 32) ++ { ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ if (regno < 32 + 10) ++ { ++ name[0] = regno + '0'; ++ namelen = 1; ++ } ++ else ++ { ++ name[0] = (regno / 10) + '0'; ++ name[1] = (regno % 10) + '0'; ++ namelen = 2; ++ } ++ } ++ else if (regno < 64) ++ { ++ *setname = "FPU"; ++ *type = DW_ATE_float; ++ *bits = 32; ++ name[0] = 'f'; ++ if (regno < 32 + 10) ++ { ++ name[1] = (regno - 32) + '0'; ++ namelen = 2; ++ } ++ else ++ { ++ name[1] = (regno - 32) / 10 + '0'; ++ name[2] = (regno - 32) % 10 + '0'; ++ namelen = 3; ++ } ++ } ++ else if (regno == 64) ++ { ++ *type = DW_ATE_signed; ++ *bits = 32; ++ name[0] = 'h'; ++ name[1] = 'i'; ++ namelen = 2; ++ } ++ else ++ { ++ *type = DW_ATE_signed; ++ *bits = 32; ++ name[0] = 'l'; ++ name[1] = 'o'; ++ namelen = 2; ++ } ++ ++ name[namelen++] = '\0'; ++ return namelen; ++} +diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def +new file mode 100644 +index 0000000..4579970 +--- /dev/null ++++ b/backends/mips_reloc.def +@@ -0,0 +1,79 @@ ++/* List the relocation types for mips. -*- C -*- ++ Copyright (C) 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++/* NAME, REL|EXEC|DYN */ ++ ++RELOC_TYPE (NONE, 0) ++RELOC_TYPE (16, 0) ++RELOC_TYPE (32, 0) ++RELOC_TYPE (REL32, 0) ++RELOC_TYPE (26, 0) ++RELOC_TYPE (HI16, 0) ++RELOC_TYPE (LO16, 0) ++RELOC_TYPE (GPREL16, 0) ++RELOC_TYPE (LITERAL, 0) ++RELOC_TYPE (GOT16, 0) ++RELOC_TYPE (PC16, 0) ++RELOC_TYPE (CALL16, 0) ++RELOC_TYPE (GPREL32, 0) ++ ++RELOC_TYPE (SHIFT5, 0) ++RELOC_TYPE (SHIFT6, 0) ++RELOC_TYPE (64, 0) ++RELOC_TYPE (GOT_DISP, 0) ++RELOC_TYPE (GOT_PAGE, 0) ++RELOC_TYPE (GOT_OFST, 0) ++RELOC_TYPE (GOT_HI16, 0) ++RELOC_TYPE (GOT_LO16, 0) ++RELOC_TYPE (SUB, 0) ++RELOC_TYPE (INSERT_A, 0) ++RELOC_TYPE (INSERT_B, 0) ++RELOC_TYPE (DELETE, 0) ++RELOC_TYPE (HIGHER, 0) ++RELOC_TYPE (HIGHEST, 0) ++RELOC_TYPE (CALL_HI16, 0) ++RELOC_TYPE (CALL_LO16, 0) ++RELOC_TYPE (SCN_DISP, 0) ++RELOC_TYPE (REL16, 0) ++RELOC_TYPE (ADD_IMMEDIATE, 0) ++RELOC_TYPE (PJUMP, 0) ++RELOC_TYPE (RELGOT, 0) ++RELOC_TYPE (JALR, 0) ++RELOC_TYPE (TLS_DTPMOD32, 0) ++RELOC_TYPE (TLS_DTPREL32, 0) ++RELOC_TYPE (TLS_DTPMOD64, 0) ++RELOC_TYPE (TLS_DTPREL64, 0) ++RELOC_TYPE (TLS_GD, 0) ++RELOC_TYPE (TLS_LDM, 0) ++RELOC_TYPE (TLS_DTPREL_HI16, 0) ++RELOC_TYPE (TLS_DTPREL_LO16, 0) ++RELOC_TYPE (TLS_GOTTPREL, 0) ++RELOC_TYPE (TLS_TPREL32, 0) ++RELOC_TYPE (TLS_TPREL64, 0) ++RELOC_TYPE (TLS_TPREL_HI16, 0) ++RELOC_TYPE (TLS_TPREL_LO16, 0) ++ ++#define NO_COPY_RELOC 1 ++#define NO_RELATIVE_RELOC 1 +diff --git a/backends/mips_retval.c b/backends/mips_retval.c +new file mode 100644 +index 0000000..656cd1f +--- /dev/null ++++ b/backends/mips_retval.c +@@ -0,0 +1,321 @@ ++/* Function return value location for Linux/mips ABI. ++ Copyright (C) 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++#include ++#include ++ ++#include "../libebl/libeblP.h" ++#include "../libdw/libdwP.h" ++ ++#define BACKEND mips_ ++#include "libebl_CPU.h" ++ ++/* The ABI of the file. Also see EF_MIPS_ABI2 above. */ ++#define EF_MIPS_ABI 0x0000F000 ++ ++/* The original o32 abi. */ ++#define E_MIPS_ABI_O32 0x00001000 ++ ++/* O32 extended to work on 64 bit architectures */ ++#define E_MIPS_ABI_O64 0x00002000 ++ ++/* EABI in 32 bit mode */ ++#define E_MIPS_ABI_EABI32 0x00003000 ++ ++/* EABI in 64 bit mode */ ++#define E_MIPS_ABI_EABI64 0x00004000 ++ ++/* All the possible MIPS ABIs. */ ++enum mips_abi ++ { ++ MIPS_ABI_UNKNOWN = 0, ++ MIPS_ABI_N32, ++ MIPS_ABI_O32, ++ MIPS_ABI_N64, ++ MIPS_ABI_O64, ++ MIPS_ABI_EABI32, ++ MIPS_ABI_EABI64, ++ MIPS_ABI_LAST ++ }; ++ ++/* Find the mips ABI of the current file */ ++enum mips_abi find_mips_abi(Elf *elf) ++{ ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ ++ if (ehdr == NULL) ++ return MIPS_ABI_LAST; ++ ++ GElf_Word elf_flags = ehdr->e_flags; ++ ++ /* Check elf_flags to see if it specifies the ABI being used. */ ++ switch ((elf_flags & EF_MIPS_ABI)) ++ { ++ case E_MIPS_ABI_O32: ++ return MIPS_ABI_O32; ++ case E_MIPS_ABI_O64: ++ return MIPS_ABI_O64; ++ case E_MIPS_ABI_EABI32: ++ return MIPS_ABI_EABI32; ++ case E_MIPS_ABI_EABI64: ++ return MIPS_ABI_EABI64; ++ default: ++ if ((elf_flags & EF_MIPS_ABI2)) ++ return MIPS_ABI_N32; ++ } ++ ++ /* GCC creates a pseudo-section whose name describes the ABI. */ ++ size_t shstrndx; ++ if (elf_getshdrstrndx (elf, &shstrndx) < 0) ++ return MIPS_ABI_LAST; ++ ++ const char *name; ++ Elf_Scn *scn = NULL; ++ while ((scn = elf_nextscn (elf, scn)) != NULL) ++ { ++ GElf_Shdr shdr_mem; ++ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); ++ if (shdr == NULL) ++ return MIPS_ABI_LAST; ++ ++ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: ""; ++ if (strncmp (name, ".mdebug.", 8) != 0) ++ continue; ++ ++ if (strcmp (name, ".mdebug.abi32") == 0) ++ return MIPS_ABI_O32; ++ else if (strcmp (name, ".mdebug.abiN32") == 0) ++ return MIPS_ABI_N32; ++ else if (strcmp (name, ".mdebug.abi64") == 0) ++ return MIPS_ABI_N64; ++ else if (strcmp (name, ".mdebug.abiO64") == 0) ++ return MIPS_ABI_O64; ++ else if (strcmp (name, ".mdebug.eabi32") == 0) ++ return MIPS_ABI_EABI32; ++ else if (strcmp (name, ".mdebug.eabi64") == 0) ++ return MIPS_ABI_EABI64; ++ else ++ return MIPS_ABI_UNKNOWN; ++ } ++ ++ return MIPS_ABI_UNKNOWN; ++} ++ ++unsigned int ++mips_abi_regsize (enum mips_abi abi) ++{ ++ switch (abi) ++ { ++ case MIPS_ABI_EABI32: ++ case MIPS_ABI_O32: ++ return 4; ++ case MIPS_ABI_N32: ++ case MIPS_ABI_N64: ++ case MIPS_ABI_O64: ++ case MIPS_ABI_EABI64: ++ return 8; ++ case MIPS_ABI_UNKNOWN: ++ case MIPS_ABI_LAST: ++ default: ++ return 0; ++ } ++} ++ ++ ++/* $v0 or pair $v0, $v1 */ ++static const Dwarf_Op loc_intreg_o32[] = ++ { ++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++ ++static const Dwarf_Op loc_intreg[] = ++ { ++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 }, ++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 }, ++ }; ++#define nloc_intreg 1 ++#define nloc_intregpair 4 ++ ++/* $f0 (float), or pair $f0, $f1 (double). ++ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */ ++static const Dwarf_Op loc_fpreg_o32[] = ++ { ++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++ ++/* $f0, or pair $f0, $f2. */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 }, ++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 }, ++ }; ++#define nloc_fpreg 1 ++#define nloc_fpregpair 4 ++#define nloc_fpregquad 8 ++ ++/* The return value is a structure and is actually stored in stack space ++ passed in a hidden argument by the caller. But, the compiler ++ helpfully returns the address of that space in $v0. */ ++static const Dwarf_Op loc_aggregate[] = ++ { ++ { .atom = DW_OP_breg2, .number = 0 } ++ }; ++#define nloc_aggregate 1 ++ ++int ++mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ /* First find the ABI used by the elf object */ ++ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf); ++ ++ /* Something went seriously wrong while trying to figure out the ABI */ ++ if (abi == MIPS_ABI_LAST) ++ return -1; ++ ++ /* We couldn't identify the ABI, but the file seems valid */ ++ if (abi == MIPS_ABI_UNKNOWN) ++ return -2; ++ ++ /* Can't handle EABI variants */ ++ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64)) ++ return -2; ++ ++ unsigned int regsize = mips_abi_regsize (abi); ++ if (!regsize) ++ return -2; ++ ++ /* Start with the function's type, and get the DW_AT_type attribute, ++ which is the type of the return value. */ ++ ++ Dwarf_Attribute attr_mem; ++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem); ++ if (attr == NULL) ++ /* The function has no return value, like a `void' function in C. */ ++ return 0; ++ ++ Dwarf_Die die_mem; ++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem); ++ int tag = dwarf_tag (typedie); ++ ++ /* Follow typedefs and qualifiers to get to the actual type. */ ++ while (tag == DW_TAG_typedef ++ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type ++ || tag == DW_TAG_restrict_type) ++ { ++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); ++ typedie = dwarf_formref_die (attr, &die_mem); ++ tag = dwarf_tag (typedie); ++ } ++ ++ switch (tag) ++ { ++ case -1: ++ return -1; ++ ++ case DW_TAG_subrange_type: ++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size)) ++ { ++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem); ++ typedie = dwarf_formref_die (attr, &die_mem); ++ tag = dwarf_tag (typedie); ++ } ++ /* Fall through. */ ++ ++ case DW_TAG_base_type: ++ case DW_TAG_enumeration_type: ++ case DW_TAG_pointer_type: ++ case DW_TAG_ptr_to_member_type: ++ { ++ Dwarf_Word size; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, ++ &attr_mem), &size) != 0) ++ { ++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type) ++ size = regsize; ++ else ++ return -1; ++ } ++ if (tag == DW_TAG_base_type) ++ { ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return -1; ++ ++#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc)) ++ ++ if (encoding == DW_ATE_float) ++ { ++ *locp = ABI_LOC(loc_fpreg, regsize); ++ if (size <= regsize) ++ return nloc_fpreg; ++ ++ if (size <= 2*regsize) ++ return nloc_fpregpair; ++ ++ if (size <= 4*regsize && abi == MIPS_ABI_O32) ++ return nloc_fpregquad; ++ ++ goto aggregate; ++ } ++ } ++ *locp = ABI_LOC(loc_intreg, regsize); ++ if (size <= regsize) ++ return nloc_intreg; ++ if (size <= 2*regsize) ++ return nloc_intregpair; ++ ++ /* Else fall through. Shouldn't happen though (at least with gcc) */ ++ } ++ ++ case DW_TAG_structure_type: ++ case DW_TAG_class_type: ++ case DW_TAG_union_type: ++ case DW_TAG_array_type: ++ aggregate: ++ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */ ++ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64)) ++ return -2; ++ ++ *locp = loc_aggregate; ++ return nloc_aggregate; ++ } ++ ++ /* XXX We don't have a good way to return specific errors from ebl calls. ++ This value means we do not understand the type, but it is well-formed ++ DWARF and might be valid. */ ++ return -2; ++} +diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c +new file mode 100644 +index 0000000..ba465fe +--- /dev/null ++++ b/backends/mips_symbol.c +@@ -0,0 +1,52 @@ ++/* MIPS specific symbolic name handling. ++ Copyright (C) 2002, 2003, 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ Written by Jakub Jelinek , 2002. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND mips_ ++#include "libebl_CPU.h" ++ ++/* Check for the simple reloc types. */ ++Elf_Type ++mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) ++{ ++ switch (type) ++ { ++ case R_MIPS_16: ++ return ELF_T_HALF; ++ case R_MIPS_32: ++ return ELF_T_WORD; ++ case R_MIPS_64: ++ return ELF_T_XWORD; ++ default: ++ return ELF_T_NUM; ++ } ++} +diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c +index 1f81477..5371396 100644 +--- a/libebl/eblopenbackend.c ++++ b/libebl/eblopenbackend.c +@@ -72,6 +72,8 @@ static const struct + { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, + { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, + { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, ++ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 }, ++ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 }, + + { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, + { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch new file mode 100644 index 000000000..790930cf3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch @@ -0,0 +1,25 @@ +From: Kurt Roeckx +Subject: Make readelf -w output debug information on mips +Bug-Debian: http://bugs.debian.org/662041 +Forwarded: not-needed + +Upstreams wants a change where this is handled by a hook that needs +to be filled in by the backend for the arch. + +Upstream-Status: Backport [from debian] +Signed-off-by: Hongxu Jia + +Index: b/src/readelf.c +=================================================================== +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -8343,7 +8343,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl * + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + +- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS) ++ if (shdr != NULL && ( ++ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF))) + { + static const struct + { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb index 630f2e464..e2d24e8d8 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb @@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c" DEPENDS += "tcl" RDEPENDS_${PN} = "tcl" -inherit autotools +inherit autotools update-alternatives PR = "r1" @@ -57,6 +57,11 @@ EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \ " EXTRA_OEMAKE_install = " 'SCRIPTS=' " +ALTERNATIVE_${PN} = "mkpasswd" +ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd" +# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW) +ALTERNATIVE_PRIORITY[mkpasswd] = "40" + FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \ ${includedir}/expect.h \ ${includedir}/expect_tcl.h \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb deleted file mode 100644 index d62a903a7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Utility for modifying GPT disk partitioning" -DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -DEPENDS = "util-linux popt ncurses" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz" -SRC_URI[md5sum] = "d7f3d306b083123bcc6f5941efade586" -SRC_URI[sha256sum] = "864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" -UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" - -EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}'" - -do_install() { - install -d ${D}${sbindir} - install -m 0755 cgdisk ${D}${sbindir} - install -m 0755 gdisk ${D}${sbindir} - install -m 0755 sgdisk ${D}${sbindir} - install -m 0755 fixparts ${D}${sbindir} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb new file mode 100644 index 000000000..4d617e3e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb @@ -0,0 +1,26 @@ +SUMMARY = "Utility for modifying GPT disk partitioning" +DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +DEPENDS = "util-linux popt ncurses" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz" +SRC_URI[md5sum] = "07b625a583b66c8c5840be5923f3e3fe" +SRC_URI[sha256sum] = "89fd5aec35c409d610a36cb49c65b442058565ed84042f767bba614b8fc91b5c" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" +UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}'" + +do_install() { + install -d ${D}${sbindir} + install -m 0755 cgdisk ${D}${sbindir} + install -m 0755 gdisk ${D}${sbindir} + install -m 0755 sgdisk ${D}${sbindir} + install -m 0755 fixparts ${D}${sbindir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch index 1ef485e93..d31ac5914 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch @@ -1,19 +1,30 @@ -The awk pattern was checked *before* the Perl pattern, so the perl -script with BEGIN{...} would be reported as awk, this patch fixes it. +The awk pattern was checked *before* the Perl pattern, so the +perl script with BEGIN{...} would be reported as awk, this patch fixes it. Upstream-Status: Backport [debian] Signed-off-by: Christoph Biedl Signed-off-by: Robert Yang + +Rebase on 5.31 + +Signed-off-by: Fan Xin --- + magic/Magdir/commands | 1 + + 1 file changed, 1 insertion(+) + diff --git a/magic/Magdir/commands b/magic/Magdir/commands +index 1a46efd..255c04b 100644 --- a/magic/Magdir/commands +++ b/magic/Magdir/commands @@ -57,6 +57,7 @@ 0 string/wt #!\ /usr/bin/awk awk script text executable !:mime text/x-awk - 0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text + 0 regex/4096 =^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{0,100}[{] awk or perl script text +!:strength - 12 # AT&T Bell Labs' Plan 9 shell 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb deleted file mode 100644 index 0998fcfa8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "File classification tool" -DESCRIPTION = "File attempts to classify files depending \ -on their contents and prints a description if a match is found." -HOMEPAGE = "http://www.darwinsys.com/file/" -SECTION = "console/utils" - -# two clause BSD -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188" - -DEPENDS = "zlib file-replacement-native" -DEPENDS_class-native = "zlib-native" - -# Blacklist a bogus tag in upstream check -UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P(?!6_23).+)" - -SRC_URI = "git://github.com/file/file.git \ - file://debian-742262.patch \ - file://0001-Add-P-prompt-into-Usage-info.patch \ - " - -SRCREV = "79814950aafb81ecd6a910c2a8a3b8ec12f3e4a6" -S = "${WORKDIR}/git" - -inherit autotools - -EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" -EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" - -CFLAGS_append = " -std=c99" - -FILES_${PN} += "${datadir}/misc/*.mgc" - -do_install_append_class-native() { - create_cmdline_wrapper ${D}/${bindir}/file \ - --magic-file ${datadir}/misc/magic.mgc -} - -do_install_append_class-nativesdk() { - create_cmdline_wrapper ${D}/${bindir}/file \ - --magic-file ${datadir}/misc/magic.mgc -} - -BBCLASSEXTEND = "native nativesdk" -PROVIDES_append_class-native = " file-replacement-native" -# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who -# depends on file-replacement-native. -bindir_append_class-native = "/file-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb new file mode 100644 index 000000000..1b1f50284 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb @@ -0,0 +1,48 @@ +SUMMARY = "File classification tool" +DESCRIPTION = "File attempts to classify files depending \ +on their contents and prints a description if a match is found." +HOMEPAGE = "http://www.darwinsys.com/file/" +SECTION = "console/utils" + +# two clause BSD +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188" + +DEPENDS = "zlib file-replacement-native" +DEPENDS_class-native = "zlib-native" + +# Blacklist a bogus tag in upstream check +UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P(?!6_23).+)" + +SRC_URI = "git://github.com/file/file.git \ + file://debian-742262.patch \ + file://0001-Add-P-prompt-into-Usage-info.patch \ + " + +SRCREV = "70c5f15060c7ad81150177de83a3e64500a54c9f" +S = "${WORKDIR}/git" + +inherit autotools + +EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" +EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" + +CFLAGS_append = " -std=c99" + +FILES_${PN} += "${datadir}/misc/*.mgc" + +do_install_append_class-native() { + create_cmdline_wrapper ${D}/${bindir}/file \ + --magic-file ${datadir}/misc/magic.mgc +} + +do_install_append_class-nativesdk() { + create_cmdline_wrapper ${D}/${bindir}/file \ + --magic-file ${datadir}/misc/magic.mgc +} + +BBCLASSEXTEND = "native nativesdk" +PROVIDES_append_class-native = " file-replacement-native" +# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who +# depends on file-replacement-native. +bindir_append_class-native = "/file-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb index ab35b09f9..a906fe8dc 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb @@ -55,7 +55,11 @@ do_install_ptest() { cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ cp -r ${S}/tests/* ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH} - sed -e 's/^Makefile:/_Makefile:/' \ + sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \ -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \ -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \ -i ${D}${PTEST_PATH}/Makefile diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc deleted file mode 100644 index b7696756a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc +++ /dev/null @@ -1,147 +0,0 @@ -require gcc-common.inc - -# Third digit in PV should be incremented after a minor release - -PV = "5.4.0" - -#SNAP = "5-20150405" - -# BINV should be incremented to a revision after a minor gcc release - -BINV = "5.4.0" - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.4:${FILE_DIRNAME}/gcc-5.4/backport:" - -DEPENDS =+ "mpfr gmp libmpc zlib" -NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native" - -LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" - -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ -" -#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2" -BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" - -SRC_URI = "\ - ${BASEURI} \ - ${BACKPORTS} \ - file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ - file://0002-uclibc-conf.patch \ - file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \ - file://0004-uclibc-locale.patch \ - file://0005-uclibc-locale-no__x.patch \ - file://0006-uclibc-locale-wchar_fix.patch \ - file://0007-uclibc-locale-update.patch \ - file://0008-missing-execinfo_h.patch \ - file://0009-c99-snprintf.patch \ - file://0010-gcc-poison-system-directories.patch \ - file://0011-gcc-poison-dir-extend.patch \ - file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ - file://0013-64-bit-multilib-hack.patch \ - file://0014-optional-libstdc.patch \ - file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ - file://0016-COLLECT_GCC_OPTIONS.patch \ - file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ - file://0018-fortran-cross-compile-hack.patch \ - file://0019-libgcc-sjlj-check.patch \ - file://0020-cpp-honor-sysroot.patch \ - file://0021-MIPS64-Default-to-N64-ABI.patch \ - file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ - file://0023-gcc-Fix-argument-list-too-long-error.patch \ - file://0024-Disable-sdt.patch \ - file://0025-libtool.patch \ - file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ - file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ - file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ - file://0029-export-CPP.patch \ - file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ - file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ - file://0032-Ensure-target-gcc-headers-can-be-included.patch \ - file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ - file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ - file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \ - file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ - file://0037-aarch64-Add-support-for-musl-ldso.patch \ - file://0038-fix-g-sysroot.patch \ - file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ - file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \ - file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ - file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \ - file://0043-libstdc-Support-musl.patch \ - file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \ - file://0045-Support-for-arm-linux-musl.patch \ - file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \ - file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ - file://0048-ssp_nonshared.patch \ - file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \ - file://0050-powerpc-pass-secure-plt-to-the-linker.patch \ - file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \ - file://0052-nios2-use-ret-with-r31.patch \ - file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \ - file://0054-support-ffile-prefix-map.patch \ - file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ - file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \ - file://0057-unwind-fix-for-musl.patch \ - file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \ - file://0059-libgcc-use-ldflags.patch \ - file://CVE-2016-6131.patch \ -" - -BACKPORTS = "" - -SRC_URI[md5sum] = "4c626ac2a83ef30dfb9260e6f59c2b30" -SRC_URI[sha256sum] = "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a" - -UPSTREAM_CHECK_REGEX = "gcc-(?P5\.\d+\.\d+).tar" - -#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}" -S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" -B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" - -# Language Overrides -FORTRAN = "" -JAVA = "" - -LTO = "--enable-lto" - -EXTRA_OECONF_BASE = "\ - ${LTO} \ - --enable-libssp \ - --enable-libitm \ - --disable-bootstrap \ - --disable-libmudflap \ - --with-system-zlib \ - --with-linker-hash-style=${LINKER_HASH_STYLE} \ - --enable-linker-build-id \ - --with-ppl=no \ - --with-cloog=no \ - --enable-checking=release \ - --enable-cheaders=c_global \ - --without-isl \ -" - -EXTRA_OECONF_INITIAL = "\ - --disable-libmudflap \ - --disable-libgomp \ - --disable-libitm \ - --disable-libquadmath \ - --with-system-zlib \ - --disable-lto \ - --disable-plugin \ - --enable-decimal-float=no \ - --without-isl \ - gcc_cv_libc_provides_ssp=yes \ -" - -EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float " - -EXTRA_OECONF_PATHS = "\ - --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ - --with-sysroot=/not/exist \ - --with-build-sysroot=${STAGING_DIR_TARGET} \ -" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch deleted file mode 100644 index 1aead9691..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6029bb338305a5d1403ee23427ed8d58eae1ff53 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:37:11 +0400 -Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - configure | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index a3f66ba..1cba3a9 100755 ---- a/configure -+++ b/configure -@@ -7464,7 +7464,7 @@ fi - # for target_alias and gcc doesn't manage it consistently. - target_configargs="--cache-file=./config.cache ${target_configargs}" - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in -diff --git a/configure.ac b/configure.ac -index 987dfab..d3adb95 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3104,7 +3104,7 @@ fi - # for target_alias and gcc doesn't manage it consistently. - target_configargs="--cache-file=./config.cache ${target_configargs}" - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch deleted file mode 100644 index 8d6aeb5e4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b67c3a844bccec1766a7ec120e2d18cdcbc5f114 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:38:25 +0400 -Subject: [PATCH 02/46] uclibc-conf - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - contrib/regression/objs-gcc.sh | 4 ++++ - libjava/classpath/ltconfig | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh -index 60b0497..6dc7ead 100755 ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 -diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig -index 743d951..ae4ea60 100755 ---- a/libjava/classpath/ltconfig -+++ b/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch deleted file mode 100644 index bd0326343..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 9bcb3a1848ff0f8990301ca09a25b15c2cf90c6f Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:40:12 +0400 -Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++ - libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++ - libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++ - 3 files changed, 23 insertions(+) - -diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc -index 6da5f22..2f85c2f 100644 ---- a/libstdc++-v3/config/locale/generic/c_locale.cc -+++ b/libstdc++-v3/config/locale/generic/c_locale.cc -@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION - #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT - #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ - extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) -+#ifdef __UCLIBC__ -+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* -+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); -+#else - _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); -+#endif - #endif // _GLIBCXX_LONG_DOUBLE_COMPAT -diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h -index ee3ef86..7fd5485 100644 ---- a/libstdc++-v3/config/locale/generic/c_locale.h -+++ b/libstdc++-v3/config/locale/generic/c_locale.h -@@ -40,13 +40,22 @@ - - #include - -+#ifdef __UCLIBC__ -+#include -+#include -+#endif -+ - #define _GLIBCXX_NUM_CATEGORIES 0 - - namespace std _GLIBCXX_VISIBILITY(default) - { - _GLIBCXX_BEGIN_NAMESPACE_VERSION - -+#ifdef __UCLIBC__ -+ typedef __ctype_touplow_t* __c_locale; -+#else - typedef int* __c_locale; -+#endif - - // Convert numeric value of type double and long double to string and - // return length of string. If vsnprintf is available use it, otherwise -diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h -index fd52b73..2627cf3 100644 ---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h -+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h -@@ -33,6 +33,11 @@ - - // Information as gleaned from /usr/include/ctype.h - -+#ifdef __UCLIBC__ -+#include -+#include -+#endif -+ - namespace std _GLIBCXX_VISIBILITY(default) - { - _GLIBCXX_BEGIN_NAMESPACE_VERSION -@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - struct ctype_base - { - // Non-standard typedefs. -+#ifdef __UCLIBC__ -+ typedef const __ctype_touplow_t* __to_type; -+#else - typedef const int* __to_type; -+#endif - - // NB: Offsets into ctype::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch deleted file mode 100644 index 656265a28..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch +++ /dev/null @@ -1,2862 +0,0 @@ -From bd9dd472d162fc72522f96f70f6391c7c63d2bf7 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:41:39 +0400 -Subject: [PATCH 04/46] uclibc-locale - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/acinclude.m4 | 37 ++ - .../config/locale/uclibc/c++locale_internal.h | 63 ++ - libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++ - libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++ - .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++ - .../config/locale/uclibc/collate_members.cc | 80 +++ - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++ - .../config/locale/uclibc/messages_members.cc | 100 +++ - .../config/locale/uclibc/messages_members.h | 118 ++++ - .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++ - .../config/locale/uclibc/numeric_members.cc | 160 +++++ - libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++ - libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++ - libstdc++-v3/configure | 75 +++ - libstdc++-v3/include/c_compatibility/wchar.h | 2 + - libstdc++-v3/include/c_std/cwchar | 2 + - 16 files changed, 2688 insertions(+) - create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h - create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h - create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h - create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h - -diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 -index 826ef86..79cc716 100644 ---- a/libstdc++-v3/acinclude.m4 -+++ b/libstdc++-v3/acinclude.m4 -@@ -2029,6 +2029,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - enable_clocale_flag=gnu - ;; -@@ -2213,6 +2216,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ AC_MSG_RESULT(uclibc) -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ AC_SUBST(glibcxx_MOFILES) -+ AC_SUBST(glibcxx_POFILES) -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -new file mode 100644 -index 0000000..2ae3e4a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -0,0 +1,63 @@ -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- -+ -+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// Written by Jakub Jelinek -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning clean this up -+#endif -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; -+extern "C" __typeof(strcoll_l) __strcoll_l; -+extern "C" __typeof(strftime_l) __strftime_l; -+extern "C" __typeof(strtod_l) __strtod_l; -+extern "C" __typeof(strtof_l) __strtof_l; -+extern "C" __typeof(strtold_l) __strtold_l; -+extern "C" __typeof(strxfrm_l) __strxfrm_l; -+extern "C" __typeof(newlocale) __newlocale; -+extern "C" __typeof(freelocale) __freelocale; -+extern "C" __typeof(duplocale) __duplocale; -+extern "C" __typeof(uselocale) __uselocale; -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+extern "C" __typeof(iswctype_l) __iswctype_l; -+extern "C" __typeof(towlower_l) __towlower_l; -+extern "C" __typeof(towupper_l) __towupper_l; -+extern "C" __typeof(wcscoll_l) __wcscoll_l; -+extern "C" __typeof(wcsftime_l) __wcsftime_l; -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; -+extern "C" __typeof(wctype_l) __wctype_l; -+#endif -+ -+#endif // GLIBC 2.3 and later -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -new file mode 100644 -index 0000000..5081dc1 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -0,0 +1,160 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#include // For errno -+#include -+#include -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) -+#define __strtof_l(S, E, L) strtof((S), (E)) -+#define __strtod_l(S, E, L) strtod((S), (E)) -+#define __strtold_l(S, E, L) strtold((S), (E)) -+#warning should dummy __newlocale check for C|POSIX ? -+#define __newlocale(a, b, c) NULL -+#define __freelocale(a) ((void)0) -+#define __duplocale(a) __c_locale() -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ void -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, -+ __c_locale __old) -+ { -+ __cloc = __newlocale(1 << LC_ALL, __s, __old); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ if (!__cloc) -+ { -+ // This named locale is not supported by the underlying OS. -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " -+ "name not valid")); -+ } -+#endif -+ } -+ -+ void -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) -+ { -+ if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); -+ } -+ -+ __c_locale -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc) -+ { return __duplocale(__cloc); } -+} // namespace std -+ -+namespace __gnu_cxx -+{ -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = -+ { -+ "LC_CTYPE", -+ "LC_NUMERIC", -+ "LC_TIME", -+ "LC_COLLATE", -+ "LC_MONETARY", -+ "LC_MESSAGES", -+#if _GLIBCXX_NUM_CATEGORIES != 0 -+ "LC_PAPER", -+ "LC_NAME", -+ "LC_ADDRESS", -+ "LC_TELEPHONE", -+ "LC_MEASUREMENT", -+ "LC_IDENTIFICATION" -+#endif -+ }; -+} -+ -+namespace std -+{ -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names; -+} // namespace std -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -new file mode 100644 -index 0000000..da07c1f ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -0,0 +1,117 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifndef _C_LOCALE_H -+#define _C_LOCALE_H 1 -+ -+#pragma GCC system_header -+ -+#include // get std::strlen -+#include // get std::snprintf or std::sprintf -+#include -+#include // For codecvt -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this -+#endif -+#ifdef __UCLIBC_HAS_LOCALE__ -+#include // For codecvt using iconv, iconv_t -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#include // For messages -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning what is _GLIBCXX_C_LOCALE_GNU for -+#endif -+#define _GLIBCXX_C_LOCALE_GNU 1 -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix categories -+#endif -+// #define _GLIBCXX_NUM_CATEGORIES 6 -+#define _GLIBCXX_NUM_CATEGORIES 0 -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+namespace __gnu_cxx -+{ -+ extern "C" __typeof(uselocale) __uselocale; -+} -+#endif -+ -+namespace std -+{ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ typedef __locale_t __c_locale; -+#else -+ typedef int* __c_locale; -+#endif -+ -+ // Convert numeric value of type _Tv to string and return length of -+ // string. If snprintf is available use it, otherwise fall back to -+ // the unsafe sprintf which, in general, can be dangerous and should -+ // be avoided. -+ template -+ int -+ __convert_from_v(char* __out, -+ const int __size __attribute__ ((__unused__)), -+ const char* __fmt, -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ _Tv __v, const __c_locale& __cloc, int __prec) -+ { -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc); -+#else -+ _Tv __v, const __c_locale&, int __prec) -+ { -+# ifdef __UCLIBC_HAS_LOCALE__ -+ char* __old = std::setlocale(LC_ALL, NULL); -+ char* __sav = new char[std::strlen(__old) + 1]; -+ std::strcpy(__sav, __old); -+ std::setlocale(LC_ALL, "C"); -+# endif -+#endif -+ -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ __gnu_cxx::__uselocale(__old); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ std::setlocale(LC_ALL, __sav); -+ delete [] __sav; -+#endif -+ return __ret; -+ } -+} -+ -+#endif -diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -new file mode 100644 -index 0000000..64aa962 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -@@ -0,0 +1,308 @@ -+// std::codecvt implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include // For MB_CUR_MAX -+#include // For MB_LEN_MAX -+#include -+ -+namespace std -+{ -+ // Specializations. -+#ifdef _GLIBCXX_USE_WCHAR_T -+ codecvt_base::result -+ codecvt:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters: -+ // in case we fall back to wcrtomb and then continue, in a loop. -+ // NB: wcsnrtombs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', -+ __from_end - __from_next); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // wcrtomb. -+ for (; __from < __from_next; ++__from) -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ extern_type __buf[MB_LEN_MAX]; -+ __tmp_state = __state; -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); -+ if (__conv > static_cast(__to_end - __to_next)) -+ __ret = partial; -+ else -+ { -+ memcpy(__to_next, __buf, __conv); -+ __state = __tmp_state; -+ __to_next += __conv; -+ ++__from_next; -+ } -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ codecvt_base::result -+ codecvt:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we store a L'\0' and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from_next, '\0', -+ __from_end -+ - __from_next)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (;; ++__to_next, __from += __conv) -+ { -+ __conv = mbrtowc(__to_next, __from, __from_end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __from_next = __from; -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ // It is unclear what to return in this case (see DR 382). -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ if (__to_next < __to_end) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from_next; -+ *__to_next++ = L'\0'; -+ } -+ else -+ __ret = partial; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_encoding() const throw() -+ { -+ // XXX This implementation assumes that the encoding is -+ // stateless and is either single-byte or variable-width. -+ int __ret = 0; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ if (MB_CUR_MAX == 1) -+ __ret = 1; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_max_length() const throw() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ // XXX Probably wrong for stateful encodings. -+ int __ret = MB_CUR_MAX; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_length(state_type& __state, const extern_type* __from, -+ const extern_type* __end, size_t __max) const -+ { -+ int __ret = 0; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we advance past it and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider -+ // its fourth parameter (it wouldn't with NULL as first parameter). -+ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) -+ * __max)); -+ while (__from < __end && __max) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from, '\0', -+ __end -+ - __from)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __end; -+ -+ const extern_type* __tmp_from = __from; -+ size_t __conv = mbsnrtowcs(__to, &__from, -+ __from_chunk_end - __from, -+ __max, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (__from = __tmp_from;; __from += __conv) -+ { -+ __conv = mbrtowc(NULL, __from, __end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __state = __tmp_state; -+ __ret += __from - __tmp_from; -+ break; -+ } -+ if (!__from) -+ __from = __from_chunk_end; -+ -+ __ret += __from - __tmp_from; -+ __max -= __conv; -+ -+ if (__from < __end && __max) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from; -+ ++__ret; -+ --__max; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc -new file mode 100644 -index 0000000..c2664a7 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -0,0 +1,80 @@ -+// std::collate implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+#endif -+ -+namespace std -+{ -+ // These are basically extensions to char_traits, and perhaps should -+ // be put there instead of here. -+ template<> -+ int -+ collate::_M_compare(const char* __one, const char* __two) const -+ { -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(char* __to, const char* __from, -+ size_t __n) const -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ int -+ collate::_M_compare(const wchar_t* __one, -+ const wchar_t* __two) const -+ { -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(wchar_t* __to, const wchar_t* __from, -+ size_t __n) const -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -new file mode 100644 -index 0000000..7294e3a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -0,0 +1,300 @@ -+// std::ctype implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __wctype_l(S, L) wctype((S)) -+#define __towupper_l(C, L) towupper((C)) -+#define __towlower_l(C, L) towlower((C)) -+#define __iswctype_l(C, M, L) iswctype((C), (M)) -+#endif -+ -+namespace std -+{ -+ // NB: The other ctype specializations are in src/locale.cc and -+ // various /config/os/* files. -+ template<> -+ ctype_byname::ctype_byname(const char* __s, size_t __refs) -+ : ctype(0, false, __refs) -+ { -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype); -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b; -+#endif -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ ctype::__wmask_type -+ ctype::_M_convert_to_wmask(const mask __m) const -+ { -+ __wmask_type __ret; -+ switch (__m) -+ { -+ case space: -+ __ret = __wctype_l("space", _M_c_locale_ctype); -+ break; -+ case print: -+ __ret = __wctype_l("print", _M_c_locale_ctype); -+ break; -+ case cntrl: -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype); -+ break; -+ case upper: -+ __ret = __wctype_l("upper", _M_c_locale_ctype); -+ break; -+ case lower: -+ __ret = __wctype_l("lower", _M_c_locale_ctype); -+ break; -+ case alpha: -+ __ret = __wctype_l("alpha", _M_c_locale_ctype); -+ break; -+ case digit: -+ __ret = __wctype_l("digit", _M_c_locale_ctype); -+ break; -+ case punct: -+ __ret = __wctype_l("punct", _M_c_locale_ctype); -+ break; -+ case xdigit: -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype); -+ break; -+ case alnum: -+ __ret = __wctype_l("alnum", _M_c_locale_ctype); -+ break; -+ case graph: -+ __ret = __wctype_l("graph", _M_c_locale_ctype); -+ break; -+ default: -+ __ret = __wmask_type(); -+ } -+ return __ret; -+ } -+ -+ wchar_t -+ ctype::do_toupper(wchar_t __c) const -+ { return __towupper_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ wchar_t -+ ctype::do_tolower(wchar_t __c) const -+ { return __towlower_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ bool -+ ctype:: -+ do_is(mask __m, wchar_t __c) const -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ bool __ret = false; -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur] -+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ return __ret; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const -+ { -+ for (; __lo < __hi; ++__vec, ++__lo) -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ mask __m = 0; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ __m |= _M_bit[__bitcur]; -+ *__vec = __m; -+ } -+ return __hi; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi && !this->do_is(__m, *__lo)) -+ ++__lo; -+ return __lo; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const -+ { -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0) -+ ++__lo; -+ return __lo; -+ } -+ -+ wchar_t -+ ctype:: -+ do_widen(char __c) const -+ { return _M_widen[static_cast(__c)]; } -+ -+ const char* -+ ctype:: -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const -+ { -+ while (__lo < __hi) -+ { -+ *__dest = _M_widen[static_cast(*__lo)]; -+ ++__lo; -+ ++__dest; -+ } -+ return __hi; -+ } -+ -+ char -+ ctype:: -+ do_narrow(wchar_t __wc, char __dfault) const -+ { -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) -+ return _M_narrow[__wc]; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ const int __c = wctob(__wc); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, -+ char* __dest) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ if (_M_narrow_ok) -+ while (__lo < __hi) -+ { -+ if (*__lo >= 0 && *__lo < 128) -+ *__dest = _M_narrow[*__lo]; -+ else -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ ++__lo; -+ ++__dest; -+ } -+ else -+ while (__lo < __hi) -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ ++__lo; -+ ++__dest; -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __hi; -+ } -+ -+ void -+ ctype::_M_initialize_ctype() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ wint_t __i; -+ for (__i = 0; __i < 128; ++__i) -+ { -+ const int __c = wctob(__i); -+ if (__c == EOF) -+ break; -+ else -+ _M_narrow[__i] = static_cast(__c); -+ } -+ if (__i == 128) -+ _M_narrow_ok = true; -+ else -+ _M_narrow_ok = false; -+ for (size_t __j = 0; -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) -+ _M_widen[__j] = btowc(__j); -+ -+ for (size_t __k = 0; __k <= 11; ++__k) -+ { -+ _M_bit[__k] = static_cast(_ISbit(__k)); -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ } -+#endif // _GLIBCXX_USE_WCHAR_T -+} -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc -new file mode 100644 -index 0000000..13594d9 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -0,0 +1,100 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix gettext stuff -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__dcgettext(const char *domainname, -+ const char *msgid, int category); -+#undef gettext -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#else -+#undef gettext -+#define gettext(msgid) (msgid) -+#endif -+ -+namespace std -+{ -+ // Specializations. -+ template<> -+ string -+ messages::do_get(catalog, int, int, const string& __dfault) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ const char* __msg = const_cast(gettext(__dfault.c_str())); -+ __uselocale(__old); -+ return string(__msg); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ const char* __msg = gettext(__dfault.c_str()); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return string(__msg); -+#else -+ const char* __msg = gettext(__dfault.c_str()); -+ return string(__msg); -+#endif -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ wstring -+ messages::do_get(catalog, int, int, const wstring& __dfault) const -+ { -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ __uselocale(__old); -+ return _M_convert_from_char(__msg); -+# elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return _M_convert_from_char(__msg); -+# else -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ return _M_convert_from_char(__msg); -+# endif -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -new file mode 100644 -index 0000000..1424078 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -0,0 +1,118 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix prototypes for *textdomain funcs -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__textdomain(const char *domainname); -+extern "C" char *__bindtextdomain(const char *domainname, -+ const char *dirname); -+#else -+#undef __textdomain -+#undef __bindtextdomain -+#define __textdomain(D) ((void)0) -+#define __bindtextdomain(D,P) ((void)0) -+#endif -+ -+ // Non-virtual member functions. -+ template -+ messages<_CharT>::messages(size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -+ _M_name_messages(_S_get_c_name()) -+ { } -+ -+ template -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -+ _M_name_messages(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_messages = __tmp; -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::open(const basic_string& __s, const locale& __loc, -+ const char* __dir) const -+ { -+ __bindtextdomain(__s.c_str(), __dir); -+ return this->do_open(__s, __loc); -+ } -+ -+ // Virtual member functions. -+ template -+ messages<_CharT>::~messages() -+ { -+ if (_M_name_messages != _S_get_c_name()) -+ delete [] _M_name_messages; -+ _S_destroy_c_locale(_M_c_locale_messages); -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::do_open(const basic_string& __s, -+ const locale&) const -+ { -+ // No error checking is done, assume the catalog exists and can -+ // be used. -+ __textdomain(__s.c_str()); -+ return 0; -+ } -+ -+ template -+ void -+ messages<_CharT>::do_close(catalog) const -+ { } -+ -+ // messages_byname -+ template -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) -+ : messages<_CharT>(__refs) -+ { -+ if (this->_M_name_messages != locale::facet::_S_get_c_name()) -+ delete [] this->_M_name_messages; -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ this->_M_name_messages = __tmp; -+ -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_messages); -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s); -+ } -+ } -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -new file mode 100644 -index 0000000..aa52731 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -0,0 +1,692 @@ -+// std::moneypunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning optimize this for uclibc -+#warning tailor for stub locale support -+#endif -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ // Construct and return valid pattern consisting of some combination of: -+ // space none symbol sign value -+ money_base::pattern -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) -+ { -+ pattern __ret; -+ -+ // This insanely complicated routine attempts to construct a valid -+ // pattern for use with monyepunct. A couple of invariants: -+ -+ // if (__precedes) symbol -> value -+ // else value -> symbol -+ -+ // if (__space) space -+ // else none -+ -+ // none == never first -+ // space never first or last -+ -+ // Any elegant implementations of this are welcome. -+ switch (__posn) -+ { -+ case 0: -+ case 1: -+ // 1 The sign precedes the value and symbol. -+ __ret.field[0] = sign; -+ if (__space) -+ { -+ // Pattern starts with sign. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[3] = symbol; -+ } -+ __ret.field[2] = space; -+ } -+ else -+ { -+ // Pattern starts with sign and ends with none. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[3] = none; -+ } -+ break; -+ case 2: -+ // 2 The sign follows the value and symbol. -+ if (__space) -+ { -+ // Pattern either ends with sign. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[1] = space; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ // Pattern ends with sign then none. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[1] = symbol; -+ } -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ break; -+ case 3: -+ // 3 The sign immediately precedes the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = sign; -+ __ret.field[1] = symbol; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = sign; -+ __ret.field[3] = symbol; -+ } -+ else -+ { -+ __ret.field[1] = sign; -+ __ret.field[2] = symbol; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ case 4: -+ // 4 The sign immediately follows the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = sign; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = symbol; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ default: -+ ; -+ } -+ return __ret; -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == true -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == false -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len; -+ __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -new file mode 100644 -index 0000000..883ec1a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -0,0 +1,160 @@ -+// std::numpunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, -+ __cloc)); -+ -+ // Check for NULL, which implies no grouping. -+ if (_M_data->_M_thousands_sep == '\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = "true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = "false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = -+ static_cast(__num_base::_S_atoms_out[__i]); -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = -+ static_cast(__num_base::_S_atoms_in[__j]); -+ } -+ else -+ { -+ // Named locale. -+ // NB: In the GNU model wchar_t is always 32 bit wide. -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+ -+ if (_M_data->_M_thousands_sep == L'\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = L"true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = L"false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ #endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -new file mode 100644 -index 0000000..e0707d7 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -0,0 +1,406 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __timepunct:: -+ _M_put(char* __s, size_t __maxlen, const char* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = strftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = '\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = "%m/%d/%y"; -+ _M_data->_M_date_era_format = "%m/%d/%y"; -+ _M_data->_M_time_format = "%H:%M:%S"; -+ _M_data->_M_time_era_format = "%H:%M:%S"; -+ _M_data->_M_date_time_format = ""; -+ _M_data->_M_date_time_era_format = ""; -+ _M_data->_M_am = "AM"; -+ _M_data->_M_pm = "PM"; -+ _M_data->_M_am_pm_format = ""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = "Sunday"; -+ _M_data->_M_day2 = "Monday"; -+ _M_data->_M_day3 = "Tuesday"; -+ _M_data->_M_day4 = "Wednesday"; -+ _M_data->_M_day5 = "Thursday"; -+ _M_data->_M_day6 = "Friday"; -+ _M_data->_M_day7 = "Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = "Sun"; -+ _M_data->_M_aday2 = "Mon"; -+ _M_data->_M_aday3 = "Tue"; -+ _M_data->_M_aday4 = "Wed"; -+ _M_data->_M_aday5 = "Thu"; -+ _M_data->_M_aday6 = "Fri"; -+ _M_data->_M_aday7 = "Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = "January"; -+ _M_data->_M_month02 = "February"; -+ _M_data->_M_month03 = "March"; -+ _M_data->_M_month04 = "April"; -+ _M_data->_M_month05 = "May"; -+ _M_data->_M_month06 = "June"; -+ _M_data->_M_month07 = "July"; -+ _M_data->_M_month08 = "August"; -+ _M_data->_M_month09 = "September"; -+ _M_data->_M_month10 = "October"; -+ _M_data->_M_month11 = "November"; -+ _M_data->_M_month12 = "December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = "Jan"; -+ _M_data->_M_amonth02 = "Feb"; -+ _M_data->_M_amonth03 = "Mar"; -+ _M_data->_M_amonth04 = "Apr"; -+ _M_data->_M_amonth05 = "May"; -+ _M_data->_M_amonth06 = "Jun"; -+ _M_data->_M_amonth07 = "Jul"; -+ _M_data->_M_amonth08 = "Aug"; -+ _M_data->_M_amonth09 = "Sep"; -+ _M_data->_M_amonth10 = "Oct"; -+ _M_data->_M_amonth11 = "Nov"; -+ _M_data->_M_amonth12 = "Dec"; -+ } -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, -+ __cloc); -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ __timepunct:: -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = L'\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+#warning wide time stuff -+// if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = L"%m/%d/%y"; -+ _M_data->_M_date_era_format = L"%m/%d/%y"; -+ _M_data->_M_time_format = L"%H:%M:%S"; -+ _M_data->_M_time_era_format = L"%H:%M:%S"; -+ _M_data->_M_date_time_format = L""; -+ _M_data->_M_date_time_era_format = L""; -+ _M_data->_M_am = L"AM"; -+ _M_data->_M_pm = L"PM"; -+ _M_data->_M_am_pm_format = L""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = L"Sunday"; -+ _M_data->_M_day2 = L"Monday"; -+ _M_data->_M_day3 = L"Tuesday"; -+ _M_data->_M_day4 = L"Wednesday"; -+ _M_data->_M_day5 = L"Thursday"; -+ _M_data->_M_day6 = L"Friday"; -+ _M_data->_M_day7 = L"Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = L"Sun"; -+ _M_data->_M_aday2 = L"Mon"; -+ _M_data->_M_aday3 = L"Tue"; -+ _M_data->_M_aday4 = L"Wed"; -+ _M_data->_M_aday5 = L"Thu"; -+ _M_data->_M_aday6 = L"Fri"; -+ _M_data->_M_aday7 = L"Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = L"January"; -+ _M_data->_M_month02 = L"February"; -+ _M_data->_M_month03 = L"March"; -+ _M_data->_M_month04 = L"April"; -+ _M_data->_M_month05 = L"May"; -+ _M_data->_M_month06 = L"June"; -+ _M_data->_M_month07 = L"July"; -+ _M_data->_M_month08 = L"August"; -+ _M_data->_M_month09 = L"September"; -+ _M_data->_M_month10 = L"October"; -+ _M_data->_M_month11 = L"November"; -+ _M_data->_M_month12 = L"December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = L"Jan"; -+ _M_data->_M_amonth02 = L"Feb"; -+ _M_data->_M_amonth03 = L"Mar"; -+ _M_data->_M_amonth04 = L"Apr"; -+ _M_data->_M_amonth05 = L"May"; -+ _M_data->_M_amonth06 = L"Jun"; -+ _M_data->_M_amonth07 = L"Jul"; -+ _M_data->_M_amonth08 = L"Aug"; -+ _M_data->_M_amonth09 = L"Sep"; -+ _M_data->_M_amonth10 = L"Oct"; -+ _M_data->_M_amonth11 = L"Nov"; -+ _M_data->_M_amonth12 = L"Dec"; -+ } -+#if 0 -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ union { char *__s; wchar_t *__w; } __u; -+ -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); -+ _M_data->_M_date_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); -+ _M_data->_M_date_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); -+ _M_data->_M_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); -+ _M_data->_M_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); -+ _M_data->_M_am = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); -+ _M_data->_M_pm = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); -+ _M_data->_M_am_pm_format = __u.__w; -+ -+ // Day names, starting with "C"'s Sunday. -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); -+ _M_data->_M_day1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); -+ _M_data->_M_day2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); -+ _M_data->_M_day3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); -+ _M_data->_M_day4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); -+ _M_data->_M_day5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); -+ _M_data->_M_day6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); -+ _M_data->_M_day7 = __u.__w; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); -+ _M_data->_M_aday1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); -+ _M_data->_M_aday2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); -+ _M_data->_M_aday3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); -+ _M_data->_M_aday4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); -+ _M_data->_M_aday5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); -+ _M_data->_M_aday6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); -+ _M_data->_M_aday7 = __u.__w; -+ -+ // Month names, starting with "C"'s January. -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); -+ _M_data->_M_month01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); -+ _M_data->_M_month02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); -+ _M_data->_M_month03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); -+ _M_data->_M_month04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); -+ _M_data->_M_month05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); -+ _M_data->_M_month06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); -+ _M_data->_M_month07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); -+ _M_data->_M_month08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); -+ _M_data->_M_month09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); -+ _M_data->_M_month10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); -+ _M_data->_M_month11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); -+ _M_data->_M_month12 = __u.__w; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); -+ _M_data->_M_amonth01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); -+ _M_data->_M_amonth02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); -+ _M_data->_M_amonth03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); -+ _M_data->_M_amonth04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); -+ _M_data->_M_amonth05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); -+ _M_data->_M_amonth06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); -+ _M_data->_M_amonth07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); -+ _M_data->_M_amonth08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); -+ _M_data->_M_amonth09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); -+ _M_data->_M_amonth10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); -+ _M_data->_M_amonth11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); -+ _M_data->_M_amonth12 = __u.__w; -+ } -+#endif // 0 -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h -new file mode 100644 -index 0000000..ba8e858 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -0,0 +1,68 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions -+// -+ -+// Written by Benjamin Kosnik -+ -+ template -+ __timepunct<_CharT>::__timepunct(size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_timepunct = __tmp; -+ _M_initialize_timepunct(__cloc); -+ } -+ -+ template -+ __timepunct<_CharT>::~__timepunct() -+ { -+ if (_M_name_timepunct != _S_get_c_name()) -+ delete [] _M_name_timepunct; -+ delete _M_data; -+ _S_destroy_c_locale(_M_c_locale_timepunct); -+ } -diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index 8cd4c76..217012e 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -15918,6 +15918,9 @@ fi - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - enable_clocale_flag=gnu - ;; -@@ -16196,6 +16199,78 @@ $as_echo "newlib" >&6; } - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5 -+$as_echo "uclibc" >&6; } -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ # Extract the first word of "msgfmt", so it can be a program name with args. -+set dummy msgfmt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$check_msgfmt"; then -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_check_msgfmt="yes" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" -+fi -+fi -+check_msgfmt=$ac_cv_prog_check_msgfmt -+if test -n "$check_msgfmt"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5 -+$as_echo "$check_msgfmt" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ -+ -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the -diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h -index 06b5d47..7d3f835 100644 ---- a/libstdc++-v3/include/c_compatibility/wchar.h -+++ b/libstdc++-v3/include/c_compatibility/wchar.h -@@ -101,7 +101,9 @@ using std::wmemcmp; - using std::wmemcpy; - using std::wmemmove; - using std::wmemset; -+#if _GLIBCXX_HAVE_WCSFTIME - using std::wcsftime; -+#endif - - #if _GLIBCXX_USE_C99 - using std::wcstold; -diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar -index aa1b2fa..45c4617 100644 ---- a/libstdc++-v3/include/c_std/cwchar -+++ b/libstdc++-v3/include/c_std/cwchar -@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#if _GLIBCXX_HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch deleted file mode 100644 index 19a86a4e1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 72a1a4af3c18627f59aa5ba1f753a89011b4e4f0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:42:36 +0400 -Subject: [PATCH 05/46] uclibc-locale-no__x - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++ - libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------- - libstdc++-v3/config/locale/uclibc/c_locale.h | 1 + - .../config/locale/uclibc/collate_members.cc | 7 ---- - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ---- - .../config/locale/uclibc/messages_members.cc | 7 +--- - .../config/locale/uclibc/messages_members.h | 18 ++++----- - .../config/locale/uclibc/monetary_members.cc | 4 -- - .../config/locale/uclibc/numeric_members.cc | 3 -- - libstdc++-v3/config/locale/uclibc/time_members.cc | 3 -- - 10 files changed, 55 insertions(+), 54 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -index 2ae3e4a..e74fddf 100644 ---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; - extern "C" __typeof(wctype_l) __wctype_l; - #endif - -+# define __nl_langinfo_l nl_langinfo_l -+# define __strcoll_l strcoll_l -+# define __strftime_l strftime_l -+# define __strtod_l strtod_l -+# define __strtof_l strtof_l -+# define __strtold_l strtold_l -+# define __strxfrm_l strxfrm_l -+# define __newlocale newlocale -+# define __freelocale freelocale -+# define __duplocale duplocale -+# define __uselocale uselocale -+ -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l iswctype_l -+# define __towlower_l towlower_l -+# define __towupper_l towupper_l -+# define __wcscoll_l wcscoll_l -+# define __wcsftime_l wcsftime_l -+# define __wcsxfrm_l wcsxfrm_l -+# define __wctype_l wctype_l -+# endif -+ -+#else -+# define __nl_langinfo_l(N, L) nl_langinfo((N)) -+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+# define __strtod_l(S, E, L) strtod((S), (E)) -+# define __strtof_l(S, E, L) strtof((S), (E)) -+# define __strtold_l(S, E, L) strtold((S), (E)) -+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+# warning should dummy __newlocale check for C|POSIX ? -+# define __newlocale(a, b, c) NULL -+# define __freelocale(a) ((void)0) -+# define __duplocale(a) __c_locale() -+//# define __uselocale ? -+// -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l(C, M, L) iswctype((C), (M)) -+# define __towlower_l(C, L) towlower((C)) -+# define __towupper_l(C, L) towupper((C)) -+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) -+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+# define __wctype_l(S, L) wctype((S)) -+# endif -+ - #endif // GLIBC 2.3 and later -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -index 5081dc1..21430d0 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -39,20 +39,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) --#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) --#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) --#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) --#define __strtof_l(S, E, L) strtof((S), (E)) --#define __strtod_l(S, E, L) strtod((S), (E)) --#define __strtold_l(S, E, L) strtold((S), (E)) --#warning should dummy __newlocale check for C|POSIX ? --#define __newlocale(a, b, c) NULL --#define __freelocale(a) ((void)0) --#define __duplocale(a) __c_locale() --#endif -- - namespace std - { - template<> -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -index da07c1f..4bca5f1 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -68,6 +68,7 @@ namespace __gnu_cxx - { - extern "C" __typeof(uselocale) __uselocale; - } -+#define __uselocale uselocale - #endif - - namespace std -diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc -index c2664a7..ec5c329 100644 ---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -36,13 +36,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) --#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) --#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) --#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) --#endif -- - namespace std - { - // These are basically extensions to char_traits, and perhaps should -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -index 7294e3a..7b12861 100644 ---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -38,13 +38,6 @@ - #undef _LIBC - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __wctype_l(S, L) wctype((S)) --#define __towupper_l(C, L) towupper((C)) --#define __towlower_l(C, L) towlower((C)) --#define __iswctype_l(C, M, L) iswctype((C), (M)) --#endif -- - namespace std - { - // NB: The other ctype specializations are in src/locale.cc and -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc -index 13594d9..d7693b4 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -39,13 +39,10 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix gettext stuff - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__dcgettext(const char *domainname, -- const char *msgid, int category); - #undef gettext --#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) - #else --#undef gettext - #define gettext(msgid) (msgid) - #endif - -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -index 1424078..d89da33 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -36,15 +36,11 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix prototypes for *textdomain funcs - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__textdomain(const char *domainname); --extern "C" char *__bindtextdomain(const char *domainname, -- const char *dirname); --#else --#undef __textdomain --#undef __bindtextdomain --#define __textdomain(D) ((void)0) --#define __bindtextdomain(D,P) ((void)0) -+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#undef textdomain -+#undef bindtextdomain -+#define textdomain(D) ((void)0) -+#define bindtextdomain(D,P) ((void)0) - #endif - - // Non-virtual member functions. -@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname, - messages<_CharT>::open(const basic_string& __s, const locale& __loc, - const char* __dir) const - { -- __bindtextdomain(__s.c_str(), __dir); -+ bindtextdomain(__s.c_str(), __dir); - return this->do_open(__s, __loc); - } - -@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname, - { - // No error checking is done, assume the catalog exists and can - // be used. -- __textdomain(__s.c_str()); -+ textdomain(__s.c_str()); - return 0; - } - -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index aa52731..2e6f80a 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -43,10 +43,6 @@ - #warning tailor for stub locale support - #endif - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif -- - namespace std - { - // Construct and return valid pattern consisting of some combination of: -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index 883ec1a..2c70642 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -41,9 +41,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -index e0707d7..d848ed5 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -40,9 +40,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch deleted file mode 100644 index d7dbe68bd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch +++ /dev/null @@ -1,68 +0,0 @@ -From b1298344f0c221c382a95af689f7f3ecd864f531 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:45:57 +0400 -Subject: [PATCH 06/46] uclibc-locale-wchar_fix - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++-- - libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++ - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index 2e6f80a..31ebb9f 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -401,7 +401,7 @@ namespace std - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif -@@ -556,7 +556,7 @@ namespace std - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index 2c70642..d5c8961 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -127,12 +127,25 @@ namespace std - { - // Named locale. - // NB: In the GNU model wchar_t is always 32 bit wide. -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be numeric -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# elif defined __UCLIBC_HAS_LOCALE__ -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else - union { char *__s; wchar_t __w; } __u; - __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); - _M_data->_M_decimal_point = __u.__w; - - __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); - _M_data->_M_thousands_sep = __u.__w; -+#endif - - if (_M_data->_M_thousands_sep == L'\0') - _M_data->_M_grouping = ""; --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch deleted file mode 100644 index cde749931..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch +++ /dev/null @@ -1,542 +0,0 @@ -From e9d7cb62741c22d667fe56e98d50753d89aefdc3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:46:58 +0400 -Subject: [PATCH 07/46] uclibc-locale-update - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - .../config/locale/uclibc/c++locale_internal.h | 3 + - libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------ - libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------ - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++---- - .../config/locale/uclibc/messages_members.h | 12 ++-- - .../config/locale/uclibc/monetary_members.cc | 34 ++++++---- - .../config/locale/uclibc/numeric_members.cc | 5 ++ - libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++-- - libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++-- - 9 files changed, 158 insertions(+), 98 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -index e74fddf..971a6b4 100644 ---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -31,6 +31,9 @@ - - #include - #include -+#include -+#include -+#include - - #ifdef __UCLIBC_MJN3_ONLY__ - #warning clean this up -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -index 21430d0..1b9d8e1 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -39,23 +39,20 @@ - #include - #include - --namespace std --{ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - template<> - void - __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- float __f = __strtof_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __f; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -63,16 +60,13 @@ namespace std - __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- double __d = __strtod_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __d; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -80,16 +74,13 @@ namespace std - __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- long double __ld = __strtold_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __ld; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; - } - - void -@@ -110,17 +101,18 @@ namespace std - void - locale::facet::_S_destroy_c_locale(__c_locale& __cloc) - { -- if (_S_get_c_locale() != __cloc) -+ if (__cloc && _S_get_c_locale() != __cloc) - __freelocale(__cloc); - } - - __c_locale - locale::facet::_S_clone_c_locale(__c_locale& __cloc) - { return __duplocale(__cloc); } --} // namespace std - --namespace __gnu_cxx --{ -+_GLIBCXX_END_NAMESPACE -+ -+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) -+ - const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = - { - "LC_CTYPE", -@@ -138,9 +130,11 @@ namespace __gnu_cxx - "LC_IDENTIFICATION" - #endif - }; --} - --namespace std --{ -+_GLIBCXX_END_NAMESPACE -+ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - const char* const* const locale::_S_categories = __gnu_cxx::category_names; --} // namespace std -+ -+_GLIBCXX_END_NAMESPACE -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -index 4bca5f1..64a6d46 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -39,21 +39,23 @@ - #pragma GCC system_header - - #include // get std::strlen --#include // get std::snprintf or std::sprintf -+#include // get std::vsnprintf or std::vsprintf - #include - #include // For codecvt - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix this - #endif --#ifdef __UCLIBC_HAS_LOCALE__ -+#ifdef _GLIBCXX_USE_ICONV - #include // For codecvt using iconv, iconv_t - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --#include // For messages -+#ifdef HAVE_LIBINTL_H -+#include // For messages - #endif -+#include - - #ifdef __UCLIBC_MJN3_ONLY__ - #warning what is _GLIBCXX_C_LOCALE_GNU for -+// psm: used in os/gnu-linux/ctype_noninline.h - #endif - #define _GLIBCXX_C_LOCALE_GNU 1 - -@@ -78,23 +80,25 @@ namespace std - #else - typedef int* __c_locale; - #endif -- -- // Convert numeric value of type _Tv to string and return length of -- // string. If snprintf is available use it, otherwise fall back to -- // the unsafe sprintf which, in general, can be dangerous and should -+ // Convert numeric value of type double to string and return length of -+ // string. If vsnprintf is available use it, otherwise fall back to -+ // the unsafe vsprintf which, in general, can be dangerous and should - // be avoided. -- template -- int -- __convert_from_v(char* __out, -- const int __size __attribute__ ((__unused__)), -- const char* __fmt, --#ifdef __UCLIBC_HAS_XCLOCALE__ -- _Tv __v, const __c_locale& __cloc, int __prec) -+ inline int -+ __convert_from_v(const __c_locale& -+#ifndef __UCLIBC_HAS_XCLOCALE__ -+ __cloc __attribute__ ((__unused__)) -+#endif -+ , -+ char* __out, -+ const int __size, -+ const char* __fmt, ...) - { -+ va_list __args; -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ - __c_locale __old = __gnu_cxx::__uselocale(__cloc); - #else -- _Tv __v, const __c_locale&, int __prec) -- { - # ifdef __UCLIBC_HAS_LOCALE__ - char* __old = std::setlocale(LC_ALL, NULL); - char* __sav = new char[std::strlen(__old) + 1]; -@@ -103,7 +107,9 @@ namespace std - # endif - #endif - -- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ va_start(__args, __fmt); -+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args); -+ va_end(__args); - - #ifdef __UCLIBC_HAS_XCLOCALE__ - __gnu_cxx::__uselocale(__old); -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -index 7b12861..13e011d 100644 ---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -33,16 +33,20 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - --namespace std --{ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - // NB: The other ctype specializations are in src/locale.cc and - // various /config/os/* files. -- template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(0, false, __refs) - { -@@ -57,6 +61,8 @@ namespace std - #endif - } - } -+ ctype_byname::~ctype_byname() -+ { } - - #ifdef _GLIBCXX_USE_WCHAR_T - ctype::__wmask_type -@@ -138,17 +144,33 @@ namespace std - ctype:: - do_is(mask __m, wchar_t __c) const - { -- // Highest bitmask in ctype_base == 10, but extra in "C" -- // library for blank. -+ // The case of __m == ctype_base::space is particularly important, -+ // due to its use in many istream functions. Therefore we deal with -+ // it first, exploiting the knowledge that on GNU systems _M_bit[5] -+ // is the mask corresponding to ctype_base::space. NB: an encoding -+ // change would not affect correctness! -+ - bool __ret = false; -- const size_t __bitmasksize = 11; -- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -- if (__m & _M_bit[__bitcur] -- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -- { -- __ret = true; -- break; -- } -+ if (__m == _M_bit[5]) -+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); -+ else -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur]) -+ { -+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ else if (__m == _M_bit[__bitcur]) -+ break; -+ } -+ } -+ - return __ret; - } - -@@ -290,4 +312,5 @@ namespace std - #endif - } - #endif // _GLIBCXX_USE_WCHAR_T --} -+ -+_GLIBCXX_END_NAMESPACE -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -index d89da33..067657a 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -53,12 +53,16 @@ - template - messages<_CharT>::messages(__c_locale __cloc, const char* __s, - size_t __refs) -- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -- _M_name_messages(__s) -+ : facet(__refs), _M_c_locale_messages(NULL), -+ _M_name_messages(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_messages = __tmp; -+ -+ // Last to avoid leaking memory if new throws. -+ _M_c_locale_messages = _S_clone_c_locale(__cloc); - } - - template -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index 31ebb9f..7679b9c 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ -@@ -206,7 +211,7 @@ namespace std - } - break; - default: -- ; -+ __ret = pattern(); - } - return __ret; - } -@@ -390,7 +395,9 @@ namespace std - __c_locale __old = __uselocale(__cloc); - #else - // Switch to named locale so that mbsrtowcs will work. -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; - setlocale(LC_ALL, __name); - #endif - -@@ -477,8 +484,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - __throw_exception_again; - } -@@ -498,8 +505,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - } - } -@@ -545,8 +552,11 @@ namespace std - __c_locale __old = __uselocale(__cloc); - #else - // Switch to named locale so that mbsrtowcs will work. -- char* __old = strdup(setlocale(LC_ALL, NULL)); -- setlocale(LC_ALL, __name); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); -+ setlocale(LC_ALL, __name); - #endif - - #ifdef __UCLIBC_MJN3_ONLY__ -@@ -633,8 +643,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - __throw_exception_again; - } -@@ -653,8 +663,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - } - } -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index d5c8961..8ae8969 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -index d848ed5..f24d53e 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -53,11 +53,14 @@ namespace std - const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, - _M_c_locale_timepunct); - #else -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); - setlocale(LC_ALL, _M_name_timepunct); - const size_t __len = strftime(__s, __maxlen, __format, __tm); -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - // Make sure __s is null terminated. - if (__len == 0) -@@ -207,11 +210,14 @@ namespace std - const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, - _M_c_locale_timepunct); - #else -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); - setlocale(LC_ALL, _M_name_timepunct); - const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - // Make sure __s is null terminated. - if (__len == 0) -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h -index ba8e858..1665dde 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.h -+++ b/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -50,12 +50,21 @@ - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -- _M_name_timepunct(__s) -+ _M_name_timepunct(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_timepunct = __tmp; -- _M_initialize_timepunct(__cloc); -+ -+ try -+ { _M_initialize_timepunct(__cloc); } -+ catch(...) -+ { -+ delete [] _M_name_timepunct; -+ __throw_exception_again; -+ } -+ - } - - template --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch deleted file mode 100644 index 9f8793125..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9b7442069eb68a42d2437181c1b2e710dd077e8b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:48:10 +0400 -Subject: [PATCH 08/46] missing-execinfo_h - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - boehm-gc/include/gc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h -index 6b38f2d..fca98ff 100644 ---- a/boehm-gc/include/gc.h -+++ b/boehm-gc/include/gc.h -@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); - #if defined(__linux__) || defined(__GLIBC__) - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch deleted file mode 100644 index 6b236c62c..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fde97f80d2d931ed3fa4a86294799366b2359331 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:49:03 +0400 -Subject: [PATCH 09/46] c99-snprintf - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/include/c_std/cstdio | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio -index 37f01ca..f00c06d 100644 ---- a/libstdc++-v3/include/c_std/cstdio -+++ b/libstdc++-v3/include/c_std/cstdio -@@ -144,7 +144,7 @@ namespace std - using ::vsprintf; - } // namespace std - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch deleted file mode 100644 index 2da887767..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 7a90e62d557c78ae52006dff30c99006e10d9357 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH 10/46] gcc: poison-system-directories - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [distribution: codesourcery] ---- - gcc/common.opt | 4 ++++ - gcc/config.in | 6 ++++++ - gcc/configure | 16 ++++++++++++++++ - gcc/configure.ac | 10 ++++++++++ - gcc/doc/invoke.texi | 9 +++++++++ - gcc/gcc.c | 2 ++ - gcc/incpath.c | 19 +++++++++++++++++++ - 7 files changed, 66 insertions(+) - -diff --git a/gcc/common.opt b/gcc/common.opt -index 1218a71..bfba114 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -623,6 +623,10 @@ Wreturn-local-addr - Common Var(warn_return_local_addr) Init(1) Warning - Warn about returning a pointer/reference to a local or temporary variable. - -+Wpoison-system-directories -+Common Var(flag_poison_system_directories) Init(1) Warning -+Warn for -I and -L options using system directories if cross compiling -+ - Wshadow - Common Var(warn_shadow) Warning - Warn when one local variable shadows another -diff --git a/gcc/config.in b/gcc/config.in -index 5335258..f079826 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -168,6 +168,12 @@ - #endif - - -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif -+ -+ - /* Define if you want all operations on RTL (the basic data structure of the - optimizer and back end) to be checked for dynamic type safety at runtime. - This is quite expensive. */ -diff --git a/gcc/configure b/gcc/configure -index 3c92795..34371a3 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -933,6 +933,7 @@ with_system_zlib - enable_maintainer_mode - enable_link_mutex - enable_version_specific_runtime_libs -+enable_poison_system_directories - enable_plugin - enable_host_shared - enable_libquadmath_support -@@ -1670,6 +1671,8 @@ Optional Features: - --enable-version-specific-runtime-libs - specify that runtime libraries should be installed - in a compiler-specific directory -+ --enable-poison-system-directories -+ warn for use of native system header directories - --enable-plugin enable plugin support - --enable-host-shared build host code as shared libraries - --disable-libquadmath-support -@@ -28211,6 +28214,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Substitute configuration variables - - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index d414081..240d322 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5654,6 +5654,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, - [specify that runtime libraries should be - installed in a compiler-specific directory])]) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system header directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system header directories]) -+fi -+ - # Substitute configuration variables - AC_SUBST(subdirs) - AC_SUBST(srcdir) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index d3be589..c81b55b 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}. - -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol - -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol - -Wpointer-arith -Wno-pointer-to-int-cast @gol -+-Wno-poison-system-directories @gol - -Wredundant-decls -Wno-return-local-addr @gol - -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol - -Wshift-count-negative -Wshift-count-overflow @gol -@@ -4433,6 +4434,14 @@ made up of data only and thus requires no special treatment. But, for - most targets, it is made up of code and thus requires the stack to be - made executable in order for the program to work properly. - -+@item -Wno-poison-system-directories -+@opindex Wno-poison-system-directories -+Do not warn for @option{-I} or @option{-L} options using system -+directories such as @file{/usr/include} when cross compiling. This -+option is intended for use in chroot environments when such -+directories contain the correct headers and libraries for the target -+system rather than the host. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal -diff --git a/gcc/gcc.c b/gcc/gcc.c -index d956c36..675bcc1 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -835,6 +835,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ - "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ -+ %{Wno-poison-system-directories:--no-poison-system-directories}\ -+ %{Werror=poison-system-directories:--error-poison-system-directories}\ - %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ - " CHKP_SPEC " \ - %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ -diff --git a/gcc/incpath.c b/gcc/incpath.c -index 6c54ca6..cc0c921 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -28,6 +28,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "diagnostic-core.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - } - fprintf (stderr, _("End of search list.\n")); - } -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (flag_poison_system_directories) -+ { -+ struct cpp_dir *p; -+ -+ for (p = heads[QUOTE]; p; p = p->next) -+ { -+ if ((!strncmp (p->name, "/usr/include", 12)) -+ || (!strncmp (p->name, "/usr/local/include", 18)) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ warning (OPT_Wpoison_system_directories, -+ "include location \"%s\" is unsafe for " -+ "cross-compilation", -+ p->name); -+ } -+ } -+#endif - } - - /* Use given -I paths for #include "..." but not #include <...>, and --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch deleted file mode 100644 index 511e69481..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch +++ /dev/null @@ -1,39 +0,0 @@ -From db406054de6b0967cd76cbb998f05b0c5af0bd94 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:00:34 +0400 -Subject: [PATCH 11/46] gcc-poison-dir-extend - -Add /sw/include and /opt/include based on the original -zecke-no-host-includes.patch patch. The original patch checked for -/usr/include, /sw/include and /opt/include and then triggered a failure and -aborted. - -Instead, we add the two missing items to the current scan. If the user -wants this to be a failure, they can add "-Werror=poison-system-directories". - -Signed-off-by: Mark Hatle -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/incpath.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/gcc/incpath.c b/gcc/incpath.c -index cc0c921..0bc1f67 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - { - if ((!strncmp (p->name, "/usr/include", 12)) - || (!strncmp (p->name, "/usr/local/include", 18)) -- || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18)) -+ || (!strncmp (p->name, "/sw/include", 11)) -+ || (!strncmp (p->name, "/opt/include", 12))) - warning (OPT_Wpoison_system_directories, - "include location \"%s\" is unsafe for " - "cross-compilation", --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch deleted file mode 100644 index 750bbc823..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 278d293c4cee9482a23aa3443741861ff2f67212 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:08:31 +0400 -Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET - -Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. - -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. - -Other changes I had to do include: - -- 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. - -- passing the right CFLAGS to configure scripts as exported environment variables - -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. - -Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? - -Signed-off-by: Paolo Bonzini -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - configure | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/configure b/configure -index 1cba3a9..9cae8da 100755 ---- a/configure -+++ b/configure -@@ -6733,6 +6733,38 @@ fi - - - -+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS -+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS -+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). -+# We want to ensure that TARGET libraries (which we know are built with -+# gcc) are built with "-O2 -g", so include those options when setting -+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. -+if test "x$CFLAGS_FOR_TARGET" = x; then -+ CFLAGS_FOR_TARGET=$CFLAGS -+ case " $CFLAGS " in -+ *" -O2 "*) ;; -+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; -+ esac -+ case " $CFLAGS " in -+ *" -g "* | *" -g3 "*) ;; -+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; -+ esac -+fi -+ -+ -+if test "x$CXXFLAGS_FOR_TARGET" = x; then -+ CXXFLAGS_FOR_TARGET=$CXXFLAGS -+ case " $CXXFLAGS " in -+ *" -O2 "*) ;; -+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; -+ esac -+ case " $CXXFLAGS " in -+ *" -g "* | *" -g3 "*) ;; -+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; -+ esac -+fi -+ -+ - # Handle --with-headers=XXX. If the value is not "yes", the contents of - # the named directory are copied to $(tooldir)/sys-include. - if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch deleted file mode 100644 index 45aaf4cc2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch +++ /dev/null @@ -1,85 +0,0 @@ -From bdde4f5efa3c89ac7ee0bc05f322f27e3dabeab9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:10:06 +0400 -Subject: [PATCH 13/46] 64-bit multilib hack. - -GCC has internal multilib handling code but it assumes a very specific rigid directory -layout. The build system implementation of multilib layout is very generic and allows -complete customisation of the library directories. - -This patch is a partial solution to allow any custom directories to be passed into gcc -and handled correctly. It forces gcc to use the base_libdir (which is the current -directory, "."). We need to do this for each multilib that is configured as we don't -know which compiler options may be being passed into the compiler. Since we have a compiler -per mulitlib at this point that isn't an issue. - -The one problem is the target compiler is only going to work for the default multlilib at -this point. Ideally we'd figure out which multilibs were being enabled with which paths -and be able to patch these entries with a complete set of correct paths but this we -don't have such code at this point. This is something the target gcc recipe should do -and override these platform defaults in its build config. - -RP 15/8/11 - -Signed-off-by: Khem Raj -Signed-off-by: Elvis Dowson - -Upstream-Status: Pending ---- - gcc/config/i386/t-linux64 | 6 ++---- - gcc/config/mips/t-linux64 | 10 +++------- - gcc/config/rs6000/t-linux64 | 5 ++--- - 3 files changed, 7 insertions(+), 14 deletions(-) - -diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 -index f6dbb78..d770da5 100644 ---- a/gcc/config/i386/t-linux64 -+++ b/gcc/config/i386/t-linux64 -@@ -32,7 +32,5 @@ - # - comma=, - MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) --MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) --MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) --MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) --MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) -+MULTILIB_DIRNAMES = . . -+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) -diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 -index 7e96406..b72dcb0 100644 ---- a/gcc/config/mips/t-linux64 -+++ b/gcc/config/mips/t-linux64 -@@ -17,10 +17,6 @@ - # . - - MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 --MULTILIB_DIRNAMES = n32 32 64 --MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) --MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) --MULTILIB_OSDIRNAMES = \ -- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ -- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ -- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) -+MULTILIB_DIRNAMES = . . . -+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) -+ -diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 -index b6b351d..1d5b37a 100644 ---- a/gcc/config/rs6000/t-linux64 -+++ b/gcc/config/rs6000/t-linux64 -@@ -26,10 +26,9 @@ - # MULTILIB_OSDIRNAMES according to what is found on the target. - - MULTILIB_OPTIONS := m64/m32 --MULTILIB_DIRNAMES := 64 32 -+MULTILIB_DIRNAMES := . . - MULTILIB_EXTRA_OPTS := --MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) --MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) -+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) - - rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c - $(COMPILE) $< --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch deleted file mode 100644 index 73741f83c..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch +++ /dev/null @@ -1,101 +0,0 @@ -From a13763f8a1d413a432e7b40835a062f86208f29a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:12:56 +0400 -Subject: [PATCH 14/46] optional libstdc - -gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ -will not run correctly since by default the linker will try to link against libstdc++ -which shouldn't exist yet. We need an option to disable -lstdc++ -option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc -driver. This patch adds such an option which only disables the -lstdc++. - -A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to -do this officially, the likely answer is don't build libstdc++ separately. - -RP 29/6/10 - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - gcc/c-family/c.opt | 4 ++++ - gcc/cp/g++spec.c | 1 + - gcc/doc/invoke.texi | 8 +++++++- - gcc/gcc.c | 1 + - 4 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt -index 4162566..453ec8e 100644 ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1543,6 +1543,10 @@ nostdinc++ - C++ ObjC++ - Do not search standard system include directories for C++ - -+nostdlib++ -+Driver -+Do not link standard C++ runtime library -+ - o - C ObjC C++ ObjC++ Joined Separate - ; Documented in common.opt -diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c -index 6536d7e..f57a5d4 100644 ---- a/gcc/cp/g++spec.c -+++ b/gcc/cp/g++spec.c -@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, - switch (decoded_options[i].opt_index) - { - case OPT_nostdlib: -+ case OPT_nostdlib__: - case OPT_nodefaultlibs: - library = -1; - break; -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index c81b55b..6d3f68c 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -195,6 +195,7 @@ in the following sections. - -fvisibility-inlines-hidden @gol - -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol - -fvtv-counts -fvtv-debug @gol -+-nostdlib++ @gol - -fvisibility-ms-compat @gol - -fext-numeric-literals @gol - -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol -@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}. - -s -static -static-libgcc -static-libstdc++ @gol - -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol - -static-libmpx -static-libmpxwrappers @gol ---shared -shared-libgcc -symbolic @gol -+-shared -shared-libgcc -symbolic -nostdlib++ @gol - -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol - -u @var{symbol} -z @var{keyword}} - -@@ -11187,6 +11188,11 @@ These entries are usually resolved by entries in - libc. These entry points should be supplied through some other - mechanism when this option is specified. - -+@item -nostdlib++ -+@opindex nostdlib++ -+Do not use the standard system C++ runtime libraries when linking. -+Only the libraries you specify will be passed to the linker. -+ - @cindex @option{-lgcc}, use with @option{-nostdlib} - @cindex @option{-nostdlib} and unresolved references - @cindex unresolved references and @option{-nostdlib} -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 675bcc1..a37ec8b 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -845,6 +845,7 @@ proper position among the other output files. */ - %(mflib) " STACK_SPLIT_SPEC "\ - %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ - %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ -+ %{!nostdlib++:}\ - %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" - #endif - --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch deleted file mode 100644 index 1b62ef806..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 4bd21a1d63cfb14e261d90adc0c5d4f9462dc555 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:14:20 +0400 -Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit - -The new feature added after 4.3.3 -"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" -will cause cc1plus eat up all the system memory when build webkit-gtk. -The function mips_get_pic_call_symbol keeps on recursively calling itself. -Disable this feature to walk aside the bug. - -Signed-off-by: Dongxiao Xu -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [configuration] ---- - gcc/configure | 7 ------- - gcc/configure.ac | 7 ------- - 2 files changed, 14 deletions(-) - -diff --git a/gcc/configure b/gcc/configure -index 34371a3..8caecdc 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -26479,13 +26479,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; - rm -f conftest.* - fi - fi -- if test $gcc_cv_as_ld_jalr_reloc = yes; then -- if test x$target_cpu_default = x; then -- target_cpu_default=MASK_RELAX_PIC_CALLS -- else -- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" -- fi -- fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 - $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 240d322..57819ff 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -4384,13 +4384,6 @@ x: - rm -f conftest.* - fi - fi -- if test $gcc_cv_as_ld_jalr_reloc = yes; then -- if test x$target_cpu_default = x; then -- target_cpu_default=MASK_RELAX_PIC_CALLS -- else -- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" -- fi -- fi - AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) - - AC_CACHE_CHECK([linker for .eh_frame personality relaxation], --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch deleted file mode 100644 index e6ae262e4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 92427ebb94dc66f8e64ebf3ffbcd6dd5ce0935c1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:16:28 +0400 -Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS - -This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to -invoke collect2. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/gcc.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index a37ec8b..87b47c5 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void) - sizeof ("COLLECT_GCC_OPTIONS=") - 1); - - first_time = TRUE; -+#ifdef HAVE_LD_SYSROOT -+ if (target_system_root_changed && target_system_root) -+ { -+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); -+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); -+ obstack_grow (&collect_obstack, "'", 1); -+ first_time = FALSE; -+ } -+#endif - for (i = 0; (int) i < n_switches; i++) - { - const char *const *args; --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch deleted file mode 100644 index b89a27919..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch +++ /dev/null @@ -1,96 +0,0 @@ -From b1f3118e439459c26a3e19c617b7b0c93745e77a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:17:25 +0400 -Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in - ${B} - -Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that -the source can be shared between gcc-cross-initial, -gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending - -While compiling gcc-crosssdk-initial-x86_64 on some host, there is -occasionally failure that test the existance of default.h doesn't -work, the reason is tm_include_list='** defaults.h' rather than -tm_include_list='** ./defaults.h' - -So we add the test condition for this situation. -Signed-off-by: Hongxu Jia ---- - gcc/Makefile.in | 2 +- - gcc/configure | 4 ++-- - gcc/configure.ac | 4 ++-- - gcc/mkconfig.sh | 4 ++-- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 07c6f0a..e1e63e8 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ - TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ - - xmake_file=@xmake_file@ --tmake_file=@tmake_file@ -+tmake_file=@tmake_file@ ./t-oe - TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ - TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ - TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ -diff --git a/gcc/configure b/gcc/configure -index 8caecdc..8ec3d40 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11850,8 +11850,8 @@ for f in $tm_file; do - tm_include_list="${tm_include_list} $f" - ;; - defaults.h ) -- tm_file_list="${tm_file_list} \$(srcdir)/$f" -- tm_include_list="${tm_include_list} $f" -+ tm_file_list="${tm_file_list} ./$f" -+ tm_include_list="${tm_include_list} ./$f" - ;; - * ) - tm_file_list="${tm_file_list} \$(srcdir)/config/$f" -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 57819ff..643a47e 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1832,8 +1832,8 @@ for f in $tm_file; do - tm_include_list="${tm_include_list} $f" - ;; - defaults.h ) -- tm_file_list="${tm_file_list} \$(srcdir)/$f" -- tm_include_list="${tm_include_list} $f" -+ tm_file_list="${tm_file_list} ./$f" -+ tm_include_list="${tm_include_list} ./$f" - ;; - * ) - tm_file_list="${tm_file_list} \$(srcdir)/config/$f" -diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh -index c32f087..6803ab9 100644 ---- a/gcc/mkconfig.sh -+++ b/gcc/mkconfig.sh -@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then - if [ $# -ge 1 ]; then - echo '#ifdef IN_GCC' >> ${output}T - for file in "$@"; do -- if test x"$file" = x"defaults.h"; then -+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then - postpone_defaults_h="yes" - else - echo "# include \"$file\"" >> ${output}T -@@ -109,7 +109,7 @@ esac - - # If we postponed including defaults.h, add the #include now. - if test x"$postpone_defaults_h" = x"yes"; then -- echo "# include \"defaults.h\"" >> ${output}T -+ echo "# include \"./defaults.h\"" >> ${output}T - fi - - # Add multiple inclusion protection guard, part two. --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch deleted file mode 100644 index e8ba32558..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d11c73c1295565ff3766ae04e2a410a89fc84dd5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:20:01 +0400 -Subject: [PATCH 18/46] fortran cross-compile hack. - -* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used -used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross -directory. - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - libgfortran/configure | 2 +- - libgfortran/configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgfortran/configure b/libgfortran/configure -index bb3107b..5d47e65 100755 ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -12747,7 +12747,7 @@ esac - - # We need gfortran to compile parts of the library - #AC_PROG_FC(gfortran) --FC="$GFORTRAN" -+#FC="$GFORTRAN" - ac_ext=${ac_fc_srcext-f} - ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' - ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac -index adafb3f..b4ade28 100644 ---- a/libgfortran/configure.ac -+++ b/libgfortran/configure.ac -@@ -240,7 +240,7 @@ AC_SUBST(enable_static) - - # We need gfortran to compile parts of the library - #AC_PROG_FC(gfortran) --FC="$GFORTRAN" -+#FC="$GFORTRAN" - AC_PROG_FC(gfortran) - - # extra LD Flags which are required for targets --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch deleted file mode 100644 index 01a4d1fda..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 7b40212ed6c0c9fe4efe51f31bccd3d9f892f238 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:20:50 +0400 -Subject: [PATCH 19/46] libgcc-sjlj-check - -ac_fn_c_try_compile doesnt seem to keep the intermediate files -which are needed for sjlj test to pass since it greps into the -generated file. So we run the compiler command using AC_TRY_COMMAND -which then generates the needed .s file - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libgcc/configure | 10 ++++++---- - libgcc/configure.ac | 10 ++++------ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/libgcc/configure b/libgcc/configure -index 203d384..6aef3e7 100644 ---- a/libgcc/configure -+++ b/libgcc/configure -@@ -4570,17 +4570,19 @@ void foo () - } - - _ACEOF --CFLAGS_hold=$CFLAGS --CFLAGS="--save-temps -fexceptions" - libgcc_cv_lib_sjlj_exceptions=unknown --if ac_fn_c_try_compile; then : -+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then - if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=no - fi - fi --CFLAGS=$CFLAGS_hold - rm -f conftest* - - fi -diff --git a/libgcc/configure.ac b/libgcc/configure.ac -index a10a952..cc324f3 100644 ---- a/libgcc/configure.ac -+++ b/libgcc/configure.ac -@@ -255,16 +255,14 @@ void foo () - bar(); - } - ])]) --CFLAGS_hold=$CFLAGS --CFLAGS="--save-temps -fexceptions" - libgcc_cv_lib_sjlj_exceptions=unknown --AS_IF([ac_fn_c_try_compile], -- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then -+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then -+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=no -- fi]) --CFLAGS=$CFLAGS_hold -+ fi -+fi - rm -f conftest* - ]) - --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch deleted file mode 100644 index 13f66d413..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 5f9759a85fff3d78e3f71ae01c970b10d326c406 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:22:00 +0400 -Subject: [PATCH 20/46] cpp: honor sysroot. - -Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile -preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location -rather than the --sysroot option specified on the commandline. If access to that directory is -permission denied (unreadable), gcc will error. - -This happens when ccache is in use due to the fact it uses preprocessed source files. - -The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, --isystem, -isysroot happen and the correct sysroot is used. - -[YOCTO #2074] - -RP 2012/04/13 - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/cp/lang-specs.h | 2 +- - gcc/gcc.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h -index b0728f0..e69ee7d 100644 ---- a/gcc/cp/lang-specs.h -+++ b/gcc/cp/lang-specs.h -@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2\ -+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 87b47c5..e6efae7 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] = - %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 0, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".s", "@assembler", 0, 0, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch deleted file mode 100644 index c7cffe417..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 34d22ab6cfd2dfe6dd171c8d0b31cafcdeb86298 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:23:08 +0400 -Subject: [PATCH 21/46] MIPS64: Default to N64 ABI - -MIPS64 defaults to n32 ABI, this patch makes it -so that it defaults to N64 ABI - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [OE config specific] ---- - gcc/config.gcc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index c835734..dd0739d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2017,29 +2017,29 @@ mips*-*-linux*) # Linux MIPS, either endian. - default_mips_arch=mips32 - ;; - mips64el-st-linux-gnu) -- default_mips_abi=n32 -+ default_mips_abi=64 - tm_file="${tm_file} mips/st.h" - tmake_file="${tmake_file} mips/t-st" - enable_mips_multilibs="yes" - ;; - mips64octeon*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" - target_cpu_default=MASK_SOFT_FLOAT_ABI - enable_mips_multilibs="yes" - ;; - mipsisa64r6*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - default_mips_arch=mips64r6 - enable_mips_multilibs="yes" - ;; - mipsisa64r2*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - default_mips_arch=mips64r2 - enable_mips_multilibs="yes" - ;; - mips64*-*-linux* | mipsisa64*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - enable_mips_multilibs="yes" - ;; - esac --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch deleted file mode 100644 index 620835132..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +++ /dev/null @@ -1,216 +0,0 @@ -From f6b41b62ea62a0f1447d9fc235f7fd2bbf3fe7c2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:24:50 +0400 -Subject: [PATCH 22/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER - relative to SYSTEMLIBS_DIR - -This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER -relative to SYSTEMLIBS_DIR which can be set in generated headers -This breaks the assumption of hardcoded multilib in gcc -Change is only for the supported architectures in OE including -SH, sparc, alpha for possible future support (if any) - -Removes the do_headerfix task in metadata - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [OE configuration] ---- - gcc/config/alpha/linux-elf.h | 4 ++-- - gcc/config/arm/linux-eabi.h | 4 ++-- - gcc/config/arm/linux-elf.h | 2 +- - gcc/config/i386/linux.h | 2 +- - gcc/config/i386/linux64.h | 6 +++--- - gcc/config/linux.h | 8 ++++---- - gcc/config/mips/linux.h | 12 ++++++------ - gcc/config/rs6000/linux64.h | 10 +++++----- - gcc/config/sh/linux.h | 2 +- - gcc/config/sparc/linux.h | 2 +- - gcc/config/sparc/linux64.h | 4 ++-- - 11 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index 2c70a2f..dd048db 100644 ---- a/gcc/config/alpha/linux-elf.h -+++ b/gcc/config/alpha/linux-elf.h -@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see - #define EXTRA_SPECS \ - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" -+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #elif DEFAULT_LIBC == LIBC_GLIBC -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index e9d65dc..cfdf3f0 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -68,8 +68,8 @@ - GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ - - #undef GLIBC_DYNAMIC_LINKER --#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" --#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" -+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" -+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" - #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT - - #define GLIBC_DYNAMIC_LINKER \ -diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 49ad954..a5ab559 100644 ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -62,7 +62,7 @@ - - #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ - %{static:-Bstatic} \ -diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index a100963..21ba2b2 100644 ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see - . */ - - #define GNU_USER_LINK_EMULATION "elf_i386" --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" -diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index a27d3be..6185cce 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define GNU_USER_LINK_EMULATION64 "elf_x86_64" - #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" --#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 857389a..22b9be5 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - GLIBC_DYNAMIC_LINKER must be defined for each target using them, or - GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets - supporting both 32-bit and 64-bit compilation. */ --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" - #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" -diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 91df261..c306afb 100644 ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see - #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" - - #define GLIBC_DYNAMIC_LINKER32 \ -- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - #define GLIBC_DYNAMIC_LINKER64 \ -- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - #define GLIBC_DYNAMIC_LINKERN32 \ -- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - - #undef UCLIBC_DYNAMIC_LINKER32 - #define UCLIBC_DYNAMIC_LINKER32 \ -- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" - #undef UCLIBC_DYNAMIC_LINKER64 - #define UCLIBC_DYNAMIC_LINKER64 \ -- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" - #define UCLIBC_DYNAMIC_LINKERN32 \ -- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" - - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 0879e7e..31c4338 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -357,14 +357,14 @@ extern int dot_symbols; - #undef LINK_OS_DEFAULT_SPEC - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" - #ifdef LINUX64_DEFAULT_ABI_ELFv2 --#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}" -+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" - #else --#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}" -+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" - #endif --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #elif DEFAULT_LIBC == LIBC_GLIBC -diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h -index 0f5d614..168416c 100644 ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" -diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index 56def4b..00b564c 100644 ---- a/gcc/config/sparc/linux.h -+++ b/gcc/config/sparc/linux.h -@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" - - #undef LINK_SPEC - #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ -diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h -index fa805fd..0eb4acd 100644 ---- a/gcc/config/sparc/linux64.h -+++ b/gcc/config/sparc/linux64.h -@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" - - #ifdef SPARC_BI_ARCH - --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch deleted file mode 100644 index be91c9e63..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 9701f596bbe5bf51bbf48661bc515b45d4b6f4d2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:26:37 +0400 -Subject: [PATCH 23/46] gcc: Fix argument list too long error. - -There would be an "Argument list too long" error when the -build directory is longer than 200, this is caused by: - -headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` - -The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle -it, use the $(sort list) of GNU make which can handle the too long list -would fix the problem, the header would be short enough after sorted. -The "tr ' ' '\012'" was used for translating the space to "\n", the -$(sort list) doesn't need this. - -Signed-off-by: Robert Yang -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index e1e63e8..7b49f88 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3262,7 +3262,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype - # We keep the directory structure for files in config or c-family and .def - # files. All other files are flattened to a single directory. - $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) -- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ -+ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ - for file in $$headers; do \ - if [ -f $$file ] ; then \ --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch deleted file mode 100644 index b23ce9756..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 946e047614103e1f2982613c7aa5f76587500c0e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:28:10 +0400 -Subject: [PATCH 24/46] Disable sdt. - -We don't list dtrace in DEPENDS so we shouldn't be depending on this header. -It may or may not exist from preivous builds though. To be determinstic, disable -sdt.h usage always. This avoids build failures if the header is removed after configure -but before libgcc is compiled for example. - -RP 2012/8/7 - -Signed-off-by: Khem Raj - -Disable sdt for libstdc++-v3. - -Signed-off-by: Robert Yang - -Upstream-Status: Inappropriate [hack] ---- - gcc/configure | 12 ++++++------ - gcc/configure.ac | 18 +++++++++--------- - libstdc++-v3/configure | 6 +++--- - libstdc++-v3/configure.ac | 2 +- - 4 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/gcc/configure b/gcc/configure -index 8ec3d40..eaa3b07 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -27857,12 +27857,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 - $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } - have_sys_sdt_h=no --if test -f $target_header_dir/sys/sdt.h; then -- have_sys_sdt_h=yes -- --$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -- --fi -+#if test -f $target_header_dir/sys/sdt.h; then -+# have_sys_sdt_h=yes -+# -+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -+# -+#fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 - $as_echo "$have_sys_sdt_h" >&6; } - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 643a47e..9f6cacb 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5315,15 +5315,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then - fi - - # Test for on the target. --GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) --AC_MSG_CHECKING(sys/sdt.h in the target C library) --have_sys_sdt_h=no --if test -f $target_header_dir/sys/sdt.h; then -- have_sys_sdt_h=yes -- AC_DEFINE(HAVE_SYS_SDT_H, 1, -- [Define if your target C library provides sys/sdt.h]) --fi --AC_MSG_RESULT($have_sys_sdt_h) -+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) -+#AC_MSG_CHECKING(sys/sdt.h in the target C library) -+#have_sys_sdt_h=no -+#if test -f $target_header_dir/sys/sdt.h; then -+# have_sys_sdt_h=yes -+# AC_DEFINE(HAVE_SYS_SDT_H, 1, -+# [Define if your target C library provides sys/sdt.h]) -+#fi -+#AC_MSG_RESULT($have_sys_sdt_h) - - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 -diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index 217012e..81240b9 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -20964,11 +20964,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - -- if test $glibcxx_cv_sys_sdt_h = yes; then -+# if test $glibcxx_cv_sys_sdt_h = yes; then - --$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h - -- fi -+# fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 - $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } - -diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac -index 580fb8b..5a41083 100644 ---- a/libstdc++-v3/configure.ac -+++ b/libstdc++-v3/configure.ac -@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN - GLIBCXX_CHECK_SC_NPROC_ONLN - GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP - GLIBCXX_CHECK_SYSCTL_HW_NCPU --GLIBCXX_CHECK_SDT_H -+#GLIBCXX_CHECK_SDT_H - - # Check for available headers. - AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch deleted file mode 100644 index 8d5eb973b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f68c5b78751660505b22b46dad99240db0df3456 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:29:11 +0400 -Subject: [PATCH 25/46] libtool - -libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 -when running on am x86_64 build host. - -This patch stops this speading to libdir in the libstdc++.la file within libtool. -Arguably, it shouldn't be passing this into libtool in the first place but -for now this resolves the nastiest problems this causes. - -func_normal_abspath would resolve an empty path to `pwd` so we need -to filter the zero case. - -RP 2012/8/24 - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - ltmain.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ltmain.sh b/ltmain.sh -index 9503ec8..0121fba 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -6359,6 +6359,10 @@ func_mode_link () - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" -+ if test -n "$install_libdir"; then -+ func_normal_abspath "$install_libdir" -+ install_libdir=$func_normal_abspath_result -+ fi - - oldlibs= - if test -z "$rpath"; then --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch deleted file mode 100644 index a22d95f72..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4c75e349aa7abd1e285720328b23690636bea242 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:30:32 +0400 -Subject: [PATCH 26/46] gcc: armv4: pass fix-v4bx to linker to support EABI. - -The LINK_SPEC for linux gets overwritten by linux-eabi.h which -means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result -the option is not passed to linker when chosing march=armv4 -This patch redefines this in linux-eabi.h and reinserts it -for eabi defaulting toolchains. - -We might want to send it upstream. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/config/arm/linux-eabi.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index cfdf3f0..048a062 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,10 +77,14 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch deleted file mode 100644 index 46815d156..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 8217dd7fb318f9abc6564f67b424c433d8398d61 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:33:04 +0400 -Subject: [PATCH 27/46] Use the multilib config files from ${B} instead of - using the ones from ${S} - -Use the multilib config files from ${B} instead of using the ones from ${S} -so that the source can be shared between gcc-cross-initial, -gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. - -Signed-off-by: Khem Raj -Signed-off-by: Constantin Musca - -Upstream-Status: Inappropriate [configuration] ---- - gcc/configure | 22 ++++++++++++++++++---- - gcc/configure.ac | 22 ++++++++++++++++++---- - 2 files changed, 36 insertions(+), 8 deletions(-) - -diff --git a/gcc/configure b/gcc/configure -index eaa3b07..9b60aad 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11830,10 +11830,20 @@ done - tmake_file_= - for f in ${tmake_file} - do -- if test -f ${srcdir}/config/$f -- then -- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" -- fi -+ case $f in -+ */t-linux64 ) -+ if test -f ./config/$f -+ then -+ tmake_file_="${tmake_file_} ./config/$f" -+ fi -+ ;; -+ * ) -+ if test -f ${srcdir}/config/$f -+ then -+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" -+ fi -+ ;; -+ esac - done - tmake_file="${tmake_file_}" - -@@ -11844,6 +11854,10 @@ tm_file_list="options.h" - tm_include_list="options.h insn-constants.h" - for f in $tm_file; do - case $f in -+ */linux64.h ) -+ tm_file_list="${tm_file_list} ./config/$f" -+ tm_include_list="${tm_include_list} ./config/$f" -+ ;; - ./* ) - f=`echo $f | sed 's/^..//'` - tm_file_list="${tm_file_list} $f" -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 9f6cacb..e1e54f2 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1812,10 +1812,20 @@ done - tmake_file_= - for f in ${tmake_file} - do -- if test -f ${srcdir}/config/$f -- then -- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" -- fi -+ case $f in -+ */t-linux64 ) -+ if test -f ./config/$f -+ then -+ tmake_file_="${tmake_file_} ./config/$f" -+ fi -+ ;; -+ * ) -+ if test -f ${srcdir}/config/$f -+ then -+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" -+ fi -+ ;; -+ esac - done - tmake_file="${tmake_file_}" - -@@ -1826,6 +1836,10 @@ tm_file_list="options.h" - tm_include_list="options.h insn-constants.h" - for f in $tm_file; do - case $f in -+ */linux64.h ) -+ tm_file_list="${tm_file_list} ./config/$f" -+ tm_include_list="${tm_include_list} ./config/$f" -+ ;; - ./* ) - f=`echo $f | sed 's/^..//'` - tm_file_list="${tm_file_list} $f" --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch deleted file mode 100644 index 60ddd9cee..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 08a0e45b308fc97d06f5c3ef77a257e7a6bd1a48 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 20 Feb 2015 09:39:38 +0000 -Subject: [PATCH 28/46] Avoid using libdir from .la which usually points to a - host path - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Jonathan Liu -Signed-off-by: Khem Raj ---- - ltmain.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/ltmain.sh b/ltmain.sh -index 0121fba..52bdbdb 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -5628,6 +5628,9 @@ func_mode_link () - absdir="$abs_ladir" - libdir="$abs_ladir" - else -+ # Instead of using libdir from .la which usually points to a host path, -+ # use the path the .la is contained in. -+ libdir="$abs_ladir" - dir="$libdir" - absdir="$libdir" - fi --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch deleted file mode 100644 index 62195aa87..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 95f494d1544857ad38949a7da37e2d7264475233 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 20 Feb 2015 09:40:59 +0000 -Subject: [PATCH 29/46] export CPP - -The OE environment sets and exports CPP as being the target gcc. When -building gcc-cross-canadian for a mingw targetted sdk, the following can be found -in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: - -configure:3641: checking for _FILE_OFFSET_BITS value needed for large files -configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 -configure:3666: $? = 0 -configure:3698: result: no -configure:3786: checking how to run the C preprocessor -configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 -configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c -configure:3876: $? = 0 - -Note this is a *build* target (in build-x86_64-linux) so it should be -using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 -headers are very different, using the wrong cpp is a real problem. It is leaking -into configure through the CPP variable. Ultimately this leads to build -failures related to not being able to include a process.h file for pem-unix.c. - -The fix is to ensure we export a sane CPP value into the build -environment when using build targets. We could define a CPP_FOR_BUILD value which may be -the version which needs to be upstreamed but for now, this fix is good enough to -avoid the problem. - -RP 22/08/2013 - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - Makefile.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.in b/Makefile.in -index 36b4008..a783e1e 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -149,6 +149,7 @@ BUILD_EXPORTS = \ - AR="$(AR_FOR_BUILD)"; export AR; \ - AS="$(AS_FOR_BUILD)"; export AS; \ - CC="$(CC_FOR_BUILD)"; export CC; \ -+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ - CXX="$(CXX_FOR_BUILD)"; export CXX; \ --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch deleted file mode 100644 index 57051871b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 4ed8c1fd9dc05f7a9db9298a55396c8f0ff549a7 Mon Sep 17 00:00:00 2001 -From: Alexandru-Cezar Sardan -Date: Wed, 5 Feb 2014 16:52:31 +0200 -Subject: [PATCH 30/46] Enable SPE & AltiVec generation on powepc*linux target - -When is configured with --target=powerpc-linux, the resulting GCC will -not be able to generate code for SPE targets (e500v1/v2). -GCC configured with --target=powerpc-linuxspe will not be able to -generate AltiVec instructions (for e6500). -This patch modifies the configured file such that SPE or AltiVec code -can be generated when gcc is configured with --target=powerpc-linux. -The ABI and speciffic instructions can be selected through the -"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Alexandru-Cezar Sardan ---- - gcc/config.gcc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -Index: gcc-5.3.0/gcc/config.gcc -=================================================================== ---- gcc-5.3.0.orig/gcc/config.gcc -+++ gcc-5.3.0/gcc/config.gcc -@@ -2346,7 +2346,14 @@ powerpc-*-rtems*) - tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm" - ;; - powerpc*-*-linux*) -- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" -+ case ${target} in -+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*) -+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" -+ ;; -+ *) -+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" -+ ;; -+ esac - extra_options="${extra_options} rs6000/sysv4.opt" - tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm" - extra_objs="$extra_objs rs6000-linux.o" -Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h -=================================================================== ---- gcc-5.3.0.orig/gcc/config/rs6000/linuxspe.h -+++ gcc-5.3.0/gcc/config/rs6000/linuxspe.h -@@ -27,6 +27,3 @@ - #undef TARGET_DEFAULT - #define TARGET_DEFAULT MASK_STRICT_ALIGN - #endif -- --#undef ASM_DEFAULT_SPEC --#define ASM_DEFAULT_SPEC "-mppc -mspe -me500" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch deleted file mode 100644 index f2bc66432..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch +++ /dev/null @@ -1,42 +0,0 @@ -From bb6fea821483aa3259b34e101a39c993edd01411 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 20 Feb 2015 10:21:55 +0000 -Subject: [PATCH 31/46] Disable the MULTILIB_OSDIRNAMES and other multilib - options. - -Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on -systems where the libdir is NOT set to /lib64. This is allowed by the -ABI, as -long as the dynamic loader is present in /lib. - -We simply want to use the default rules in gcc to find and configure the -normal libdir. - -Upstream-Status: Inappropriate[OE-Specific] - -Signed-off-by: Mark Hatle -Signed-off-by: Khem Raj ---- - gcc/config/aarch64/t-aarch64-linux | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux -index c296376..3bb59bf 100644 ---- a/gcc/config/aarch64/t-aarch64-linux -+++ b/gcc/config/aarch64/t-aarch64-linux -@@ -21,8 +21,8 @@ - LIB1ASMSRC = aarch64/lib1funcs.asm - LIB1ASMFUNCS = _aarch64_sync_cache_range - --AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) --MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) --MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) -+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) -+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) -+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) - --MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32 -+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32 --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch deleted file mode 100644 index 89503ff60..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch +++ /dev/null @@ -1,98 +0,0 @@ -From bb26f90f5e0accc3539f62b6fec663682959dd36 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 20 Feb 2015 10:25:11 +0000 -Subject: [PATCH 32/46] Ensure target gcc headers can be included - -There are a few headers installed as part of the OpenEmbedded -gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe -built for the target architecture, these are within the target -sysroot and not cross/nativesdk; thus they weren't able to be -found by gcc with the existing search paths. Add support for -picking up these headers under the sysroot supplied on the gcc -command line in order to resolve this. - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton -Signed-off-by: Khem Raj ---- - gcc/Makefile.in | 2 ++ - gcc/cppdefault.c | 4 ++++ - gcc/defaults.h | 9 +++++++++ - gcc/gcc.c | 7 ------- - 4 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 7b49f88..cd5bc4a 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -582,6 +582,7 @@ libexecdir = @libexecdir@ - - # Directory in which the compiler finds libraries etc. - libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) -+libsubdir_target = gcc/$(target_noncanonical)/$(version) - # Directory in which the compiler finds executables - libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) - # Directory in which all plugin resources are installed -@@ -2610,6 +2611,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" - - PREPROCESSOR_DEFINES = \ - -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ -+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ - -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ - -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ - -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ -diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c -index 580c1ba..03a0287 100644 ---- a/gcc/cppdefault.c -+++ b/gcc/cppdefault.c -@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] - /* This is the dir for gcc's private headers. */ - { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, - #endif -+#ifdef GCC_INCLUDE_SUBDIR_TARGET -+ /* This is the dir for gcc's private headers under the specified sysroot. */ -+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, -+#endif - #ifdef LOCAL_INCLUDE_DIR - /* /usr/local/include comes before the fixincluded header files. */ - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, -diff --git a/gcc/defaults.h b/gcc/defaults.h -index 1d54798..983d45e 100644 ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -1361,4 +1361,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - - #endif /* GCC_INSN_FLAGS_H */ - -+/* Default prefixes to attach to command names. */ -+ -+#ifndef STANDARD_STARTFILE_PREFIX_1 -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" -+#endif -+#ifndef STANDARD_STARTFILE_PREFIX_2 -+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" -+#endif -+ - #endif /* ! GCC_DEFAULTS_H */ -diff --git a/gcc/gcc.c b/gcc/gcc.c -index e6efae7..3ca27b9 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1263,13 +1263,6 @@ static const char *gcc_libexec_prefix; - - /* Default prefixes to attach to command names. */ - --#ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/lib/" --#endif --#ifndef STANDARD_STARTFILE_PREFIX_2 --#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" --#endif -- - #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ - #undef MD_EXEC_PREFIX - #undef MD_STARTFILE_PREFIX --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch deleted file mode 100644 index 19d480f3d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 629fcc7d0075c9b4261da6435e122429fb028ec0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 20 Feb 2015 11:17:19 +0000 -Subject: [PATCH 33/46] gcc 4.8+ won't build with --disable-dependency-tracking - -since the *.Ppo files don't get created unless --enable-dependency-tracking is true. - -This patch ensures we only use those compiler options when its enabled. - -Upstream-Status: Submitted - -(Problem was already reported upstream, attached this patch there -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) - -RP -2012/09/22 - -Signed-off-by: Khem Raj ---- - libatomic/Makefile.am | 3 ++- - libatomic/Makefile.in | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am -index 3d8ab62..23dff7e 100644 ---- a/libatomic/Makefile.am -+++ b/libatomic/Makefile.am -@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT)) - IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) - IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) - --M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_FALSE@M_DEPS = - M_SIZE = -DN=$(PAT_N) - M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) - M_FILE = $(PAT_BASE)_n.c -diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in -index 9288652..3720256 100644 ---- a/libatomic/Makefile.in -+++ b/libatomic/Makefile.in -@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) - PAT_S = $(word 3,$(PAT_SPLIT)) - IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) - IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) --M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_FALSE@M_DEPS = - M_SIZE = -DN=$(PAT_N) - M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) - M_FILE = $(PAT_BASE)_n.c --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch deleted file mode 100644 index a453fa6b3..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a4efc9ca85734c283d4da09b628121e1c1f49c4e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 3 Mar 2015 08:21:19 +0000 -Subject: [PATCH 34/46] Don't search host directory during "relink" if - $inst_prefix is provided - -http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj ---- - ltmain.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/ltmain.sh b/ltmain.sh -index 52bdbdb..82bcec3 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -6004,12 +6004,13 @@ func_mode_link () - fi - else - # We cannot seem to hardcode it, guess we'll fake it. -+ # Default if $libdir is not relative to the prefix: - add_dir="-L$libdir" -- # Try looking first in the location we're being installed to. -+ - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ add_dir="-L$inst_prefix_dir$libdir" - ;; - esac - fi --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch deleted file mode 100644 index 6ed589beb..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 5b0125a792842ae02df507bc55555661cb10f9a3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 8 Mar 2015 03:41:39 +0000 -Subject: [PATCH 35/46] Dont link the plugins with libgomp explicitly - -They are dlopened by libgomp anyway. This fixes -the libtool relink issue which causes issues during -cross compilation - -libtool: install: /usr/bin/install -c .libs/libgomp.lai -/home/ubuntu/work/bleeding/build-qemux86-64mc/tmp/work/core2-64-rdk-linux/gcc-runtime/5.0-r0/image/usr/lib/../lib/libgomp.la -libtool: install: error: cannot install `libgomp-plugin-host_nonshm.la' -to a directory not ending in /usr/lib -Makefile:517: recipe for target 'install-toolexeclibLTLIBRARIES' failed -make[2]: *** [install-toolexeclibLTLIBRARIES] Error 1 - -Signed-off-by: Khem Raj ---- - libgomp/Makefile.in | 7 +++---- - libgomp/plugin/Makefrag.am | 3 +-- - 2 files changed, 4 insertions(+), 6 deletions(-) - -diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in -index b61b108..71b2627 100644 ---- a/libgomp/Makefile.in -+++ b/libgomp/Makefile.in -@@ -123,7 +123,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \ - "$(DESTDIR)$(fincludedir)" "$(DESTDIR)$(libsubincludedir)" \ - "$(DESTDIR)$(toolexeclibdir)" - LTLIBRARIES = $(toolexeclib_LTLIBRARIES) --libgomp_plugin_host_nonshm_la_DEPENDENCIES = libgomp.la -+libgomp_plugin_host_nonshm_la_LIBADD = - am_libgomp_plugin_host_nonshm_la_OBJECTS = \ - libgomp_plugin_host_nonshm_la-plugin-host.lo - libgomp_plugin_host_nonshm_la_OBJECTS = \ -@@ -133,7 +133,7 @@ libgomp_plugin_host_nonshm_la_LINK = $(LIBTOOL) --tag=CC \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libgomp_plugin_host_nonshm_la_LDFLAGS) $(LDFLAGS) -o $@ - am__DEPENDENCIES_1 = --@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = libgomp.la \ -+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = \ - @PLUGIN_NVPTX_TRUE@ $(am__DEPENDENCIES_1) - @PLUGIN_NVPTX_TRUE@am_libgomp_plugin_nvptx_la_OBJECTS = \ - @PLUGIN_NVPTX_TRUE@ libgomp_plugin_nvptx_la-plugin-nvptx.lo -@@ -407,7 +407,7 @@ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ - @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LDFLAGS = \ - @PLUGIN_NVPTX_TRUE@ $(libgomp_plugin_nvptx_version_info) \ - @PLUGIN_NVPTX_TRUE@ $(lt_host_flags) $(PLUGIN_NVPTX_LDFLAGS) --@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS) -+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS) - @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static - libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION) - libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c -@@ -415,7 +415,6 @@ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN - libgomp_plugin_host_nonshm_la_LDFLAGS = \ - $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags) - --libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la - libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static - nodist_noinst_HEADERS = libgomp_f.h - nodist_libsubinclude_HEADERS = omp.h openacc.h -diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am -index 167485f..d2c5428 100644 ---- a/libgomp/plugin/Makefrag.am -+++ b/libgomp/plugin/Makefrag.am -@@ -35,7 +35,7 @@ libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS) - libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \ - $(lt_host_flags) - libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS) --libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS) -+libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS) - libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static - endif - -@@ -45,5 +45,4 @@ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c - libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN - libgomp_plugin_host_nonshm_la_LDFLAGS = \ - $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags) --libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la - libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch deleted file mode 100644 index 41c0294da..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b0b0688176a9482777e9b2e98408bfc4505d31af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 28 Apr 2015 23:15:27 -0700 -Subject: [PATCH 36/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding - base_libdir - -Signed-off-by: Khem Raj ---- - gcc/config/aarch64/aarch64-linux.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h -index 257acf0..abeb948 100644 ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -21,7 +21,7 @@ - #ifndef GCC_AARCH64_LINUX_H - #define GCC_AARCH64_LINUX_H - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch deleted file mode 100644 index 30dbe74ef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 420ca64a86d560a77ee596a9774d672b08ca8278 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 28 Apr 2015 23:18:39 -0700 -Subject: [PATCH 37/46] aarch64: Add support for musl ldso - -Signed-off-by: Khem Raj ---- - gcc/config/aarch64/aarch64-linux.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h -index abeb948..f9e65fc 100644 ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -23,6 +23,8 @@ - - #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - -+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1" -+ - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" - --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch deleted file mode 100644 index 9ba574a5c..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8df3e7007a22c9d6be5d5ae4b9b169c5c8431917 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 27 May 2015 17:06:06 -0700 -Subject: [PATCH 38/46] fix g++ sysroot - -Portions of - -http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html - -are not upstreamed yet. So lets keep missing pieces. - -Upstream-Status: Pending - -Without this, compiling something simple like #include on target -with c++ test.cpp fails unable to find the header. strace shows it looking in -usr/include/xxxx rather than /usr/include/xxxx - -Signed-off-by: Khem Raj ---- - gcc/configure | 4 +++- - gcc/configure.ac | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/gcc/configure b/gcc/configure -index 9b60aad..6df594c 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -3375,7 +3375,9 @@ gcc_gxx_include_dir_add_sysroot=0 - if test "${with_sysroot+set}" = set; then - gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` - if test "${gcc_gxx_without_sysroot}"; then -- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ if test x${with_sysroot} != x/; then -+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ fi - gcc_gxx_include_dir_add_sysroot=1 - fi - fi -diff --git a/gcc/configure.ac b/gcc/configure.ac -index e1e54f2..3bb2173 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -152,7 +152,9 @@ gcc_gxx_include_dir_add_sysroot=0 - if test "${with_sysroot+set}" = set; then - gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` - if test "${gcc_gxx_without_sysroot}"; then -- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ if test x${with_sysroot} != x/; then -+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" -+ fi - gcc_gxx_include_dir_add_sysroot=1 - fi - fi --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch deleted file mode 100644 index 2e0df968b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1eede9e4a10d3532db826a6eeced695df3ad5b89 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Sun, 5 Jul 2015 20:25:18 -0700 -Subject: [PATCH 39/46] libcc1: fix libcc1's install path and rpath - -* Install libcc1.so and libcc1plugin.so into - $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we - had done to lto-plugin. -* Fix bad RPATH iussue: - gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file - /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 - [rpaths] - -Upstream-Status: Inappropriate [OE configuration] - -Signed-off-by: Robert Yang ---- - libcc1/Makefile.am | 4 ++-- - libcc1/Makefile.in | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am -index 7a274b3..db69bea 100644 ---- a/libcc1/Makefile.am -+++ b/libcc1/Makefile.am -@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ - $(Wc)$(libiberty_normal))) - libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) - --plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin --cc1libdir = $(libdir)/$(libsuffix) -+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) -+plugindir = $(cc1libdir) - - if ENABLE_PLUGIN - plugin_LTLIBRARIES = libcc1plugin.la -diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in -index 1916134..c8995d2 100644 ---- a/libcc1/Makefile.in -+++ b/libcc1/Makefile.in -@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ - $(Wc)$(libiberty_normal))) - - libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) --plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin --cc1libdir = $(libdir)/$(libsuffix) -+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) -+plugindir = $(cc1libdir) - @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la - @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la - BUILT_SOURCES = compiler-name.h --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch deleted file mode 100644 index 11e1310f1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch +++ /dev/null @@ -1,213 +0,0 @@ -From b41674d357c4ba320b9860e0f313d2f5a332f27d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 7 Dec 2015 23:39:54 +0000 -Subject: [PATCH 40/46] handle sysroot support for nativesdk-gcc - -Being able to build a nativesdk gcc is useful, particularly in cases -where the host compiler may be of an incompatible version (or a 32 -bit compiler is needed). - -Sadly, building nativesdk-gcc is not straight forward. We install -nativesdk-gcc into a relocatable location and this means that its -library locations can change. "Normal" sysroot support doesn't help -in this case since the values of paths like "libdir" change, not just -base root directory of the system. - -In order to handle this we do two things: - -a) Add %r into spec file markup which can be used for injected paths - such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). -b) Add other paths which need relocation into a .gccrelocprefix section - which the relocation code will notice and adjust automatically. - -Upstream-Status: Inappropriate -RP 2015/7/28 - -Signed-off-by: Khem Raj ---- - gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++------------- - gcc/cppdefault.h | 3 ++- - gcc/gcc.c | 20 ++++++++++++++------ - 3 files changed, 53 insertions(+), 20 deletions(-) - -diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c -index 03a0287..f44c1d8 100644 ---- a/gcc/cppdefault.c -+++ b/gcc/cppdefault.c -@@ -35,6 +35,30 @@ - # undef CROSS_INCLUDE_DIR - #endif - -+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; -+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; -+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; -+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; -+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; -+#ifdef LOCAL_INCLUDE_DIR -+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; -+#endif -+#ifdef PREFIX_INCLUDE_DIR -+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; -+#endif -+#ifdef FIXED_INCLUDE_DIR -+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; -+#endif -+#ifdef CROSS_INCLUDE_DIR -+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; -+#endif -+#ifdef TOOL_INCLUDE_DIR -+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; -+#endif -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; -+#endif -+ - const struct default_include cpp_include_defaults[] - #ifdef INCLUDE_DEFAULTS - = INCLUDE_DEFAULTS; -@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[] - = { - #ifdef GPLUSPLUS_INCLUDE_DIR - /* Pick up GNU C++ generic include files. */ -- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, -+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, - GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, - #endif - #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR - /* Pick up GNU C++ target-dependent include files. */ -- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, -+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, - GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, - #endif - #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR - /* Pick up GNU C++ backward and deprecated include files. */ -- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, - GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, - #endif - #ifdef GCC_INCLUDE_DIR - /* This is the dir for gcc's private headers. */ -- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, -+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, - #endif - #ifdef GCC_INCLUDE_SUBDIR_TARGET - /* This is the dir for gcc's private headers under the specified sysroot. */ -- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, -+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, - #endif - #ifdef LOCAL_INCLUDE_DIR - /* /usr/local/include comes before the fixincluded header files. */ -- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, -- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, -+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, - #endif - #ifdef PREFIX_INCLUDE_DIR -- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, -+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, - #endif - #ifdef FIXED_INCLUDE_DIR - /* This is the dir for fixincludes. */ -- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, -+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, - /* A multilib suffix needs adding if different multilibs use - different headers. */ - #ifdef SYSROOT_HEADERS_SUFFIX_SPEC -@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[] - #endif - #ifdef CROSS_INCLUDE_DIR - /* One place the target system's headers might be. */ -- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, -+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, - #endif - #ifdef TOOL_INCLUDE_DIR - /* Another place the target system's headers might be. */ -- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, -+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, - #endif - #ifdef NATIVE_SYSTEM_HEADER_DIR - /* /usr/include comes dead last. */ -- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, -- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, -+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, -+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, - #endif - { 0, 0, 0, 0, 0, 0 } - }; -diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h -index c98644f..4198669 100644 ---- a/gcc/cppdefault.h -+++ b/gcc/cppdefault.h -@@ -33,7 +33,8 @@ - - struct default_include - { -- const char *const fname; /* The name of the directory. */ -+ const char *fname; /* The name of the directory. */ -+ - const char *const component; /* The component containing the directory - (see update_path in prefix.c) */ - const char cplusplus; /* Only look here if we're compiling C++. */ -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 3ca27b9..2b7756e 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT; - #else - static const char *target_system_root = 0; - #endif -+ -+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; - - /* Nonzero means pass the updated target_system_root to the compiler. */ - -@@ -390,6 +392,7 @@ or with constant text in a single argument. - %G process LIBGCC_SPEC as a spec. - %R Output the concatenation of target_system_root and - target_sysroot_suffix. -+ %r Output the base path target_relocatable_prefix - %S process STARTFILE_SPEC as a spec. A capital S is actually used here. - %E process ENDFILE_SPEC as a spec. A capital E is actually used here. - %C process CPP_SPEC as a spec. -@@ -1286,10 +1289,10 @@ static const char *gcc_libexec_prefix; - gcc_exec_prefix is set because, in that case, we know where the - compiler has been installed, and use paths relative to that - location instead. */ --static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; --static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; --static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; --static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; -+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; -+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; -+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; -+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; - - /* For native compilers, these are well-known paths containing - components that may be provided by the system. For cross -@@ -1297,9 +1300,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; - static const char *md_exec_prefix = MD_EXEC_PREFIX; - static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; - static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; --static const char *const standard_startfile_prefix_1 -+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) - = STANDARD_STARTFILE_PREFIX_1; --static const char *const standard_startfile_prefix_2 -+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) - = STANDARD_STARTFILE_PREFIX_2; - - /* A relative path to be used in finding the location of tools -@@ -5523,6 +5526,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) - } - break; - -+ case 'r': -+ obstack_grow (&obstack, target_relocatable_prefix, -+ strlen (target_relocatable_prefix)); -+ break; -+ - case 'S': - value = do_spec_1 (startfile_spec, 0, NULL); - if (value != 0) --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch deleted file mode 100644 index 5a504a1f2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 99cadb4d8415dd5a275d7d6410f20db33d0f8433 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 7 Dec 2015 23:41:45 +0000 -Subject: [PATCH 41/46] Search target sysroot gcc version specific dirs with - multilib. - -We install the gcc libraries (such as crtbegin.p) into -//5.2.0/ -which is a default search path for GCC (aka multi_suffix in the -code below). is 'machine' in gcc's terminology. We use -these directories so that multiple gcc versions could in theory -co-exist on target. - -We only want to build one gcc-cross-canadian per arch and have this work -for all multilibs. can be handled by mapping the multilib - to the one used by gcc-cross-canadian, e.g. -mips64-polkmllib32-linux -is symlinked to by mips64-poky-linux. - -The default gcc search path in the target sysroot for a "lib64" mutlilib -is: - -/lib32/mips64-poky-linux/5.2.0/ -/lib32/../lib64/ -/usr/lib32/mips64-poky-linux/5.2.0/ -/usr/lib32/../lib64/ -/lib32/ -/usr/lib32/ - -which means that the lib32 crtbegin.o will be found and the lib64 ones -will not which leads to compiler failures. - -This patch injects a multilib version of that path first so the lib64 -binaries can be found first. With this change the search path becomes: - -/lib32/../lib64/mips64-poky-linux/5.2.0/ -/lib32/mips64-poky-linux/5.2.0/ -/lib32/../lib64/ -/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ -/usr/lib32/mips64-poky-linux/5.2.0/ -/usr/lib32/../lib64/ -/lib32/ -/usr/lib32/ - -Upstream-Status: Pending -RP 2015/7/31 - -Signed-off-by: Khem Raj ---- - gcc/gcc.c | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 2b7756e..8f53aea 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix *paths, - if (path == NULL) - { - len = paths->max_len + extra_space + 1; -- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); -+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); - path = XNEWVEC (char, len); - } - -@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix *paths, - /* Look first in MACHINE/VERSION subdirectory. */ - if (!skip_multi_dir) - { -+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) -+ { -+ const char *this_multi; -+ size_t this_multi_len; -+ -+ if (pl->os_multilib) -+ { -+ this_multi = multi_os_dir; -+ this_multi_len = multi_os_dir_len; -+ } -+ else -+ { -+ this_multi = multi_dir; -+ this_multi_len = multi_dir_len; -+ } -+ -+ /* Look in multilib MACHINE/VERSION subdirectory first */ -+ if (this_multi_len) -+ { -+ memcpy (path + len, this_multi, this_multi_len + 1); -+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); -+ ret = callback (path, callback_info); -+ if (ret) -+ break; -+ } -+ } -+ - memcpy (path + len, multi_suffix, suffix_len + 1); - ret = callback (path, callback_info); - if (ret) --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch deleted file mode 100644 index 5af764b7c..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 78e77206902349c9256f06c3dd179197a39af2e1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 7 Dec 2015 23:42:45 +0000 -Subject: [PATCH 42/46] Fix various _FOR_BUILD and related variables - -When doing a FOR_BUILD thing, you have to override CFLAGS with -CFLAGS_FOR_BUILD. And if you use C++, you also have to override -CXXFLAGS with CXXFLAGS_FOR_BUILD. -Without this, when building for mingw, you end up trying to use -the mingw headers for a host build. - -The same goes for other variables as well, such as CPPFLAGS, -CPP, and GMPINC. - -Upstream-Status: Pending - -Signed-off-by: Peter Seebach -Signed-off-by: Mark Hatle -Signed-off-by: Khem Raj ---- - Makefile.in | 6 ++++++ - Makefile.tpl | 5 +++++ - gcc/Makefile.in | 2 +- - gcc/configure | 2 +- - gcc/configure.ac | 2 +- - 5 files changed, 14 insertions(+), 3 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index a783e1e..8b6d3d2 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -152,6 +152,7 @@ BUILD_EXPORTS = \ - CPP="$(CC_FOR_BUILD) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ -+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ - CXX="$(CXX_FOR_BUILD)"; export CXX; \ - CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ - GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ -@@ -170,6 +171,9 @@ BUILD_EXPORTS = \ - # built for the build system to override those in BASE_FLAGS_TO_PASS. - EXTRA_BUILD_FLAGS = \ - CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ -+ CPP="$(CC_FOR_BUILD) -E" \ -+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)" - - # This is the list of directories to built for the host system. -@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@ - HOST_EXPORTS = \ - $(BASE_EXPORTS) \ - CC="$(CC)"; export CC; \ -+ CPP="$(CC) -E"; export CPP; \ - ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ -@@ -710,6 +715,7 @@ BASE_FLAGS_TO_PASS = \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ -+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ - "EXPECT=$(EXPECT)" \ - "FLEX=$(FLEX)" \ - "INSTALL=$(INSTALL)" \ -diff --git a/Makefile.tpl b/Makefile.tpl -index 1ea1954..78a59c3 100644 ---- a/Makefile.tpl -+++ b/Makefile.tpl -@@ -154,6 +154,7 @@ BUILD_EXPORTS = \ - CC="$(CC_FOR_BUILD)"; export CC; \ - CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ -+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ - CXX="$(CXX_FOR_BUILD)"; export CXX; \ - CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ - GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ -@@ -172,6 +173,9 @@ BUILD_EXPORTS = \ - # built for the build system to override those in BASE_FLAGS_TO_PASS. - EXTRA_BUILD_FLAGS = \ - CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ -+ CPP="$(CC_FOR_BUILD) -E" \ -+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)" - - # This is the list of directories to built for the host system. -@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@ - HOST_EXPORTS = \ - $(BASE_EXPORTS) \ - CC="$(CC)"; export CC; \ -+ CPP="$(CC) -E"; export CPP; \ - ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index cd5bc4a..98ae4f4 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -762,7 +762,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS) - # Native linker and preprocessor flags. For x-fragment overrides. - BUILD_LDFLAGS=@BUILD_LDFLAGS@ - BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ -- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) -+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) - - # Actual name to use when installing a native compiler. - GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') -diff --git a/gcc/configure b/gcc/configure -index 6df594c..fcb05e7 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11521,7 +11521,7 @@ else - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ - CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ - LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ -- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ -+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ - ${realsrcdir}/configure \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 3bb2173..923bc9a 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1633,7 +1633,7 @@ else - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ - CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ - LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ -- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ -+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ - ${realsrcdir}/configure \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch deleted file mode 100644 index bad8402ef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch +++ /dev/null @@ -1,44 +0,0 @@ -From df430b943a2df6b72054c808d4b93338a82562de Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 8 Dec 2015 08:23:34 +0000 -Subject: [PATCH 43/46] libstdc++: Support musl - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - libstdc++-v3/configure.host | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 640199c..1756444 100644 ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -274,14 +274,24 @@ case "${host_os}" in - os_include_dir="os/bsd/freebsd" - ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) -+ # check for musl by target -+ case "${host_os}" in -+ *-musl*) -+ os_include_dir="os/generic" -+ ;; -+ *) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" - elif [ "$bionic" = "yes" ]; then - os_include_dir="os/bionic" -+ elif [ "$musl" = "yes" ]; then -+ os_include_dir="os/generic" - else - os_include_dir="os/gnu-linux" - fi - ;; -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch deleted file mode 100644 index 26aa96cad..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch +++ /dev/null @@ -1,270 +0,0 @@ -From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 8 Dec 2015 08:30:35 +0000 -Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the - necessary hacks for it to know how to find musl's dynamic linker. - -Upstream-Status: Backport [partial] -Signed-off-by: Khem Raj ---- - gcc/config.gcc | 10 ++++- - gcc/config/linux.h | 100 +++++++++++++++++++++++++++++++++++++----- - gcc/config/linux.opt | 4 ++ - gcc/config/rs6000/secureplt.h | 1 + - gcc/config/rs6000/sysv4.h | 5 +++ - gcc/ginclude/stddef.h | 3 ++ - 6 files changed, 110 insertions(+), 13 deletions(-) - -Index: gcc-5.4.0/gcc/config.gcc -=================================================================== ---- gcc-5.4.0.orig/gcc/config.gcc -+++ gcc-5.4.0/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -720,6 +720,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; -@@ -2420,6 +2423,11 @@ powerpc*-*-linux*) - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac -+ - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi -Index: gcc-5.4.0/gcc/config/linux.h -=================================================================== ---- gcc-5.4.0.orig/gcc/config/linux.h -+++ gcc-5.4.0/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTI - uClibc or Bionic is the default C library and whether - -muclibc or -mglibc or -mbionic has been passed to change the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTI - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC -@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTI - # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function - - #endif -+ -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -Index: gcc-5.4.0/gcc/config/linux.opt -=================================================================== ---- gcc-5.4.0.orig/gcc/config/linux.opt -+++ gcc-5.4.0/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library -Index: gcc-5.4.0/gcc/config/rs6000/secureplt.h -=================================================================== ---- gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h -+++ gcc-5.4.0/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" -Index: gcc-5.4.0/gcc/config/rs6000/sysv4.h -=================================================================== ---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h -+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h -@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif - -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif -+ - /* Pass -G xxx to the compiler. */ - #undef CC1_SPEC - #define CC1_SPEC "%{G*} %(cc1_cpu)" \ -@@ -889,6 +893,7 @@ ncrtn.o%s" - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -Index: gcc-5.4.0/gcc/ginclude/stddef.h -=================================================================== ---- gcc-5.4.0.orig/gcc/ginclude/stddef.h -+++ gcc-5.4.0/gcc/ginclude/stddef.h -@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; - #ifndef _GCC_SIZE_T - #ifndef _SIZET_ - #ifndef __size_t -+#ifndef __DEFINED_size_t /* musl */ - #define __size_t__ /* BeOS */ - #define __SIZE_T__ /* Cray Unicos/Mk */ - #define _SIZE_T -@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; - #define ___int_size_t_h - #define _GCC_SIZE_T - #define _SIZET_ -+#define __DEFINED_size_t /* musl */ - #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || defined(__DragonFly__) \ - || defined(__FreeBSD_kernel__) -@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t; - typedef long ssize_t; - #endif /* __BEOS__ */ - #endif /* !(defined (__GNUG__) && defined (size_t)) */ -+#endif /* __DEFINED_size_t */ - #endif /* __size_t */ - #endif /* _SIZET_ */ - #endif /* _GCC_SIZE_T */ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch deleted file mode 100644 index 3c1115aa8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch +++ /dev/null @@ -1,216 +0,0 @@ -From a6c649571d49c972e6d207577780ada7e9b6bad5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 8 Dec 2015 08:31:52 +0000 -Subject: [PATCH 45/57] Support for arm-linux-musl. - -Fix musl ldso for all arches - -Upstream-Status: backport [partial] -Signed-off-by: Khem Raj ---- - gcc/config/aarch64/aarch64-linux.h | 1 + - gcc/config/arm/linux-eabi.h | 17 +++++++++++++++++ - gcc/config/i386/linux.h | 1 + - gcc/config/i386/linux64.h | 5 +++++ - gcc/config/mips/linux.h | 8 +++++++- - gcc/config/rs6000/linux64.h | 13 +++++++++---- - gcc/config/rs6000/sysv4.h | 10 +++++++--- - libitm/config/arm/hwcap.cc | 4 ++++ - libitm/config/linux/x86/tls.h | 8 ++++++-- - 9 files changed, 57 insertions(+), 10 deletions(-) - -diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h -index f9e65fc..1b2d0c0 100644 ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -22,6 +22,7 @@ - #define GCC_AARCH64_LINUX_H - - #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1" - - #define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1" - -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index 048a062..adb9c44 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -81,6 +81,23 @@ - #undef TARGET_FIX_V4BX_SPEC - #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC -diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index 21ba2b2..e2b81e5 100644 ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3. If not see - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1" -diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index 6185cce..5a3a977 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" -+ -+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1" -+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1" -+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1" -+ -diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index c306afb..b899388 100644 ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see - #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" - #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" - -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" -+ - #define GLIBC_DYNAMIC_LINKER32 \ - "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - #define GLIBC_DYNAMIC_LINKER64 \ -@@ -40,4 +46,4 @@ along with GCC; see the file COPYING3. If not see - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 31c4338..679da4b 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -365,17 +365,22 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1" -+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1" -+ - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index 7cd07e0..8794fa5 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -763,15 +763,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" -+ - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc -index a1c2cfd..dd4fad2 100644 ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include -+#ifdef __GLIBC__ - #include -+#else -+#include -+#endif - #include - - static void __attribute__((constructor)) -diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h -index e731ab7..54ad8b6 100644 ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x) - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch deleted file mode 100644 index ddb0fc4f4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 047116e8c9cbb340264f4f28db3f21a68ba57ff3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 8 Dec 2015 08:32:24 +0000 -Subject: [PATCH 46/46] Get rid of ever-broken fixincludes on musl. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - fixincludes/mkfixinc.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh -index 6653fedb..0d96c8c 100755 ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} --- -2.6.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch deleted file mode 100644 index a1cfb9c7a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f5ca07132b9292d2045ca7204e9cbfde2e59d0bf Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 2 Feb 2016 10:26:10 -0800 -Subject: [PATCH 47/48] nios2: Define MUSL_DYNAMIC_LINKER - -Signed-off-by: Marek Vasut -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - gcc/config/nios2/linux.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h -index f43f655..5587ab3 100644 ---- a/gcc/config/nios2/linux.h -+++ b/gcc/config/nios2/linux.h -@@ -30,6 +30,7 @@ - #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" - - #undef LINK_SPEC - #define LINK_SPEC LINK_SPEC_ENDIAN \ --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch deleted file mode 100644 index 5ddd40a4a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3cb6013cf287ed9b1247ea37541e64b9810a121d Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy -Date: Sat, 7 Nov 2015 14:58:40 +0000 -Subject: [PATCH 48/48] ssp_nonshared - ---- -Signed-off-by: Khem Raj -Upstream-Status: Pending - - gcc/gcc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 8f53aea..3ddc658 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -732,7 +732,8 @@ proper position among the other output files. */ - #ifndef LINK_SSP_SPEC - #ifdef TARGET_LIBC_PROVIDES_SSP - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -- "|fstack-protector-strong|fstack-protector-explicit:}" -+ "|fstack-protector-strong|fstack-protector-explicit" \ -+ ":-lssp_nonshared}" - #else - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit" \ --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch deleted file mode 100644 index 0ea5143e0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 553d8e3b9073ff3e0a9d2fac9b1823fb17ad247c Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 2 Feb 2016 21:00:18 -0800 -Subject: [PATCH 49/51] Disable the weak reference logic in gthr.h for - os/generic - -It does not work unless work arounds are there in gthr-posix.h - -origin of patch -http://port70.net/~nsz/musl/gcc-5.3.0/0004-gthr.patch - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - libgfortran/acinclude.m4 | 2 +- - libgfortran/configure | 2 +- - libstdc++-v3/config/os/generic/os_defines.h | 5 +++++ - libstdc++-v3/configure.host | 3 +++ - 4 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 -index ba890f9..30b8b1a6 100644 ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; -diff --git a/libgfortran/configure b/libgfortran/configure -index 5d47e65..cdf9695 100755 ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - -diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h -index 45bf52a..103ec0e 100644 ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif -diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 1756444..2a87bb8 100644 ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -273,6 +273,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - # check for musl by target - case "${host_os}" in --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch deleted file mode 100644 index b2f2bbdf4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 4fa0cf03678f849917dcc3d149989b7fecdbe276 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 2 Feb 2016 21:10:00 -0800 -Subject: [PATCH 50/51] powerpc pass --secure-plt to the linker - -Secure-plt when enabled does not pass right options to linker - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - gcc/config/rs6000/linux64.h | 4 ++++ - gcc/config/rs6000/sysv4.h | 2 ++ - 2 files changed, 6 insertions(+) - -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 679da4b..3ca7cd7 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -174,20 +174,24 @@ extern int dot_symbols; - #undef ASM_DEFAULT_SPEC - #undef ASM_SPEC - #undef LINK_OS_LINUX_SPEC -+#undef LINK_SECURE_PLT_SPEC - - #ifndef RS6000_BI_ARCH - #define ASM_DEFAULT_SPEC "-mppc64" - #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)" - #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)" -+#define LINK_SECURE_PLT_SPEC "" - #else - #if DEFAULT_ARCH64_P - #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" - #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)" - #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}" -+#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}" - #else - #define ASM_DEFAULT_SPEC "-mppc%{m64:64}" - #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" - #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}" -+#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}" - #endif - #endif - -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index 8794fa5..0835551 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -571,6 +571,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - : %(link_start_default) }" - - #define LINK_START_DEFAULT_SPEC "" -+#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC - - #undef LINK_SPEC - #define LINK_SPEC "\ -@@ -578,6 +579,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - %{R*} \ - %(link_shlib) \ - %{!T*: %(link_start) } \ -+%{!static: %{!mbss-plt: %(link_secure_plt_default)}} \ - %(link_os)" - - /* Shared libraries are not default. */ --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch deleted file mode 100644 index e8f79b590..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001 -From: bernds -Date: Tue, 16 Feb 2016 03:15:15 -0500 -Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn - Gillmor) - -* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4 - -Upstream-Status: Backport -Signed-off-by: Hongxu Jia ---- - gcc/dwarf2out.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c -index 3614c10..526f114 100644 ---- a/gcc/dwarf2out.c -+++ b/gcc/dwarf2out.c -@@ -19670,6 +19670,7 @@ gen_producer_string (void) - case OPT_fpreprocessed: - case OPT_fltrans_output_list_: - case OPT_fresolution_: -+ case OPT_fdebug_prefix_map_: - /* Ignore these. */ - continue; - default: --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch deleted file mode 100644 index f3cb47fd1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 Mon Sep 17 00:00:00 2001 -From: sandra -Date: Tue, 12 May 2015 15:57:22 +0000 -Subject: [PATCH] 2015-05-12 Chung-Lin Tang - Sandra Loosemore - - gcc/ - * config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum - value. - (REG_CLASS_NAMES): Add "IJMP_REGS". - (REG_CLASS_CONTENTS): Add new entry for IJMP_REGS. - * config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to - use new "c" register constraint. - * config/nios2/constraint.md (c): New register constraint - corresponding to IJMP_REGS. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4 -Signed-off-by: Marek Vasut -Upstream-Status: Backport [ git://gcc.gnu.org/git/gcc.git 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 ] ---- - gcc/ChangeLog | 12 ++++++++++++ - gcc/config/nios2/constraints.md | 3 +++ - gcc/config/nios2/nios2.h | 11 +++++++---- - gcc/config/nios2/nios2.md | 4 ++-- - 4 files changed, 24 insertions(+), 6 deletions(-) - -diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md -index f4bd9f7..735f892 100644 ---- a/gcc/config/nios2/constraints.md -+++ b/gcc/config/nios2/constraints.md -@@ -39,6 +39,9 @@ - - ;; Register constraints - -+(define_register_constraint "c" "IJMP_REGS" -+ "A register suitable for an indirect jump.") -+ - (define_register_constraint "j" "SIB_REGS" - "A register suitable for an indirect sibcall.") - -diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h -index 510ab5f..ac33978 100644 ---- a/gcc/config/nios2/nios2.h -+++ b/gcc/config/nios2/nios2.h -@@ -173,6 +173,7 @@ enum reg_class - { - NO_REGS, - SIB_REGS, -+ IJMP_REGS, - GP_REGS, - ALL_REGS, - LIM_REG_CLASSES -@@ -183,6 +184,7 @@ enum reg_class - #define REG_CLASS_NAMES \ - { "NO_REGS", \ - "SIB_REGS", \ -+ "IJMP_REGS", \ - "GP_REGS", \ - "ALL_REGS" } - -@@ -190,10 +192,11 @@ enum reg_class - - #define REG_CLASS_CONTENTS \ - { \ -- /* NO_REGS */ { 0, 0}, \ -- /* SIB_REGS */ { 0xfe0c, 0}, \ -- /* GP_REGS */ {~0, 0}, \ -- /* ALL_REGS */ {~0,~0} \ -+ /* NO_REGS */ { 0, 0}, \ -+ /* SIB_REGS */ { 0xfe0c, 0}, \ -+ /* IJMP_REGS */ { 0x7fffffff, 0}, \ -+ /* GP_REGS */ {~0, 0}, \ -+ /* ALL_REGS */ {~0,~0} \ - } - - -diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md -index 7b35d269..36ef101 100644 ---- a/gcc/config/nios2/nios2.md -+++ b/gcc/config/nios2/nios2.md -@@ -697,7 +697,7 @@ - ; check or adjust for overflow. - - (define_insn "indirect_jump" -- [(set (pc) (match_operand:SI 0 "register_operand" "r"))] -+ [(set (pc) (match_operand:SI 0 "register_operand" "c"))] - "" - "jmp\\t%0" - [(set_attr "type" "control")]) -@@ -811,7 +811,7 @@ - - (define_insn "*tablejump" - [(set (pc) -- (match_operand:SI 0 "register_operand" "r")) -+ (match_operand:SI 0 "register_operand" "c")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jmp\\t%0" --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch deleted file mode 100644 index c18f40e74..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch +++ /dev/null @@ -1,307 +0,0 @@ -From 536b8318974495cde2b42c3c2742748e2b271be0 Mon Sep 17 00:00:00 2001 -From: ktkachov -Date: Wed, 27 May 2015 13:25:01 +0000 -Subject: [PATCH] PR target/65358 Avoid clobbering partial argument during - sibcall - - PR target/65358 - * expr.c (memory_load_overlap): New function. - (emit_push_insn): When pushing partial args to the stack would - clobber the register part load the overlapping part into a pseudo - and put it into the hard reg after pushing. Change return type - to bool. Add bool argument. - * expr.h (emit_push_insn): Change return type to bool. - Add bool argument. - * calls.c (expand_call): Cancel sibcall optimization when encountering - partial argument on targets with ARGS_GROW_DOWNWARD and - !STACK_GROWS_DOWNWARD. - (emit_library_call_value_1): Update callsite of emit_push_insn. - (store_one_arg): Likewise. - - PR target/65358 - * gcc.dg/pr65358.c: New test. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223753 138bc75d-0d04-0410-961f-82ee72b054a4 - -Upstream-Status: Backport from 6.0 -Signed-off-by: Martin Jansa ---- - gcc/calls.c | 17 ++++++-- - gcc/expr.c | 90 +++++++++++++++++++++++++++++++++++++----- - gcc/expr.h | 4 +- - gcc/testsuite/gcc.dg/pr65358.c | 33 ++++++++++++++++ - 4 files changed, 129 insertions(+), 15 deletions(-) - create mode 100644 gcc/testsuite/gcc.dg/pr65358.c - -diff --git a/gcc/calls.c b/gcc/calls.c -index ee8ea5f..2334381 100644 ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -3236,6 +3236,14 @@ expand_call (tree exp, rtx target, int ignore) - { - rtx_insn *before_arg = get_last_insn (); - -+ /* On targets with weird calling conventions (e.g. PA) it's -+ hard to ensure that all cases of argument overlap between -+ stack and registers work. Play it safe and bail out. */ -+#if defined(ARGS_GROW_DOWNWARD) && !defined(STACK_GROWS_DOWNWARD) -+ sibcall_failure = 1; -+ break; -+#endif -+ - if (store_one_arg (&args[i], argblock, flags, - adjusted_args_size.var != 0, - reg_parm_stack_space) -@@ -4279,7 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, - partial, reg, 0, argblock, - GEN_INT (argvec[argnum].locate.offset.constant), - reg_parm_stack_space, -- ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad)); -+ ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad), false); - - /* Now mark the segment we just used. */ - if (ACCUMULATE_OUTGOING_ARGS) -@@ -4886,10 +4894,11 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags, - - /* This isn't already where we want it on the stack, so put it there. - This can either be done with push or copy insns. */ -- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, -+ if (!emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, - parm_align, partial, reg, used - size, argblock, - ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space, -- ARGS_SIZE_RTX (arg->locate.alignment_pad)); -+ ARGS_SIZE_RTX (arg->locate.alignment_pad), true)) -+ sibcall_failure = 1; - - /* Unless this is a partially-in-register argument, the argument is now - in the stack. */ -@@ -5001,7 +5010,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags, - emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx, - parm_align, partial, reg, excess, argblock, - ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space, -- ARGS_SIZE_RTX (arg->locate.alignment_pad)); -+ ARGS_SIZE_RTX (arg->locate.alignment_pad), false); - - /* Unless this is a partially-in-register argument, the argument is now - in the stack. -diff --git a/gcc/expr.c b/gcc/expr.c -index 5c09550..24a6293 100644 ---- a/gcc/expr.c -+++ b/gcc/expr.c -@@ -4121,12 +4121,35 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type) - } - #endif - -+/* If reading SIZE bytes from X will end up reading from -+ Y return the number of bytes that overlap. Return -1 -+ if there is no overlap or -2 if we can't determine -+ (for example when X and Y have different base registers). */ -+ -+static int -+memory_load_overlap (rtx x, rtx y, HOST_WIDE_INT size) -+{ -+ rtx tmp = plus_constant (Pmode, x, size); -+ rtx sub = simplify_gen_binary (MINUS, Pmode, tmp, y); -+ -+ if (!CONST_INT_P (sub)) -+ return -2; -+ -+ HOST_WIDE_INT val = INTVAL (sub); -+ -+ return IN_RANGE (val, 1, size) ? val : -1; -+} -+ - /* Generate code to push X onto the stack, assuming it has mode MODE and - type TYPE. - MODE is redundant except when X is a CONST_INT (since they don't - carry mode info). - SIZE is an rtx for the size of data to be copied (in bytes), - needed only if X is BLKmode. -+ Return true if successful. May return false if asked to push a -+ partial argument during a sibcall optimization (as specified by -+ SIBCALL_P) and the incoming and outgoing pointers cannot be shown -+ to not overlap. - - ALIGN (in bits) is maximum alignment we can assume. - -@@ -4152,11 +4175,11 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type) - for arguments passed in registers. If nonzero, it will be the number - of bytes required. */ - --void -+bool - emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - unsigned int align, int partial, rtx reg, int extra, - rtx args_addr, rtx args_so_far, int reg_parm_stack_space, -- rtx alignment_pad) -+ rtx alignment_pad, bool sibcall_p) - { - rtx xinner; - enum direction stack_direction -@@ -4179,6 +4202,10 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - - xinner = x; - -+ int nregs = partial / UNITS_PER_WORD; -+ rtx *tmp_regs = NULL; -+ int overlapping = 0; -+ - if (mode == BLKmode - || (STRICT_ALIGNMENT && align < GET_MODE_ALIGNMENT (mode))) - { -@@ -4309,6 +4336,43 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - PARM_BOUNDARY. Assume the caller isn't lying. */ - set_mem_align (target, align); - -+ /* If part should go in registers and pushing to that part would -+ overwrite some of the values that need to go into regs, load the -+ overlapping values into temporary pseudos to be moved into the hard -+ regs at the end after the stack pushing has completed. -+ We cannot load them directly into the hard regs here because -+ they can be clobbered by the block move expansions. -+ See PR 65358. */ -+ -+ if (partial > 0 && reg != 0 && mode == BLKmode -+ && GET_CODE (reg) != PARALLEL) -+ { -+ overlapping = memory_load_overlap (XEXP (x, 0), temp, partial); -+ if (overlapping > 0) -+ { -+ gcc_assert (overlapping % UNITS_PER_WORD == 0); -+ overlapping /= UNITS_PER_WORD; -+ -+ tmp_regs = XALLOCAVEC (rtx, overlapping); -+ -+ for (int i = 0; i < overlapping; i++) -+ tmp_regs[i] = gen_reg_rtx (word_mode); -+ -+ for (int i = 0; i < overlapping; i++) -+ emit_move_insn (tmp_regs[i], -+ operand_subword_force (target, i, mode)); -+ } -+ else if (overlapping == -1) -+ overlapping = 0; -+ /* Could not determine whether there is overlap. -+ Fail the sibcall. */ -+ else -+ { -+ overlapping = 0; -+ if (sibcall_p) -+ return false; -+ } -+ } - emit_block_move (target, xinner, size, BLOCK_OP_CALL_PARM); - } - } -@@ -4363,12 +4427,13 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - has a size a multiple of a word. */ - for (i = size - 1; i >= not_stack; i--) - if (i >= not_stack + offset) -- emit_push_insn (operand_subword_force (x, i, mode), -+ if (!emit_push_insn (operand_subword_force (x, i, mode), - word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX, - 0, args_addr, - GEN_INT (args_offset + ((i - not_stack + skip) - * UNITS_PER_WORD)), -- reg_parm_stack_space, alignment_pad); -+ reg_parm_stack_space, alignment_pad, sibcall_p)) -+ return false; - } - else - { -@@ -4411,9 +4476,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - } - } - -- /* If part should go in registers, copy that part -- into the appropriate registers. Do this now, at the end, -- since mem-to-mem copies above may do function calls. */ -+ /* Move the partial arguments into the registers and any overlapping -+ values that we moved into the pseudos in tmp_regs. */ - if (partial > 0 && reg != 0) - { - /* Handle calls that pass values in multiple non-contiguous locations. -@@ -4421,9 +4485,15 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - if (GET_CODE (reg) == PARALLEL) - emit_group_load (reg, x, type, -1); - else -- { -+ { - gcc_assert (partial % UNITS_PER_WORD == 0); -- move_block_to_reg (REGNO (reg), x, partial / UNITS_PER_WORD, mode); -+ move_block_to_reg (REGNO (reg), x, nregs - overlapping, mode); -+ -+ for (int i = 0; i < overlapping; i++) -+ emit_move_insn (gen_rtx_REG (word_mode, REGNO (reg) -+ + nregs - overlapping + i), -+ tmp_regs[i]); -+ - } - } - -@@ -4432,6 +4502,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, - - if (alignment_pad && args_addr == 0) - anti_adjust_stack (alignment_pad); -+ -+ return true; - } - - /* Return X if X can be used as a subtarget in a sequence of arithmetic -diff --git a/gcc/expr.h b/gcc/expr.h -index 867852e..5fcc13f 100644 ---- a/gcc/expr.h -+++ b/gcc/expr.h -@@ -218,8 +218,8 @@ extern rtx emit_move_resolve_push (machine_mode, rtx); - extern rtx push_block (rtx, int, int); - - /* Generate code to push something onto the stack, given its mode and type. */ --extern void emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int, -- int, rtx, int, rtx, rtx, int, rtx); -+extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int, -+ int, rtx, int, rtx, rtx, int, rtx, bool); - - /* Expand an assignment that stores the value of FROM into TO. */ - extern void expand_assignment (tree, tree, bool); -diff --git a/gcc/testsuite/gcc.dg/pr65358.c b/gcc/testsuite/gcc.dg/pr65358.c -new file mode 100644 -index 0000000..ba89fd4 ---- /dev/null -+++ b/gcc/testsuite/gcc.dg/pr65358.c -@@ -0,0 +1,33 @@ -+/* { dg-do run } */ -+/* { dg-options "-O2" } */ -+ -+struct pack -+{ -+ int fine; -+ int victim; -+ int killer; -+}; -+ -+int __attribute__ ((__noinline__, __noclone__)) -+bar (int a, int b, struct pack p) -+{ -+ if (a != 20 || b != 30) -+ __builtin_abort (); -+ if (p.fine != 40 || p.victim != 50 || p.killer != 60) -+ __builtin_abort (); -+ return 0; -+} -+ -+int __attribute__ ((__noinline__, __noclone__)) -+foo (int arg1, int arg2, int arg3, struct pack p) -+{ -+ return bar (arg2, arg3, p); -+} -+ -+int main (void) -+{ -+ struct pack p = { 40, 50, 60 }; -+ -+ (void) foo (10, 20, 30, p); -+ return 0; -+} --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch deleted file mode 100644 index da1687913..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch +++ /dev/null @@ -1,284 +0,0 @@ -From ef7c2bda6b4c88f8007ed663b1108cd4651598c8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 16 Mar 2016 02:27:43 -0400 -Subject: [PATCH] gcc/libcpp: support -ffile-prefix-map== - -Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one -directory name (old) to another (new) in __FILE__, __BASE_FILE__ and -__builtin_FILE (). - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268 - -Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] -Signed-off-by: Hongxu Jia ---- - gcc/c-family/c-opts.c | 6 ++++ - gcc/c-family/c.opt | 4 +++ - gcc/dwarf2out.c | 1 + - gcc/gimplify.c | 2 ++ - libcpp/Makefile.in | 10 +++--- - libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++ - libcpp/include/file-map.h | 30 ++++++++++++++++ - libcpp/macro.c | 2 ++ - 8 files changed, 142 insertions(+), 5 deletions(-) - create mode 100644 libcpp/file-map.c - create mode 100644 libcpp/include/file-map.h - -diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c -index 718a052..3f93c56 100644 ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see - #include "opts.h" - #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */ - #include "mkdeps.h" -+#include "file-map.h" - #include "c-target.h" - #include "tm.h" /* For BYTES_BIG_ENDIAN, - DOLLARS_IN_IDENTIFIERS, -@@ -510,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value, - cpp_opts->narrow_charset = arg; - break; - -+ case OPT_ffile_prefix_map_: -+ if (add_file_prefix_map (arg) < 0) -+ error ("invalid argument %qs to -ffile-prefix-map", arg); -+ break; -+ - case OPT_fwide_exec_charset_: - cpp_opts->wide_charset = arg; - break; -diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt -index 453ec8e..30ad053 100644 ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1117,6 +1117,10 @@ fexec-charset= - C ObjC C++ ObjC++ Joined RejectNegative - -fexec-charset= Convert all strings and character constants to character set - -+ffile-prefix-map= -+C ObjC C++ ObjC++ Joined RejectNegative -+-ffile-prefix-map= Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE () -+ - fextended-identifiers - C ObjC C++ ObjC++ - Permit universal character names (\\u and \\U) in identifiers -diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c -index 526f114..438a475 100644 ---- a/gcc/dwarf2out.c -+++ b/gcc/dwarf2out.c -@@ -19671,6 +19671,7 @@ gen_producer_string (void) - case OPT_fltrans_output_list_: - case OPT_fresolution_: - case OPT_fdebug_prefix_map_: -+ case OPT_ffile_prefix_map_: - /* Ignore these. */ - continue; - default: -diff --git a/gcc/gimplify.c b/gcc/gimplify.c -index c85f83a..1ffe1e1 100644 ---- a/gcc/gimplify.c -+++ b/gcc/gimplify.c -@@ -87,6 +87,7 @@ along with GCC; see the file COPYING3. If not see - #include "gimple-low.h" - #include "cilk.h" - #include "gomp-constants.h" -+#include "file-map.h" - - #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */ - #include "tree-pass.h" /* FIXME: only for PROP_gimple_any */ -@@ -2370,6 +2371,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value) - case BUILT_IN_FILE: - { - const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p)); -+ locfile = remap_file_filename (locfile); - *expr_p = build_string_literal (strlen (locfile) + 1, locfile); - return GS_OK; - } -diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in -index ad35563..c210ff9 100644 ---- a/libcpp/Makefile.in -+++ b/libcpp/Makefile.in -@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE) - - - libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \ -- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \ -- mkdeps.o pch.o symtab.o traditional.o -+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \ -+ macro.o mkdeps.o pch.o symtab.o traditional.o - - libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \ -- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \ -- mkdeps.c pch.c symtab.c traditional.c -+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \ -+ macro.c mkdeps.c pch.c symtab.c traditional.c - - all: libcpp.a $(USED_CATALOGS) - -@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES) - - TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \ - include/line-map.h include/symtab.h include/cpp-id-data.h \ -- include/cpplib.h include/mkdeps.h system.h -+ include/cpplib.h include/mkdeps.h system.h include/file-map.h - - TAGS: $(TAGS_SOURCES) - cd $(srcdir) && etags $(TAGS_SOURCES) -diff --git a/libcpp/file-map.c b/libcpp/file-map.c -new file mode 100644 -index 0000000..04e851b ---- /dev/null -+++ b/libcpp/file-map.c -@@ -0,0 +1,92 @@ -+/* Map one directory name to another in __FILE__, __BASE_FILE__ -+ and __builtin_FILE (). -+ Copyright (C) 2001-2016 Free Software Foundation, Inc. -+ -+This program is free software; you can redistribute it and/or modify it -+under the terms of the GNU General Public License as published by the -+Free Software Foundation; either version 3, or (at your option) any -+later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; see the file COPYING3. If not see -+. -+ -+ In other words, you are welcome to use, share and improve this program. -+ You are forbidden to forbid anyone else to use, share and improve -+ what you give them. Help stamp out software-hoarding! */ -+ -+#include "config.h" -+#include "system.h" -+#include "file-map.h" -+ -+/* Structure recording the mapping from source file and directory -+ names at compile time to __FILE__ */ -+typedef struct file_prefix_map -+{ -+ const char *old_prefix; -+ const char *new_prefix; -+ size_t old_len; -+ size_t new_len; -+ struct file_prefix_map *next; -+} file_prefix_map; -+ -+/* Linked list of such structures. */ -+static file_prefix_map *file_prefix_maps; -+ -+/* Record prefix mapping of __FILE__. ARG is the argument to -+ -ffile-prefix-map and must be of the form OLD=NEW. */ -+int -+add_file_prefix_map (const char *arg) -+{ -+ file_prefix_map *map; -+ const char *p; -+ -+ p = strchr (arg, '='); -+ if (!p) -+ { -+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg); -+ return -1; -+ } -+ map = XNEW (file_prefix_map); -+ map->old_prefix = xstrndup (arg, p - arg); -+ map->old_len = p - arg; -+ p++; -+ map->new_prefix = xstrdup (p); -+ map->new_len = strlen (p); -+ map->next = file_prefix_maps; -+ file_prefix_maps = map; -+ -+ return 0; -+} -+ -+/* Perform user-specified mapping of __FILE__ prefixes. Return -+ the new name corresponding to filename. */ -+ -+const char * -+remap_file_filename (const char *filename) -+{ -+ file_prefix_map *map; -+ char *s; -+ const char *name; -+ size_t name_len; -+ -+ for (map = file_prefix_maps; map; map = map->next) -+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) -+ break; -+ if (!map) -+ return filename; -+ name = filename + map->old_len; -+ name_len = strlen (name) + 1; -+ s = (char *) alloca (name_len + map->new_len); -+ memcpy (s, map->new_prefix, map->new_len); -+ memcpy (s + map->new_len, name, name_len); -+ -+ return xstrdup (s); -+} -+ -+ -diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h -new file mode 100644 -index 0000000..e6f8cbf ---- /dev/null -+++ b/libcpp/include/file-map.h -@@ -0,0 +1,30 @@ -+/* Map one directory name to another in __FILE__, __BASE_FILE__ -+ and __builtin_FILE (). -+ Copyright (C) 2001-2016 Free Software Foundation, Inc. -+ -+This program is free software; you can redistribute it and/or modify it -+under the terms of the GNU General Public License as published by the -+Free Software Foundation; either version 3, or (at your option) any -+later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; see the file COPYING3. If not see -+. -+ -+ In other words, you are welcome to use, share and improve this program. -+ You are forbidden to forbid anyone else to use, share and improve -+ what you give them. Help stamp out software-hoarding! */ -+ -+#ifndef LIBCPP_FILE_MAP_H -+#define LIBCPP_FILE_MAP_H -+ -+const char * remap_file_filename (const char *filename); -+ -+int add_file_prefix_map (const char *arg); -+ -+#endif /* !LIBCPP_FILE_MAP_H */ -diff --git a/libcpp/macro.c b/libcpp/macro.c -index 1e0a0b5..c3d330c 100644 ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see - #include "system.h" - #include "cpplib.h" - #include "internal.h" -+#include "file-map.h" - - typedef struct macro_arg macro_arg; - /* This structure represents the tokens of a macro argument. These -@@ -297,6 +298,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node) - if (!name) - abort (); - } -+ name = remap_file_filename (name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch deleted file mode 100644 index c7caed8c8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 16 Mar 2016 05:39:59 -0400 -Subject: [PATCH] Reuse -fdebug-prefix-map to replace -ffile-prefix-map - -The oe-core may use external toolchain to compile, -which may not support -ffile-prefix-map. - -Since we use -fdebug-prefix-map to do the same thing, -so we could reuse it to replace -ffile-prefix-map. - -Upstream-Status: Inappropriate[oe-core specific] - -Signed-off-by: Hongxu Jia ---- - gcc/opts-global.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/gcc/opts-global.c b/gcc/opts-global.c -index b61bdcf..51bb177 100644 ---- a/gcc/opts-global.c -+++ b/gcc/opts-global.c -@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see - #include "rtl.h" - #include "dbgcnt.h" - #include "debug.h" -+#include "file-map.h" - #include "hash-map.h" - #include "plugin-api.h" - #include "ipa-ref.h" -@@ -378,6 +379,9 @@ handle_common_deferred_options (void) - - case OPT_fdebug_prefix_map_: - add_debug_prefix_map (opt->arg); -+ -+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */ -+ add_file_prefix_map (opt->arg); - break; - - case OPT_fdump_: --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch deleted file mode 100644 index 97913420e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5c7bd853c8703f65904083778712ef625c3f3814 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 27 Mar 2016 20:31:50 -0700 -Subject: [PATCH 56/57] Enable libc provide ssp and - gcc_cv_target_dl_iterate_phdr for musl - - * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. - (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. - * configure: Regenerate. - -Signed-off-by: Khem Raj ---- -Upstream-Status: Backport - - gcc/configure | 7 +++++++ - gcc/configure.ac | 7 +++++++ - 2 files changed, 14 insertions(+) - -diff --git a/gcc/configure b/gcc/configure -index fcb05e7..81a449c 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -27814,6 +27814,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then : - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27846,6 +27849,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27942,6 +27946,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 923bc9a..b08e3dc 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5291,6 +5291,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5317,6 +5320,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5390,6 +5394,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch deleted file mode 100644 index c193587bf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c5c33bf881a2aea355310dd90873ed39bc272b3c Mon Sep 17 00:00:00 2001 -From: ktkachov -Date: Wed, 22 Apr 2015 14:20:01 +0000 -Subject: [PATCH 57/57] unwind fix for musl - -On behalf of szabolcs.nagy@arm.com - -2015-04-22 Gregor Richards - Szabolcs Nagy - - * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on - Linux if target provides dl_iterate_phdr. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 - -Signed-off-by: Khem Raj ---- -Upstream-Status: Backport - - libgcc/unwind-dw2-fde-dip.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c -index e1e566b..137dced 100644 ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -59,6 +59,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch deleted file mode 100644 index 0b91fdbbc..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Thu, 24 Mar 2016 11:23:14 -0400 -Subject: [PATCH] gcc/final.c: -fdebug-prefix-map support to remap sources with - relative path - -PR other/70428 -* final.c (remap_debug_filename): Use lrealpath to translate -relative path before remapping - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428 -Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] - -Signed-off-by: Hongxu Jia ---- -diff --git a/gcc/final.c b/gcc/final.c -index 55cf509..c3594c2 100644 ---- a/gcc/final.c -+++ b/gcc/final.c -@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename) - const char *name; - size_t name_len; - -+ /* Support to remap filename with relative path */ -+ char *realpath = lrealpath (filename); -+ if (realpath == NULL) -+ return filename; -+ - for (map = debug_prefix_maps; map; map = map->next) -- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) -+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0) - break; - if (!map) -- return filename; -- name = filename + map->old_len; -+ { -+ free (realpath); -+ return filename; -+ } -+ name = realpath + map->old_len; - name_len = strlen (name) + 1; - s = (char *) alloca (name_len + map->new_len); - memcpy (s, map->new_prefix, map->new_len); - memcpy (s + map->new_len, name, name_len); -+ free (realpath); - return ggc_strdup (s); - } - --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch deleted file mode 100644 index 325b72ab5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch +++ /dev/null @@ -1,16 +0,0 @@ -Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS - -Signed-off-by: Christopher Larson -Upstream-Status: Pending - ---- gcc-5.3.0.orig/libgcc/config/t-slibgcc -+++ gcc-5.3.0/libgcc/config/t-slibgcc -@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_S - $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) - - SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -- $(SHLIB_LDFLAGS) \ -+ $(LDFLAGS) $(SHLIB_LDFLAGS) \ - -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ - $(SHLIB_OBJS) $(SHLIB_LC) && \ - rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch deleted file mode 100644 index 88524c342..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch +++ /dev/null @@ -1,251 +0,0 @@ -From b3f6b32165d3f437bd0ac6269c3c499b68ecf036 Mon Sep 17 00:00:00 2001 -From: law -Date: Thu, 4 Aug 2016 16:53:18 +0000 -Subject: [PATCH] Fix for PR71696 in Libiberty Demangler -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696 - -2016-08-04 Marcel Böhme - - PR c++/71696 - * cplus-dem.c: Prevent infinite recursion when there is a cycle - in the referencing of remembered mangled types. - (work_stuff): New stack to keep track of the remembered mangled - types that are currently being processed. - (push_processed_type): New method to push currently processed - remembered type onto the stack. - (pop_processed_type): New method to pop currently processed - remembered type from the stack. - (work_stuff_copy_to_from): Copy values of new variables. - (delete_non_B_K_work_stuff): Free stack memory. - (demangle_args): Push/Pop currently processed remembered type. - (do_type): Do not demangle a cyclic reference and push/pop - referenced remembered type. - -cherry-picked from commit of -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4 - -Upstream-Status: Backport [master] -CVE: CVE-2016-6131 -Signed-off-by: Yuanjie Huang ---- - libiberty/ChangeLog | 17 ++++++++ - libiberty/cplus-dem.c | 78 ++++++++++++++++++++++++++++++++--- - libiberty/testsuite/demangle-expected | 18 ++++++++ - 3 files changed, 108 insertions(+), 5 deletions(-) - -diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog -index 9859ad3..7939480 100644 ---- a/libiberty/ChangeLog -+++ b/libiberty/ChangeLog -@@ -1,3 +1,20 @@ -+2016-08-04 Marcel Böhme -+ -+ PR c++/71696 -+ * cplus-dem.c: Prevent infinite recursion when there is a cycle -+ in the referencing of remembered mangled types. -+ (work_stuff): New stack to keep track of the remembered mangled -+ types that are currently being processed. -+ (push_processed_type): New method to push currently processed -+ remembered type onto the stack. -+ (pop_processed_type): New method to pop currently processed -+ remembered type from the stack. -+ (work_stuff_copy_to_from): Copy values of new variables. -+ (delete_non_B_K_work_stuff): Free stack memory. -+ (demangle_args): Push/Pop currently processed remembered type. -+ (do_type): Do not demangle a cyclic reference and push/pop -+ referenced remembered type. -+ - 2016-06-03 Release Manager - - * GCC 5.4.0 released. -diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c -index 7514e57..f21e630 100644 ---- a/libiberty/cplus-dem.c -+++ b/libiberty/cplus-dem.c -@@ -144,6 +144,9 @@ struct work_stuff - string* previous_argument; /* The last function argument demangled. */ - int nrepeats; /* The number of times to repeat the previous - argument. */ -+ int *proctypevec; /* Indices of currently processed remembered typevecs. */ -+ int proctypevec_size; -+ int nproctypes; - }; - - #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI) -@@ -435,6 +438,10 @@ iterate_demangle_function (struct work_stuff *, - - static void remember_type (struct work_stuff *, const char *, int); - -+static void push_processed_type (struct work_stuff *, int); -+ -+static void pop_processed_type (struct work_stuff *); -+ - static void remember_Btype (struct work_stuff *, const char *, int, int); - - static int register_Btype (struct work_stuff *); -@@ -1301,6 +1308,10 @@ work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from) - memcpy (to->btypevec[i], from->btypevec[i], len); - } - -+ if (from->proctypevec) -+ to->proctypevec = -+ XDUPVEC (int, from->proctypevec, from->proctypevec_size); -+ - if (from->ntmpl_args) - to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args); - -@@ -1329,11 +1340,17 @@ delete_non_B_K_work_stuff (struct work_stuff *work) - /* Discard the remembered types, if any. */ - - forget_types (work); -- if (work -> typevec != NULL) -+ if (work->typevec != NULL) - { -- free ((char *) work -> typevec); -- work -> typevec = NULL; -- work -> typevec_size = 0; -+ free ((char *) work->typevec); -+ work->typevec = NULL; -+ work->typevec_size = 0; -+ } -+ if (work->proctypevec != NULL) -+ { -+ free (work->proctypevec); -+ work->proctypevec = NULL; -+ work->proctypevec_size = 0; - } - if (work->tmpl_argvec) - { -@@ -3552,6 +3569,8 @@ static int - do_type (struct work_stuff *work, const char **mangled, string *result) - { - int n; -+ int i; -+ int is_proctypevec; - int done; - int success; - string decl; -@@ -3564,6 +3583,7 @@ do_type (struct work_stuff *work, const char **mangled, string *result) - - done = 0; - success = 1; -+ is_proctypevec = 0; - while (success && !done) - { - int member; -@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const char **mangled, string *result) - success = 0; - } - else -+ for (i = 0; i < work->nproctypes; i++) -+ if (work -> proctypevec [i] == n) -+ success = 0; -+ -+ if (success) - { -- remembered_type = work -> typevec[n]; -+ is_proctypevec = 1; -+ push_processed_type (work, n); -+ remembered_type = work->typevec[n]; - mangled = &remembered_type; - } - break; -@@ -3840,6 +3867,9 @@ do_type (struct work_stuff *work, const char **mangled, string *result) - string_delete (result); - string_delete (&decl); - -+ if (is_proctypevec) -+ pop_processed_type (work); -+ - if (success) - /* Assume an integral type, if we're not sure. */ - return (int) ((tk == tk_none) ? tk_integral : tk); -@@ -4252,6 +4282,41 @@ do_arg (struct work_stuff *work, const char **mangled, string *result) - } - - static void -+push_processed_type (struct work_stuff *work, int typevec_index) -+{ -+ if (work->nproctypes >= work->proctypevec_size) -+ { -+ if (!work->proctypevec_size) -+ { -+ work->proctypevec_size = 4; -+ work->proctypevec = XNEWVEC (int, work->proctypevec_size); -+ } -+ else -+ { -+ if (work->proctypevec_size < 16) -+ /* Double when small. */ -+ work->proctypevec_size *= 2; -+ else -+ { -+ /* Grow slower when large. */ -+ if (work->proctypevec_size > (INT_MAX / 3) * 2) -+ xmalloc_failed (INT_MAX); -+ work->proctypevec_size = (work->proctypevec_size * 3 / 2); -+ } -+ work->proctypevec -+ = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size); -+ } -+ } -+ work->proctypevec [work->nproctypes++] = typevec_index; -+} -+ -+static void -+pop_processed_type (struct work_stuff *work) -+{ -+ work->nproctypes--; -+} -+ -+static void - remember_type (struct work_stuff *work, const char *start, int len) - { - char *tem; -@@ -4515,10 +4580,13 @@ demangle_args (struct work_stuff *work, const char **mangled, - { - string_append (declp, ", "); - } -+ push_processed_type (work, t); - if (!do_arg (work, &tem, &arg)) - { -+ pop_processed_type (work); - return (0); - } -+ pop_processed_type (work); - if (PRINT_ARG_TYPES) - { - string_appends (declp, &arg); -diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected -index 1d8b771..d690b23 100644 ---- a/libiberty/testsuite/demangle-expected -+++ b/libiberty/testsuite/demangle-expected -@@ -4429,3 +4429,21 @@ __vt_90000000000cafebabe - - _Z80800000000000000000000 - _Z80800000000000000000000 -+# -+# Tests write access violation PR70926 -+ -+0__Ot2m02R5T0000500000 -+0__Ot2m02R5T0000500000 -+# -+ -+0__GT50000000000_ -+0__GT50000000000_ -+# -+ -+__t2m05B500000000000000000_ -+__t2m05B500000000000000000_ -+# -+# Tests stack overflow PR71696 -+ -+__10%0__S4_0T0T0 -+%0<>::%0(%0<>) --- -2.9.3 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc index 5c81a33af..e569e0220 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc @@ -32,12 +32,6 @@ BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" SRC_URI = "\ ${BASEURI} \ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ - file://0002-uclibc-conf.patch \ - file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \ - file://0004-uclibc-locale.patch \ - file://0005-uclibc-locale-no__x.patch \ - file://0006-uclibc-locale-wchar_fix.patch \ - file://0007-uclibc-locale-update.patch \ file://0008-missing-execinfo_h.patch \ file://0009-c99-snprintf.patch \ file://0010-gcc-poison-system-directories.patch \ @@ -71,7 +65,7 @@ SRC_URI = "\ file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \ file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ - file://0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0041-ssp_nonshared.patch \ file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \ file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \ @@ -81,6 +75,7 @@ SRC_URI = "\ file://0048-sync-gcc-stddef.h-with-musl.patch \ file://0054_all_nopie-all-flags.patch \ file://0055-unwind_h-glibc26.patch \ + file://0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch \ ${BACKPORTS} \ " BACKPORTS = "\ @@ -129,8 +124,6 @@ EXTRA_OECONF_INITIAL = "\ gcc_cv_libc_provides_ssp=yes \ " -EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float " - EXTRA_OECONF_PATHS = "\ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ --with-sysroot=/not/exist \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch deleted file mode 100644 index 4d284ef86..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4efc5a258c812875743647d756f75c93c4d514a5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:38:25 +0400 -Subject: [PATCH 02/46] uclibc-conf - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - contrib/regression/objs-gcc.sh | 4 ++++ - libjava/classpath/ltconfig | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh -index 60b0497..6dc7ead 100755 ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 -diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig -index d318957..df55950 100755 ---- a/libjava/classpath/ltconfig -+++ b/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch deleted file mode 100644 index df07febee..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch +++ /dev/null @@ -1,87 +0,0 @@ -From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:40:12 +0400 -Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++ - libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++ - libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++ - 3 files changed, 23 insertions(+) - -diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc -index ef6ce8f..4740636 100644 ---- a/libstdc++-v3/config/locale/generic/c_locale.cc -+++ b/libstdc++-v3/config/locale/generic/c_locale.cc -@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION - #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT - #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ - extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) -+#ifdef __UCLIBC__ -+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* -+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); -+#else - _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); -+#endif - #endif // _GLIBCXX_LONG_DOUBLE_COMPAT -diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h -index 794471e..d65f955 100644 ---- a/libstdc++-v3/config/locale/generic/c_locale.h -+++ b/libstdc++-v3/config/locale/generic/c_locale.h -@@ -40,13 +40,22 @@ - - #include - -+#ifdef __UCLIBC__ -+#include -+#include -+#endif -+ - #define _GLIBCXX_NUM_CATEGORIES 0 - - namespace std _GLIBCXX_VISIBILITY(default) - { - _GLIBCXX_BEGIN_NAMESPACE_VERSION - -+#ifdef __UCLIBC__ -+ typedef __ctype_touplow_t* __c_locale; -+#else - typedef int* __c_locale; -+#endif - - // Convert numeric value of type double and long double to string and - // return length of string. If vsnprintf is available use it, otherwise -diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h -index 591c793..55eb0e9 100644 ---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h -+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h -@@ -33,6 +33,11 @@ - - // Information as gleaned from /usr/include/ctype.h - -+#ifdef __UCLIBC__ -+#include -+#include -+#endif -+ - namespace std _GLIBCXX_VISIBILITY(default) - { - _GLIBCXX_BEGIN_NAMESPACE_VERSION -@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - struct ctype_base - { - // Non-standard typedefs. -+#ifdef __UCLIBC__ -+ typedef const __ctype_touplow_t* __to_type; -+#else - typedef const int* __to_type; -+#endif - - // NB: Offsets into ctype::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch deleted file mode 100644 index ae2627c2e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch +++ /dev/null @@ -1,2862 +0,0 @@ -From 68bd083357e78678a9baac760beb2a31f00954a5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:41:39 +0400 -Subject: [PATCH 04/46] uclibc-locale - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/acinclude.m4 | 37 ++ - .../config/locale/uclibc/c++locale_internal.h | 63 ++ - libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++ - libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++ - .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++ - .../config/locale/uclibc/collate_members.cc | 80 +++ - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++ - .../config/locale/uclibc/messages_members.cc | 100 +++ - .../config/locale/uclibc/messages_members.h | 118 ++++ - .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++ - .../config/locale/uclibc/numeric_members.cc | 160 +++++ - libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++ - libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++ - libstdc++-v3/configure | 75 +++ - libstdc++-v3/include/c_compatibility/wchar.h | 2 + - libstdc++-v3/include/c_std/cwchar | 2 + - 16 files changed, 2688 insertions(+) - create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h - create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h - create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h - create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc - create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h - -diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 -index b0f88cb..a0ee36b 100644 ---- a/libstdc++-v3/acinclude.m4 -+++ b/libstdc++-v3/acinclude.m4 -@@ -2358,6 +2358,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - enable_clocale_flag=gnu - ;; -@@ -2542,6 +2545,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ AC_MSG_RESULT(uclibc) -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ AC_SUBST(glibcxx_MOFILES) -+ AC_SUBST(glibcxx_POFILES) -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -new file mode 100644 -index 0000000..2ae3e4a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -0,0 +1,63 @@ -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- -+ -+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// Written by Jakub Jelinek -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning clean this up -+#endif -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; -+extern "C" __typeof(strcoll_l) __strcoll_l; -+extern "C" __typeof(strftime_l) __strftime_l; -+extern "C" __typeof(strtod_l) __strtod_l; -+extern "C" __typeof(strtof_l) __strtof_l; -+extern "C" __typeof(strtold_l) __strtold_l; -+extern "C" __typeof(strxfrm_l) __strxfrm_l; -+extern "C" __typeof(newlocale) __newlocale; -+extern "C" __typeof(freelocale) __freelocale; -+extern "C" __typeof(duplocale) __duplocale; -+extern "C" __typeof(uselocale) __uselocale; -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+extern "C" __typeof(iswctype_l) __iswctype_l; -+extern "C" __typeof(towlower_l) __towlower_l; -+extern "C" __typeof(towupper_l) __towupper_l; -+extern "C" __typeof(wcscoll_l) __wcscoll_l; -+extern "C" __typeof(wcsftime_l) __wcsftime_l; -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; -+extern "C" __typeof(wctype_l) __wctype_l; -+#endif -+ -+#endif // GLIBC 2.3 and later -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -new file mode 100644 -index 0000000..5081dc1 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -0,0 +1,160 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#include // For errno -+#include -+#include -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) -+#define __strtof_l(S, E, L) strtof((S), (E)) -+#define __strtod_l(S, E, L) strtod((S), (E)) -+#define __strtold_l(S, E, L) strtold((S), (E)) -+#warning should dummy __newlocale check for C|POSIX ? -+#define __newlocale(a, b, c) NULL -+#define __freelocale(a) ((void)0) -+#define __duplocale(a) __c_locale() -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ void -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, -+ __c_locale __old) -+ { -+ __cloc = __newlocale(1 << LC_ALL, __s, __old); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ if (!__cloc) -+ { -+ // This named locale is not supported by the underlying OS. -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " -+ "name not valid")); -+ } -+#endif -+ } -+ -+ void -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) -+ { -+ if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); -+ } -+ -+ __c_locale -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc) -+ { return __duplocale(__cloc); } -+} // namespace std -+ -+namespace __gnu_cxx -+{ -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = -+ { -+ "LC_CTYPE", -+ "LC_NUMERIC", -+ "LC_TIME", -+ "LC_COLLATE", -+ "LC_MONETARY", -+ "LC_MESSAGES", -+#if _GLIBCXX_NUM_CATEGORIES != 0 -+ "LC_PAPER", -+ "LC_NAME", -+ "LC_ADDRESS", -+ "LC_TELEPHONE", -+ "LC_MEASUREMENT", -+ "LC_IDENTIFICATION" -+#endif -+ }; -+} -+ -+namespace std -+{ -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names; -+} // namespace std -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -new file mode 100644 -index 0000000..da07c1f ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -0,0 +1,117 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifndef _C_LOCALE_H -+#define _C_LOCALE_H 1 -+ -+#pragma GCC system_header -+ -+#include // get std::strlen -+#include // get std::snprintf or std::sprintf -+#include -+#include // For codecvt -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this -+#endif -+#ifdef __UCLIBC_HAS_LOCALE__ -+#include // For codecvt using iconv, iconv_t -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#include // For messages -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning what is _GLIBCXX_C_LOCALE_GNU for -+#endif -+#define _GLIBCXX_C_LOCALE_GNU 1 -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix categories -+#endif -+// #define _GLIBCXX_NUM_CATEGORIES 6 -+#define _GLIBCXX_NUM_CATEGORIES 0 -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+namespace __gnu_cxx -+{ -+ extern "C" __typeof(uselocale) __uselocale; -+} -+#endif -+ -+namespace std -+{ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ typedef __locale_t __c_locale; -+#else -+ typedef int* __c_locale; -+#endif -+ -+ // Convert numeric value of type _Tv to string and return length of -+ // string. If snprintf is available use it, otherwise fall back to -+ // the unsafe sprintf which, in general, can be dangerous and should -+ // be avoided. -+ template -+ int -+ __convert_from_v(char* __out, -+ const int __size __attribute__ ((__unused__)), -+ const char* __fmt, -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ _Tv __v, const __c_locale& __cloc, int __prec) -+ { -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc); -+#else -+ _Tv __v, const __c_locale&, int __prec) -+ { -+# ifdef __UCLIBC_HAS_LOCALE__ -+ char* __old = std::setlocale(LC_ALL, NULL); -+ char* __sav = new char[std::strlen(__old) + 1]; -+ std::strcpy(__sav, __old); -+ std::setlocale(LC_ALL, "C"); -+# endif -+#endif -+ -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ __gnu_cxx::__uselocale(__old); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ std::setlocale(LC_ALL, __sav); -+ delete [] __sav; -+#endif -+ return __ret; -+ } -+} -+ -+#endif -diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -new file mode 100644 -index 0000000..64aa962 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -@@ -0,0 +1,308 @@ -+// std::codecvt implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include // For MB_CUR_MAX -+#include // For MB_LEN_MAX -+#include -+ -+namespace std -+{ -+ // Specializations. -+#ifdef _GLIBCXX_USE_WCHAR_T -+ codecvt_base::result -+ codecvt:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters: -+ // in case we fall back to wcrtomb and then continue, in a loop. -+ // NB: wcsnrtombs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', -+ __from_end - __from_next); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // wcrtomb. -+ for (; __from < __from_next; ++__from) -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ extern_type __buf[MB_LEN_MAX]; -+ __tmp_state = __state; -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); -+ if (__conv > static_cast(__to_end - __to_next)) -+ __ret = partial; -+ else -+ { -+ memcpy(__to_next, __buf, __conv); -+ __state = __tmp_state; -+ __to_next += __conv; -+ ++__from_next; -+ } -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ codecvt_base::result -+ codecvt:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we store a L'\0' and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from_next, '\0', -+ __from_end -+ - __from_next)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (;; ++__to_next, __from += __conv) -+ { -+ __conv = mbrtowc(__to_next, __from, __from_end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __from_next = __from; -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ // It is unclear what to return in this case (see DR 382). -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ if (__to_next < __to_end) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from_next; -+ *__to_next++ = L'\0'; -+ } -+ else -+ __ret = partial; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_encoding() const throw() -+ { -+ // XXX This implementation assumes that the encoding is -+ // stateless and is either single-byte or variable-width. -+ int __ret = 0; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ if (MB_CUR_MAX == 1) -+ __ret = 1; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_max_length() const throw() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ // XXX Probably wrong for stateful encodings. -+ int __ret = MB_CUR_MAX; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_length(state_type& __state, const extern_type* __from, -+ const extern_type* __end, size_t __max) const -+ { -+ int __ret = 0; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we advance past it and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider -+ // its fourth parameter (it wouldn't with NULL as first parameter). -+ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) -+ * __max)); -+ while (__from < __end && __max) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from, '\0', -+ __end -+ - __from)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __end; -+ -+ const extern_type* __tmp_from = __from; -+ size_t __conv = mbsnrtowcs(__to, &__from, -+ __from_chunk_end - __from, -+ __max, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (__from = __tmp_from;; __from += __conv) -+ { -+ __conv = mbrtowc(NULL, __from, __end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __state = __tmp_state; -+ __ret += __from - __tmp_from; -+ break; -+ } -+ if (!__from) -+ __from = __from_chunk_end; -+ -+ __ret += __from - __tmp_from; -+ __max -= __conv; -+ -+ if (__from < __end && __max) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from; -+ ++__ret; -+ --__max; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc -new file mode 100644 -index 0000000..c2664a7 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -0,0 +1,80 @@ -+// std::collate implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+#endif -+ -+namespace std -+{ -+ // These are basically extensions to char_traits, and perhaps should -+ // be put there instead of here. -+ template<> -+ int -+ collate::_M_compare(const char* __one, const char* __two) const -+ { -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(char* __to, const char* __from, -+ size_t __n) const -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ int -+ collate::_M_compare(const wchar_t* __one, -+ const wchar_t* __two) const -+ { -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(wchar_t* __to, const wchar_t* __from, -+ size_t __n) const -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -new file mode 100644 -index 0000000..7294e3a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -0,0 +1,300 @@ -+// std::ctype implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __wctype_l(S, L) wctype((S)) -+#define __towupper_l(C, L) towupper((C)) -+#define __towlower_l(C, L) towlower((C)) -+#define __iswctype_l(C, M, L) iswctype((C), (M)) -+#endif -+ -+namespace std -+{ -+ // NB: The other ctype specializations are in src/locale.cc and -+ // various /config/os/* files. -+ template<> -+ ctype_byname::ctype_byname(const char* __s, size_t __refs) -+ : ctype(0, false, __refs) -+ { -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype); -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b; -+#endif -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ ctype::__wmask_type -+ ctype::_M_convert_to_wmask(const mask __m) const -+ { -+ __wmask_type __ret; -+ switch (__m) -+ { -+ case space: -+ __ret = __wctype_l("space", _M_c_locale_ctype); -+ break; -+ case print: -+ __ret = __wctype_l("print", _M_c_locale_ctype); -+ break; -+ case cntrl: -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype); -+ break; -+ case upper: -+ __ret = __wctype_l("upper", _M_c_locale_ctype); -+ break; -+ case lower: -+ __ret = __wctype_l("lower", _M_c_locale_ctype); -+ break; -+ case alpha: -+ __ret = __wctype_l("alpha", _M_c_locale_ctype); -+ break; -+ case digit: -+ __ret = __wctype_l("digit", _M_c_locale_ctype); -+ break; -+ case punct: -+ __ret = __wctype_l("punct", _M_c_locale_ctype); -+ break; -+ case xdigit: -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype); -+ break; -+ case alnum: -+ __ret = __wctype_l("alnum", _M_c_locale_ctype); -+ break; -+ case graph: -+ __ret = __wctype_l("graph", _M_c_locale_ctype); -+ break; -+ default: -+ __ret = __wmask_type(); -+ } -+ return __ret; -+ } -+ -+ wchar_t -+ ctype::do_toupper(wchar_t __c) const -+ { return __towupper_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ wchar_t -+ ctype::do_tolower(wchar_t __c) const -+ { return __towlower_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ bool -+ ctype:: -+ do_is(mask __m, wchar_t __c) const -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ bool __ret = false; -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur] -+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ return __ret; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const -+ { -+ for (; __lo < __hi; ++__vec, ++__lo) -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ mask __m = 0; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ __m |= _M_bit[__bitcur]; -+ *__vec = __m; -+ } -+ return __hi; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi && !this->do_is(__m, *__lo)) -+ ++__lo; -+ return __lo; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const -+ { -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0) -+ ++__lo; -+ return __lo; -+ } -+ -+ wchar_t -+ ctype:: -+ do_widen(char __c) const -+ { return _M_widen[static_cast(__c)]; } -+ -+ const char* -+ ctype:: -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const -+ { -+ while (__lo < __hi) -+ { -+ *__dest = _M_widen[static_cast(*__lo)]; -+ ++__lo; -+ ++__dest; -+ } -+ return __hi; -+ } -+ -+ char -+ ctype:: -+ do_narrow(wchar_t __wc, char __dfault) const -+ { -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) -+ return _M_narrow[__wc]; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ const int __c = wctob(__wc); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, -+ char* __dest) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ if (_M_narrow_ok) -+ while (__lo < __hi) -+ { -+ if (*__lo >= 0 && *__lo < 128) -+ *__dest = _M_narrow[*__lo]; -+ else -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ ++__lo; -+ ++__dest; -+ } -+ else -+ while (__lo < __hi) -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ ++__lo; -+ ++__dest; -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __hi; -+ } -+ -+ void -+ ctype::_M_initialize_ctype() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ wint_t __i; -+ for (__i = 0; __i < 128; ++__i) -+ { -+ const int __c = wctob(__i); -+ if (__c == EOF) -+ break; -+ else -+ _M_narrow[__i] = static_cast(__c); -+ } -+ if (__i == 128) -+ _M_narrow_ok = true; -+ else -+ _M_narrow_ok = false; -+ for (size_t __j = 0; -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) -+ _M_widen[__j] = btowc(__j); -+ -+ for (size_t __k = 0; __k <= 11; ++__k) -+ { -+ _M_bit[__k] = static_cast(_ISbit(__k)); -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ } -+#endif // _GLIBCXX_USE_WCHAR_T -+} -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc -new file mode 100644 -index 0000000..13594d9 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -0,0 +1,100 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix gettext stuff -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__dcgettext(const char *domainname, -+ const char *msgid, int category); -+#undef gettext -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#else -+#undef gettext -+#define gettext(msgid) (msgid) -+#endif -+ -+namespace std -+{ -+ // Specializations. -+ template<> -+ string -+ messages::do_get(catalog, int, int, const string& __dfault) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ const char* __msg = const_cast(gettext(__dfault.c_str())); -+ __uselocale(__old); -+ return string(__msg); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ const char* __msg = gettext(__dfault.c_str()); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return string(__msg); -+#else -+ const char* __msg = gettext(__dfault.c_str()); -+ return string(__msg); -+#endif -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ wstring -+ messages::do_get(catalog, int, int, const wstring& __dfault) const -+ { -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ __uselocale(__old); -+ return _M_convert_from_char(__msg); -+# elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return _M_convert_from_char(__msg); -+# else -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ return _M_convert_from_char(__msg); -+# endif -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -new file mode 100644 -index 0000000..1424078 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -0,0 +1,118 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix prototypes for *textdomain funcs -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__textdomain(const char *domainname); -+extern "C" char *__bindtextdomain(const char *domainname, -+ const char *dirname); -+#else -+#undef __textdomain -+#undef __bindtextdomain -+#define __textdomain(D) ((void)0) -+#define __bindtextdomain(D,P) ((void)0) -+#endif -+ -+ // Non-virtual member functions. -+ template -+ messages<_CharT>::messages(size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -+ _M_name_messages(_S_get_c_name()) -+ { } -+ -+ template -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -+ _M_name_messages(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_messages = __tmp; -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::open(const basic_string& __s, const locale& __loc, -+ const char* __dir) const -+ { -+ __bindtextdomain(__s.c_str(), __dir); -+ return this->do_open(__s, __loc); -+ } -+ -+ // Virtual member functions. -+ template -+ messages<_CharT>::~messages() -+ { -+ if (_M_name_messages != _S_get_c_name()) -+ delete [] _M_name_messages; -+ _S_destroy_c_locale(_M_c_locale_messages); -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::do_open(const basic_string& __s, -+ const locale&) const -+ { -+ // No error checking is done, assume the catalog exists and can -+ // be used. -+ __textdomain(__s.c_str()); -+ return 0; -+ } -+ -+ template -+ void -+ messages<_CharT>::do_close(catalog) const -+ { } -+ -+ // messages_byname -+ template -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) -+ : messages<_CharT>(__refs) -+ { -+ if (this->_M_name_messages != locale::facet::_S_get_c_name()) -+ delete [] this->_M_name_messages; -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ this->_M_name_messages = __tmp; -+ -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_messages); -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s); -+ } -+ } -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -new file mode 100644 -index 0000000..aa52731 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -0,0 +1,692 @@ -+// std::moneypunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning optimize this for uclibc -+#warning tailor for stub locale support -+#endif -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ // Construct and return valid pattern consisting of some combination of: -+ // space none symbol sign value -+ money_base::pattern -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) -+ { -+ pattern __ret; -+ -+ // This insanely complicated routine attempts to construct a valid -+ // pattern for use with monyepunct. A couple of invariants: -+ -+ // if (__precedes) symbol -> value -+ // else value -> symbol -+ -+ // if (__space) space -+ // else none -+ -+ // none == never first -+ // space never first or last -+ -+ // Any elegant implementations of this are welcome. -+ switch (__posn) -+ { -+ case 0: -+ case 1: -+ // 1 The sign precedes the value and symbol. -+ __ret.field[0] = sign; -+ if (__space) -+ { -+ // Pattern starts with sign. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[3] = symbol; -+ } -+ __ret.field[2] = space; -+ } -+ else -+ { -+ // Pattern starts with sign and ends with none. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[3] = none; -+ } -+ break; -+ case 2: -+ // 2 The sign follows the value and symbol. -+ if (__space) -+ { -+ // Pattern either ends with sign. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[1] = space; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ // Pattern ends with sign then none. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[1] = symbol; -+ } -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ break; -+ case 3: -+ // 3 The sign immediately precedes the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = sign; -+ __ret.field[1] = symbol; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = sign; -+ __ret.field[3] = symbol; -+ } -+ else -+ { -+ __ret.field[1] = sign; -+ __ret.field[2] = symbol; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ case 4: -+ // 4 The sign immediately follows the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = sign; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = symbol; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ default: -+ ; -+ } -+ return __ret; -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == true -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == false -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len; -+ __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -new file mode 100644 -index 0000000..883ec1a ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -0,0 +1,160 @@ -+// std::numpunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, -+ __cloc)); -+ -+ // Check for NULL, which implies no grouping. -+ if (_M_data->_M_thousands_sep == '\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = "true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = "false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = -+ static_cast(__num_base::_S_atoms_out[__i]); -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = -+ static_cast(__num_base::_S_atoms_in[__j]); -+ } -+ else -+ { -+ // Named locale. -+ // NB: In the GNU model wchar_t is always 32 bit wide. -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+ -+ if (_M_data->_M_thousands_sep == L'\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = L"true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = L"false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ #endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -new file mode 100644 -index 0000000..e0707d7 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -0,0 +1,406 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __timepunct:: -+ _M_put(char* __s, size_t __maxlen, const char* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = strftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = '\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = "%m/%d/%y"; -+ _M_data->_M_date_era_format = "%m/%d/%y"; -+ _M_data->_M_time_format = "%H:%M:%S"; -+ _M_data->_M_time_era_format = "%H:%M:%S"; -+ _M_data->_M_date_time_format = ""; -+ _M_data->_M_date_time_era_format = ""; -+ _M_data->_M_am = "AM"; -+ _M_data->_M_pm = "PM"; -+ _M_data->_M_am_pm_format = ""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = "Sunday"; -+ _M_data->_M_day2 = "Monday"; -+ _M_data->_M_day3 = "Tuesday"; -+ _M_data->_M_day4 = "Wednesday"; -+ _M_data->_M_day5 = "Thursday"; -+ _M_data->_M_day6 = "Friday"; -+ _M_data->_M_day7 = "Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = "Sun"; -+ _M_data->_M_aday2 = "Mon"; -+ _M_data->_M_aday3 = "Tue"; -+ _M_data->_M_aday4 = "Wed"; -+ _M_data->_M_aday5 = "Thu"; -+ _M_data->_M_aday6 = "Fri"; -+ _M_data->_M_aday7 = "Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = "January"; -+ _M_data->_M_month02 = "February"; -+ _M_data->_M_month03 = "March"; -+ _M_data->_M_month04 = "April"; -+ _M_data->_M_month05 = "May"; -+ _M_data->_M_month06 = "June"; -+ _M_data->_M_month07 = "July"; -+ _M_data->_M_month08 = "August"; -+ _M_data->_M_month09 = "September"; -+ _M_data->_M_month10 = "October"; -+ _M_data->_M_month11 = "November"; -+ _M_data->_M_month12 = "December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = "Jan"; -+ _M_data->_M_amonth02 = "Feb"; -+ _M_data->_M_amonth03 = "Mar"; -+ _M_data->_M_amonth04 = "Apr"; -+ _M_data->_M_amonth05 = "May"; -+ _M_data->_M_amonth06 = "Jun"; -+ _M_data->_M_amonth07 = "Jul"; -+ _M_data->_M_amonth08 = "Aug"; -+ _M_data->_M_amonth09 = "Sep"; -+ _M_data->_M_amonth10 = "Oct"; -+ _M_data->_M_amonth11 = "Nov"; -+ _M_data->_M_amonth12 = "Dec"; -+ } -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, -+ __cloc); -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ __timepunct:: -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = L'\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+#warning wide time stuff -+// if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = L"%m/%d/%y"; -+ _M_data->_M_date_era_format = L"%m/%d/%y"; -+ _M_data->_M_time_format = L"%H:%M:%S"; -+ _M_data->_M_time_era_format = L"%H:%M:%S"; -+ _M_data->_M_date_time_format = L""; -+ _M_data->_M_date_time_era_format = L""; -+ _M_data->_M_am = L"AM"; -+ _M_data->_M_pm = L"PM"; -+ _M_data->_M_am_pm_format = L""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = L"Sunday"; -+ _M_data->_M_day2 = L"Monday"; -+ _M_data->_M_day3 = L"Tuesday"; -+ _M_data->_M_day4 = L"Wednesday"; -+ _M_data->_M_day5 = L"Thursday"; -+ _M_data->_M_day6 = L"Friday"; -+ _M_data->_M_day7 = L"Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = L"Sun"; -+ _M_data->_M_aday2 = L"Mon"; -+ _M_data->_M_aday3 = L"Tue"; -+ _M_data->_M_aday4 = L"Wed"; -+ _M_data->_M_aday5 = L"Thu"; -+ _M_data->_M_aday6 = L"Fri"; -+ _M_data->_M_aday7 = L"Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = L"January"; -+ _M_data->_M_month02 = L"February"; -+ _M_data->_M_month03 = L"March"; -+ _M_data->_M_month04 = L"April"; -+ _M_data->_M_month05 = L"May"; -+ _M_data->_M_month06 = L"June"; -+ _M_data->_M_month07 = L"July"; -+ _M_data->_M_month08 = L"August"; -+ _M_data->_M_month09 = L"September"; -+ _M_data->_M_month10 = L"October"; -+ _M_data->_M_month11 = L"November"; -+ _M_data->_M_month12 = L"December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = L"Jan"; -+ _M_data->_M_amonth02 = L"Feb"; -+ _M_data->_M_amonth03 = L"Mar"; -+ _M_data->_M_amonth04 = L"Apr"; -+ _M_data->_M_amonth05 = L"May"; -+ _M_data->_M_amonth06 = L"Jun"; -+ _M_data->_M_amonth07 = L"Jul"; -+ _M_data->_M_amonth08 = L"Aug"; -+ _M_data->_M_amonth09 = L"Sep"; -+ _M_data->_M_amonth10 = L"Oct"; -+ _M_data->_M_amonth11 = L"Nov"; -+ _M_data->_M_amonth12 = L"Dec"; -+ } -+#if 0 -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ union { char *__s; wchar_t *__w; } __u; -+ -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); -+ _M_data->_M_date_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); -+ _M_data->_M_date_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); -+ _M_data->_M_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); -+ _M_data->_M_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); -+ _M_data->_M_am = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); -+ _M_data->_M_pm = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); -+ _M_data->_M_am_pm_format = __u.__w; -+ -+ // Day names, starting with "C"'s Sunday. -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); -+ _M_data->_M_day1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); -+ _M_data->_M_day2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); -+ _M_data->_M_day3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); -+ _M_data->_M_day4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); -+ _M_data->_M_day5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); -+ _M_data->_M_day6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); -+ _M_data->_M_day7 = __u.__w; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); -+ _M_data->_M_aday1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); -+ _M_data->_M_aday2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); -+ _M_data->_M_aday3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); -+ _M_data->_M_aday4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); -+ _M_data->_M_aday5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); -+ _M_data->_M_aday6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); -+ _M_data->_M_aday7 = __u.__w; -+ -+ // Month names, starting with "C"'s January. -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); -+ _M_data->_M_month01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); -+ _M_data->_M_month02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); -+ _M_data->_M_month03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); -+ _M_data->_M_month04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); -+ _M_data->_M_month05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); -+ _M_data->_M_month06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); -+ _M_data->_M_month07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); -+ _M_data->_M_month08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); -+ _M_data->_M_month09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); -+ _M_data->_M_month10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); -+ _M_data->_M_month11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); -+ _M_data->_M_month12 = __u.__w; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); -+ _M_data->_M_amonth01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); -+ _M_data->_M_amonth02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); -+ _M_data->_M_amonth03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); -+ _M_data->_M_amonth04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); -+ _M_data->_M_amonth05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); -+ _M_data->_M_amonth06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); -+ _M_data->_M_amonth07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); -+ _M_data->_M_amonth08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); -+ _M_data->_M_amonth09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); -+ _M_data->_M_amonth10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); -+ _M_data->_M_amonth11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); -+ _M_data->_M_amonth12 = __u.__w; -+ } -+#endif // 0 -+ } -+#endif -+} -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h -new file mode 100644 -index 0000000..ba8e858 ---- /dev/null -+++ b/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -0,0 +1,68 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions -+// -+ -+// Written by Benjamin Kosnik -+ -+ template -+ __timepunct<_CharT>::__timepunct(size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_timepunct = __tmp; -+ _M_initialize_timepunct(__cloc); -+ } -+ -+ template -+ __timepunct<_CharT>::~__timepunct() -+ { -+ if (_M_name_timepunct != _S_get_c_name()) -+ delete [] _M_name_timepunct; -+ delete _M_data; -+ _S_destroy_c_locale(_M_c_locale_timepunct); -+ } -diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index 41797a9..8a5481c 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -15830,6 +15830,9 @@ fi - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - enable_clocale_flag=gnu - ;; -@@ -16108,6 +16111,78 @@ $as_echo "newlib" >&6; } - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5 -+$as_echo "uclibc" >&6; } -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ # Extract the first word of "msgfmt", so it can be a program name with args. -+set dummy msgfmt; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$check_msgfmt"; then -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_check_msgfmt="yes" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" -+fi -+fi -+check_msgfmt=$ac_cv_prog_check_msgfmt -+if test -n "$check_msgfmt"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5 -+$as_echo "$check_msgfmt" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ -+ -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the -diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h -index 55a0b52..7d8bb15 100644 ---- a/libstdc++-v3/include/c_compatibility/wchar.h -+++ b/libstdc++-v3/include/c_compatibility/wchar.h -@@ -101,7 +101,9 @@ using std::wmemcmp; - using std::wmemcpy; - using std::wmemmove; - using std::wmemset; -+#if _GLIBCXX_HAVE_WCSFTIME - using std::wcsftime; -+#endif - - #if _GLIBCXX_USE_C99_WCHAR - using std::wcstold; -diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar -index dc4cef02..256d126 100644 ---- a/libstdc++-v3/include/c_std/cwchar -+++ b/libstdc++-v3/include/c_std/cwchar -@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#if _GLIBCXX_HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch deleted file mode 100644 index 3275016e7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch +++ /dev/null @@ -1,257 +0,0 @@ -From c01c14e8e9be382ecd4121ee70f5003b4cb0f904 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:42:36 +0400 -Subject: [PATCH 05/46] uclibc-locale-no__x - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++ - libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------- - libstdc++-v3/config/locale/uclibc/c_locale.h | 1 + - .../config/locale/uclibc/collate_members.cc | 7 ---- - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ---- - .../config/locale/uclibc/messages_members.cc | 7 +--- - .../config/locale/uclibc/messages_members.h | 18 ++++----- - .../config/locale/uclibc/monetary_members.cc | 4 -- - .../config/locale/uclibc/numeric_members.cc | 3 -- - libstdc++-v3/config/locale/uclibc/time_members.cc | 3 -- - 10 files changed, 55 insertions(+), 54 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -index 2ae3e4a..e74fddf 100644 ---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; - extern "C" __typeof(wctype_l) __wctype_l; - #endif - -+# define __nl_langinfo_l nl_langinfo_l -+# define __strcoll_l strcoll_l -+# define __strftime_l strftime_l -+# define __strtod_l strtod_l -+# define __strtof_l strtof_l -+# define __strtold_l strtold_l -+# define __strxfrm_l strxfrm_l -+# define __newlocale newlocale -+# define __freelocale freelocale -+# define __duplocale duplocale -+# define __uselocale uselocale -+ -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l iswctype_l -+# define __towlower_l towlower_l -+# define __towupper_l towupper_l -+# define __wcscoll_l wcscoll_l -+# define __wcsftime_l wcsftime_l -+# define __wcsxfrm_l wcsxfrm_l -+# define __wctype_l wctype_l -+# endif -+ -+#else -+# define __nl_langinfo_l(N, L) nl_langinfo((N)) -+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+# define __strtod_l(S, E, L) strtod((S), (E)) -+# define __strtof_l(S, E, L) strtof((S), (E)) -+# define __strtold_l(S, E, L) strtold((S), (E)) -+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+# warning should dummy __newlocale check for C|POSIX ? -+# define __newlocale(a, b, c) NULL -+# define __freelocale(a) ((void)0) -+# define __duplocale(a) __c_locale() -+//# define __uselocale ? -+// -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l(C, M, L) iswctype((C), (M)) -+# define __towlower_l(C, L) towlower((C)) -+# define __towupper_l(C, L) towupper((C)) -+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) -+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+# define __wctype_l(S, L) wctype((S)) -+# endif -+ - #endif // GLIBC 2.3 and later -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -index 5081dc1..21430d0 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -39,20 +39,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) --#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) --#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) --#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) --#define __strtof_l(S, E, L) strtof((S), (E)) --#define __strtod_l(S, E, L) strtod((S), (E)) --#define __strtold_l(S, E, L) strtold((S), (E)) --#warning should dummy __newlocale check for C|POSIX ? --#define __newlocale(a, b, c) NULL --#define __freelocale(a) ((void)0) --#define __duplocale(a) __c_locale() --#endif -- - namespace std - { - template<> -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -index da07c1f..4bca5f1 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -68,6 +68,7 @@ namespace __gnu_cxx - { - extern "C" __typeof(uselocale) __uselocale; - } -+#define __uselocale uselocale - #endif - - namespace std -diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc -index c2664a7..ec5c329 100644 ---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -36,13 +36,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) --#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) --#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) --#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) --#endif -- - namespace std - { - // These are basically extensions to char_traits, and perhaps should -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -index 7294e3a..7b12861 100644 ---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -38,13 +38,6 @@ - #undef _LIBC - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __wctype_l(S, L) wctype((S)) --#define __towupper_l(C, L) towupper((C)) --#define __towlower_l(C, L) towlower((C)) --#define __iswctype_l(C, M, L) iswctype((C), (M)) --#endif -- - namespace std - { - // NB: The other ctype specializations are in src/locale.cc and -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc -index 13594d9..d7693b4 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -39,13 +39,10 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix gettext stuff - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__dcgettext(const char *domainname, -- const char *msgid, int category); - #undef gettext --#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) - #else --#undef gettext - #define gettext(msgid) (msgid) - #endif - -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -index 1424078..d89da33 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -36,15 +36,11 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix prototypes for *textdomain funcs - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__textdomain(const char *domainname); --extern "C" char *__bindtextdomain(const char *domainname, -- const char *dirname); --#else --#undef __textdomain --#undef __bindtextdomain --#define __textdomain(D) ((void)0) --#define __bindtextdomain(D,P) ((void)0) -+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#undef textdomain -+#undef bindtextdomain -+#define textdomain(D) ((void)0) -+#define bindtextdomain(D,P) ((void)0) - #endif - - // Non-virtual member functions. -@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname, - messages<_CharT>::open(const basic_string& __s, const locale& __loc, - const char* __dir) const - { -- __bindtextdomain(__s.c_str(), __dir); -+ bindtextdomain(__s.c_str(), __dir); - return this->do_open(__s, __loc); - } - -@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname, - { - // No error checking is done, assume the catalog exists and can - // be used. -- __textdomain(__s.c_str()); -+ textdomain(__s.c_str()); - return 0; - } - -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index aa52731..2e6f80a 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -43,10 +43,6 @@ - #warning tailor for stub locale support - #endif - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif -- - namespace std - { - // Construct and return valid pattern consisting of some combination of: -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index 883ec1a..2c70642 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -41,9 +41,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -index e0707d7..d848ed5 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -40,9 +40,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch deleted file mode 100644 index e45a482d5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e7a4760fb40008cae33e6fc7dc4cfef6c2fd5f93 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:45:57 +0400 -Subject: [PATCH 06/46] uclibc-locale-wchar_fix - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++-- - libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++ - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index 2e6f80a..31ebb9f 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -401,7 +401,7 @@ namespace std - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif -@@ -556,7 +556,7 @@ namespace std - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index 2c70642..d5c8961 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -127,12 +127,25 @@ namespace std - { - // Named locale. - // NB: In the GNU model wchar_t is always 32 bit wide. -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be numeric -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# elif defined __UCLIBC_HAS_LOCALE__ -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else - union { char *__s; wchar_t __w; } __u; - __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); - _M_data->_M_decimal_point = __u.__w; - - __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); - _M_data->_M_thousands_sep = __u.__w; -+#endif - - if (_M_data->_M_thousands_sep == L'\0') - _M_data->_M_grouping = ""; --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch deleted file mode 100644 index b73e5914e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch +++ /dev/null @@ -1,542 +0,0 @@ -From 8d53a38a3038104e6830ecea5e4beadce54457c1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:46:58 +0400 -Subject: [PATCH 07/46] uclibc-locale-update - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - .../config/locale/uclibc/c++locale_internal.h | 3 + - libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------ - libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------ - libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++---- - .../config/locale/uclibc/messages_members.h | 12 ++-- - .../config/locale/uclibc/monetary_members.cc | 34 ++++++---- - .../config/locale/uclibc/numeric_members.cc | 5 ++ - libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++-- - libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++-- - 9 files changed, 158 insertions(+), 98 deletions(-) - -diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -index e74fddf..971a6b4 100644 ---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -31,6 +31,9 @@ - - #include - #include -+#include -+#include -+#include - - #ifdef __UCLIBC_MJN3_ONLY__ - #warning clean this up -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc -index 21430d0..1b9d8e1 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -39,23 +39,20 @@ - #include - #include - --namespace std --{ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - template<> - void - __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- float __f = __strtof_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __f; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -63,16 +60,13 @@ namespace std - __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- double __d = __strtod_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __d; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -80,16 +74,13 @@ namespace std - __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- long double __ld = __strtold_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __ld; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; - } - - void -@@ -110,17 +101,18 @@ namespace std - void - locale::facet::_S_destroy_c_locale(__c_locale& __cloc) - { -- if (_S_get_c_locale() != __cloc) -+ if (__cloc && _S_get_c_locale() != __cloc) - __freelocale(__cloc); - } - - __c_locale - locale::facet::_S_clone_c_locale(__c_locale& __cloc) - { return __duplocale(__cloc); } --} // namespace std - --namespace __gnu_cxx --{ -+_GLIBCXX_END_NAMESPACE -+ -+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) -+ - const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = - { - "LC_CTYPE", -@@ -138,9 +130,11 @@ namespace __gnu_cxx - "LC_IDENTIFICATION" - #endif - }; --} - --namespace std --{ -+_GLIBCXX_END_NAMESPACE -+ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - const char* const* const locale::_S_categories = __gnu_cxx::category_names; --} // namespace std -+ -+_GLIBCXX_END_NAMESPACE -diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h -index 4bca5f1..64a6d46 100644 ---- a/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -39,21 +39,23 @@ - #pragma GCC system_header - - #include // get std::strlen --#include // get std::snprintf or std::sprintf -+#include // get std::vsnprintf or std::vsprintf - #include - #include // For codecvt - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix this - #endif --#ifdef __UCLIBC_HAS_LOCALE__ -+#ifdef _GLIBCXX_USE_ICONV - #include // For codecvt using iconv, iconv_t - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --#include // For messages -+#ifdef HAVE_LIBINTL_H -+#include // For messages - #endif -+#include - - #ifdef __UCLIBC_MJN3_ONLY__ - #warning what is _GLIBCXX_C_LOCALE_GNU for -+// psm: used in os/gnu-linux/ctype_noninline.h - #endif - #define _GLIBCXX_C_LOCALE_GNU 1 - -@@ -78,23 +80,25 @@ namespace std - #else - typedef int* __c_locale; - #endif -- -- // Convert numeric value of type _Tv to string and return length of -- // string. If snprintf is available use it, otherwise fall back to -- // the unsafe sprintf which, in general, can be dangerous and should -+ // Convert numeric value of type double to string and return length of -+ // string. If vsnprintf is available use it, otherwise fall back to -+ // the unsafe vsprintf which, in general, can be dangerous and should - // be avoided. -- template -- int -- __convert_from_v(char* __out, -- const int __size __attribute__ ((__unused__)), -- const char* __fmt, --#ifdef __UCLIBC_HAS_XCLOCALE__ -- _Tv __v, const __c_locale& __cloc, int __prec) -+ inline int -+ __convert_from_v(const __c_locale& -+#ifndef __UCLIBC_HAS_XCLOCALE__ -+ __cloc __attribute__ ((__unused__)) -+#endif -+ , -+ char* __out, -+ const int __size, -+ const char* __fmt, ...) - { -+ va_list __args; -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ - __c_locale __old = __gnu_cxx::__uselocale(__cloc); - #else -- _Tv __v, const __c_locale&, int __prec) -- { - # ifdef __UCLIBC_HAS_LOCALE__ - char* __old = std::setlocale(LC_ALL, NULL); - char* __sav = new char[std::strlen(__old) + 1]; -@@ -103,7 +107,9 @@ namespace std - # endif - #endif - -- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ va_start(__args, __fmt); -+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args); -+ va_end(__args); - - #ifdef __UCLIBC_HAS_XCLOCALE__ - __gnu_cxx::__uselocale(__old); -diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -index 7b12861..13e011d 100644 ---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -33,16 +33,20 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - --namespace std --{ -+_GLIBCXX_BEGIN_NAMESPACE(std) -+ - // NB: The other ctype specializations are in src/locale.cc and - // various /config/os/* files. -- template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(0, false, __refs) - { -@@ -57,6 +61,8 @@ namespace std - #endif - } - } -+ ctype_byname::~ctype_byname() -+ { } - - #ifdef _GLIBCXX_USE_WCHAR_T - ctype::__wmask_type -@@ -138,17 +144,33 @@ namespace std - ctype:: - do_is(mask __m, wchar_t __c) const - { -- // Highest bitmask in ctype_base == 10, but extra in "C" -- // library for blank. -+ // The case of __m == ctype_base::space is particularly important, -+ // due to its use in many istream functions. Therefore we deal with -+ // it first, exploiting the knowledge that on GNU systems _M_bit[5] -+ // is the mask corresponding to ctype_base::space. NB: an encoding -+ // change would not affect correctness! -+ - bool __ret = false; -- const size_t __bitmasksize = 11; -- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -- if (__m & _M_bit[__bitcur] -- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -- { -- __ret = true; -- break; -- } -+ if (__m == _M_bit[5]) -+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); -+ else -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur]) -+ { -+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ else if (__m == _M_bit[__bitcur]) -+ break; -+ } -+ } -+ - return __ret; - } - -@@ -290,4 +312,5 @@ namespace std - #endif - } - #endif // _GLIBCXX_USE_WCHAR_T --} -+ -+_GLIBCXX_END_NAMESPACE -diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h -index d89da33..067657a 100644 ---- a/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -53,12 +53,16 @@ - template - messages<_CharT>::messages(__c_locale __cloc, const char* __s, - size_t __refs) -- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -- _M_name_messages(__s) -+ : facet(__refs), _M_c_locale_messages(NULL), -+ _M_name_messages(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_messages = __tmp; -+ -+ // Last to avoid leaking memory if new throws. -+ _M_c_locale_messages = _S_clone_c_locale(__cloc); - } - - template -diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -index 31ebb9f..7679b9c 100644 ---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ -@@ -206,7 +211,7 @@ namespace std - } - break; - default: -- ; -+ __ret = pattern(); - } - return __ret; - } -@@ -390,7 +395,9 @@ namespace std - __c_locale __old = __uselocale(__cloc); - #else - // Switch to named locale so that mbsrtowcs will work. -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; - setlocale(LC_ALL, __name); - #endif - -@@ -477,8 +484,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - __throw_exception_again; - } -@@ -498,8 +505,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - } - } -@@ -545,8 +552,11 @@ namespace std - __c_locale __old = __uselocale(__cloc); - #else - // Switch to named locale so that mbsrtowcs will work. -- char* __old = strdup(setlocale(LC_ALL, NULL)); -- setlocale(LC_ALL, __name); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); -+ setlocale(LC_ALL, __name); - #endif - - #ifdef __UCLIBC_MJN3_ONLY__ -@@ -633,8 +643,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - __throw_exception_again; - } -@@ -653,8 +663,8 @@ namespace std - #ifdef __UCLIBC_HAS_XLOCALE__ - __uselocale(__old); - #else -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - } - } -diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -index d5c8961..8ae8969 100644 ---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc -index d848ed5..f24d53e 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -53,11 +53,14 @@ namespace std - const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, - _M_c_locale_timepunct); - #else -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); - setlocale(LC_ALL, _M_name_timepunct); - const size_t __len = strftime(__s, __maxlen, __format, __tm); -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - // Make sure __s is null terminated. - if (__len == 0) -@@ -207,11 +210,14 @@ namespace std - const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, - _M_c_locale_timepunct); - #else -- char* __old = strdup(setlocale(LC_ALL, NULL)); -+ char* __old = setlocale(LC_ALL, NULL); -+ const size_t __llen = strlen(__old) + 1; -+ char* __sav = new char[__llen]; -+ memcpy(__sav, __old, __llen); - setlocale(LC_ALL, _M_name_timepunct); - const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -- setlocale(LC_ALL, __old); -- free(__old); -+ setlocale(LC_ALL, __sav); -+ delete [] __sav; - #endif - // Make sure __s is null terminated. - if (__len == 0) -diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h -index ba8e858..1665dde 100644 ---- a/libstdc++-v3/config/locale/uclibc/time_members.h -+++ b/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -50,12 +50,21 @@ - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -- _M_name_timepunct(__s) -+ _M_name_timepunct(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_timepunct = __tmp; -- _M_initialize_timepunct(__cloc); -+ -+ try -+ { _M_initialize_timepunct(__cloc); } -+ catch(...) -+ { -+ delete [] _M_name_timepunct; -+ __throw_exception_again; -+ } -+ - } - - template --- -2.8.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch deleted file mode 100644 index 29b7ce72d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 210f6b3b82084cc756e02b8bc12f909a43b14ee8 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 27 Jun 2017 18:10:54 -0700 -Subject: [PATCH 40/49] Add ssp_nonshared to link commandline for musl targets - -when -fstack-protector options are enabled we need to -link with ssp_shared on musl since it does not provide -the __stack_chk_fail_local() so essentially it provides -libssp but not libssp_nonshared something like -TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED - where-as for glibc the needed symbols -are already present in libc_nonshared library therefore -we do not need any library helper on glibc based systems -but musl needs the libssp_noshared from gcc - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - gcc/config/linux.h | 7 +++++++ - gcc/config/rs6000/linux.h | 10 ++++++++++ - gcc/config/rs6000/linux64.h | 10 ++++++++++ - 3 files changed, 27 insertions(+) - -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 2e683d0c430..1b4df798671 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ - { 0, 0, 0, 0, 0, 0 } \ - } -+#ifdef TARGET_LIBC_PROVIDES_SSP -+#undef LINK_SSP_SPEC -+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -+ "|fstack-protector-strong|fstack-protector-explicit" \ -+ ":-lssp_nonshared}" -+#endif -+ - #endif - - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ -diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h -index 684afd6c190..22cfa391b89 100644 ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -91,6 +91,16 @@ - " -m elf32ppclinux") - #endif - -+/* link libssp_nonshared.a with musl */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#ifdef TARGET_LIBC_PROVIDES_SSP -+#undef LINK_SSP_SPEC -+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -+ "|fstack-protector-strong|fstack-protector-explicit" \ -+ ":-lssp_nonshared}" -+#endif -+#endif -+ - #undef LINK_OS_LINUX_SPEC - #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 3b00ec0fcf0..8371f8d7b6b 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -465,6 +465,16 @@ extern int dot_symbols; - " -m elf64ppc") - #endif - -+/* link libssp_nonshared.a with musl */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#ifdef TARGET_LIBC_PROVIDES_SSP -+#undef LINK_SSP_SPEC -+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -+ "|fstack-protector-strong|fstack-protector-explicit" \ -+ ":-lssp_nonshared}" -+#endif -+#endif -+ - #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \ --- -2.13.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch new file mode 100644 index 000000000..074452974 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch @@ -0,0 +1,28 @@ +From 551a5db7acb56e085a101f1c222d51b2c1b039a4 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 7 Nov 2015 14:58:40 +0000 +Subject: [PATCH 41/46] ssp_nonshared + +--- +Upstream-Status: Inappropriate [OE Configuration] + + gcc/gcc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 2812819..9de96ee 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -863,7 +863,8 @@ proper position among the other output files. */ + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +- "|fstack-protector-strong|fstack-protector-explicit:}" ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ +-- +2.8.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch index ed6cd6905..6b5da0254 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch @@ -31,7 +31,7 @@ gcc/Changelog: Signed-off-by: Khem Raj --- -Upstream-Status: Rejected +Upstream-Status: Denied gcc/config/i386/i386.c | 4 ++-- libgcc/config/i386/cpuinfo.c | 6 +++--- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch new file mode 100644 index 000000000..231f14761 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch @@ -0,0 +1,51 @@ +From a582b0a53d1dc8604a201348b99ca8de48784e7e Mon Sep 17 00:00:00 2001 +From: jiwang +Date: Thu, 12 May 2016 17:00:52 +0000 +Subject: [PATCH] [LRA] PR70904, relax the restriction on subreg reload for + wide mode + +2016-05-12 Jiong Wang + +gcc/ + PR rtl-optimization/70904 + * lra-constraint.c (process_addr_reg): Relax the restriction on + subreg reload for wide mode. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236181 138bc75d-0d04-0410-961f-82ee72b054a4 +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj + + gcc/lra-constraints.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c +index f96fd458e23..73fb72a2ea5 100644 +--- a/gcc/lra-constraints.c ++++ b/gcc/lra-constraints.c +@@ -1326,7 +1326,21 @@ process_addr_reg (rtx *loc, bool check_only_p, rtx_insn **before, rtx_insn **aft + + subreg_p = GET_CODE (*loc) == SUBREG; + if (subreg_p) +- loc = &SUBREG_REG (*loc); ++ { ++ reg = SUBREG_REG (*loc); ++ mode = GET_MODE (reg); ++ ++ /* For mode with size bigger than ptr_mode, there unlikely to be "mov" ++ between two registers with different classes, but there normally will ++ be "mov" which transfers element of vector register into the general ++ register, and this normally will be a subreg which should be reloaded ++ as a whole. This is particularly likely to be triggered when ++ -fno-split-wide-types specified. */ ++ if (in_class_p (reg, cl, &new_class) ++ || GET_MODE_SIZE (mode) <= GET_MODE_SIZE (ptr_mode)) ++ loc = &SUBREG_REG (*loc); ++ } ++ + reg = *loc; + mode = GET_MODE (reg); + if (! REG_P (reg)) +-- +2.14.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc new file mode 100644 index 000000000..20738283c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc @@ -0,0 +1,128 @@ +require gcc-common.inc + +# Third digit in PV should be incremented after a minor release + +PV = "7.3.0" + +# BINV should be incremented to a revision after a minor gcc release + +BINV = "7.3.0" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +#RELEASE = "7-20170504" +BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz" +#SRCREV = "f7cf798b73fd1a07098f9a490deec1e2a36e0bed" +#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git" +#BASEURI ?= "http://mirrors.concertpass.com/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.bz2" + +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0008-c99-snprintf.patch \ + file://0009-gcc-poison-system-directories.patch \ + file://0010-gcc-poison-dir-extend.patch \ + file://0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0012-64-bit-multilib-hack.patch \ + file://0013-optional-libstdc.patch \ + file://0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ + file://0015-COLLECT_GCC_OPTIONS.patch \ + file://0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0017-fortran-cross-compile-hack.patch \ + file://0018-cpp-honor-sysroot.patch \ + file://0019-MIPS64-Default-to-N64-ABI.patch \ + file://0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0021-gcc-Fix-argument-list-too-long-error.patch \ + file://0022-Disable-sdt.patch \ + file://0023-libtool.patch \ + file://0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0027-export-CPP.patch \ + file://0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ + file://0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ + file://0030-Ensure-target-gcc-headers-can-be-included.patch \ + file://0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0034-aarch64-Add-support-for-musl-ldso.patch \ + file://0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0036-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0038-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch \ + file://0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ + file://0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \ + file://0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + file://0047-sync-gcc-stddef.h-with-musl.patch \ + file://0048-gcc-Enable-static-PIE.patch \ + file://fix-segmentation-fault-precompiled-hdr.patch \ + file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \ + ${BACKPORTS} \ +" +BACKPORTS = "\ +" + +SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2" +SRC_URI[sha256sum] = "832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c" + +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + --enable-libssp \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + --with-linker-hash-style=${LINKER_HASH_STYLE} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_INITIAL = "\ + --disable-libmudflap \ + --disable-libgomp \ + --disable-libitm \ + --disable-libquadmath \ + --with-system-zlib \ + --disable-lto \ + --disable-plugin \ + --enable-decimal-float=no \ + --without-isl \ + gcc_cv_libc_provides_ssp=yes \ +" + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 000000000..1af1c74e6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,42 @@ +From 2fcf1e23ef4b2a5c93526f12212aa892595261f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:37:11 +0400 +Subject: [PATCH 01/47] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 32a38633ad8..b4760952085 100755 +--- a/configure ++++ b/configure +@@ -7472,7 +7472,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +diff --git a/configure.ac b/configure.ac +index 12377499295..176ebb921ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3065,7 +3065,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch new file mode 100644 index 000000000..ebd562b63 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch @@ -0,0 +1,28 @@ +From 732f10eead61830a8aee1bf38cce892da25c35b1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:49:03 +0400 +Subject: [PATCH 08/47] c99-snprintf + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + libstdc++-v3/include/c_std/cstdio | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio +index 43969892aa2..12148457909 100644 +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -144,7 +144,7 @@ namespace std + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99_STDIO ++#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch new file mode 100644 index 000000000..fe13ed6e2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch @@ -0,0 +1,192 @@ +From 4791a0a0f4595d0a18974f4e85a759a0789943db Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 09/47] gcc: poison-system-directories + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 16 ++++++++++++++++ + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 7 files changed, 66 insertions(+) + +diff --git a/gcc/common.opt b/gcc/common.opt +index a5c3aeaa336..f02fe66367e 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -662,6 +662,10 @@ Wreturn-local-addr + Common Var(warn_return_local_addr) Init(1) Warning + Warn about returning a pointer/reference to a local or temporary variable. + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one variable shadows another. Same as -Wshadow=global. +diff --git a/gcc/config.in b/gcc/config.in +index bf2aa7b2e7d..b1203987e15 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -194,6 +194,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +diff --git a/gcc/configure b/gcc/configure +index c823ffe6290..4898f04fa6b 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -949,6 +949,7 @@ with_system_zlib + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1691,6 +1692,8 @@ Optional Features: + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -29347,6 +29350,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index acfe9797389..9dc1dc7fc96 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6101,6 +6101,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 68a558e9992..060cd7169c6 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -298,6 +298,7 @@ Objective-C and Objective-C++ Dialects}. + -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wno-pedantic-ms-format @gol + -Wplacement-new -Wplacement-new=@var{n} @gol ++-Wno-poison-system-directories @gol + -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol + -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol +@@ -5395,6 +5396,14 @@ made up of data only and thus requires no special treatment. But, for + most targets, it is made up of code and thus requires the stack to be + made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +diff --git a/gcc/gcc.c b/gcc/gcc.c +index c48178f..f63d53d 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1029,6 +1029,8 @@ proper position among the other output files. */ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ ++ %{Wno-poison-system-directories:--no-poison-system-directories} \ ++ %{Werror=poison-system-directories:--error-poison-system-directories} \ + %{static|no-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ +diff --git a/gcc/incpath.c b/gcc/incpath.c +index 98fe5ec9ab3..f90e74dbd73 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -26,6 +26,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch new file mode 100644 index 000000000..4e06aa2f6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch @@ -0,0 +1,39 @@ +From e74ef84ad609b3b6a5c37d207ffc3c6e70d1f025 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:00:34 +0400 +Subject: [PATCH 10/47] gcc-poison-dir-extend + +Add /sw/include and /opt/include based on the original +zecke-no-host-includes.patch patch. The original patch checked for +/usr/include, /sw/include and /opt/include and then triggered a failure and +aborted. + +Instead, we add the two missing items to the current scan. If the user +wants this to be a failure, they can add "-Werror=poison-system-directories". + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/incpath.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gcc/incpath.c b/gcc/incpath.c +index f90e74dbd73..c583ee5061d 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + { + if ((!strncmp (p->name, "/usr/include", 12)) + || (!strncmp (p->name, "/usr/local/include", 18)) +- || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) + warning (OPT_Wpoison_system_directories, + "include location \"%s\" is unsafe for " + "cross-compilation", +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 000000000..b39ff1ec2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch @@ -0,0 +1,73 @@ +From a41d3a53a4e313c20802330d6b5c75358a4ed882 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:08:31 +0400 +Subject: [PATCH 11/47] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET + +Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. + +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. + +Other changes I had to do include: + +- 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. + +- passing the right CFLAGS to configure scripts as exported environment variables + +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. + +Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? + +Signed-off-by: Paolo Bonzini +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + configure | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/configure b/configure +index b4760952085..72a8ba94c4e 100755 +--- a/configure ++++ b/configure +@@ -6736,6 +6736,38 @@ fi + + + ++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS ++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS ++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). ++# We want to ensure that TARGET libraries (which we know are built with ++# gcc) are built with "-O2 -g", so include those options when setting ++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. ++if test "x$CFLAGS_FOR_TARGET" = x; then ++ CFLAGS_FOR_TARGET=$CFLAGS ++ case " $CFLAGS " in ++ *" -O2 "*) ;; ++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; ++ esac ++ case " $CFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; ++ esac ++fi ++ ++ ++if test "x$CXXFLAGS_FOR_TARGET" = x; then ++ CXXFLAGS_FOR_TARGET=$CXXFLAGS ++ case " $CXXFLAGS " in ++ *" -O2 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; ++ esac ++ case " $CXXFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; ++ esac ++fi ++ ++ + # Handle --with-headers=XXX. If the value is not "yes", the contents of + # the named directory are copied to $(tooldir)/sys-include. + if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch new file mode 100644 index 000000000..f3b39120b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch @@ -0,0 +1,85 @@ +From 3af9fbbd14e83242ac2acb54bbb4bb726845fd34 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:10:06 +0400 +Subject: [PATCH 12/47] 64-bit multilib hack. + +GCC has internal multilib handling code but it assumes a very specific rigid directory +layout. The build system implementation of multilib layout is very generic and allows +complete customisation of the library directories. + +This patch is a partial solution to allow any custom directories to be passed into gcc +and handled correctly. It forces gcc to use the base_libdir (which is the current +directory, "."). We need to do this for each multilib that is configured as we don't +know which compiler options may be being passed into the compiler. Since we have a compiler +per mulitlib at this point that isn't an issue. + +The one problem is the target compiler is only going to work for the default multlilib at +this point. Ideally we'd figure out which multilibs were being enabled with which paths +and be able to patch these entries with a complete set of correct paths but this we +don't have such code at this point. This is something the target gcc recipe should do +and override these platform defaults in its build config. + +RP 15/8/11 + +Signed-off-by: Khem Raj +Signed-off-by: Elvis Dowson + +Upstream-Status: Pending +--- + gcc/config/i386/t-linux64 | 6 ++---- + gcc/config/mips/t-linux64 | 10 +++------- + gcc/config/rs6000/t-linux64 | 5 ++--- + 3 files changed, 7 insertions(+), 14 deletions(-) + +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index e422c442dae..cc885e24457 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -32,7 +32,5 @@ + # + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) +-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_DIRNAMES = . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 +index 100f9da5e14..601cdf08d05 100644 +--- a/gcc/config/mips/t-linux64 ++++ b/gcc/config/mips/t-linux64 +@@ -17,10 +17,6 @@ + # . + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 +-MULTILIB_DIRNAMES = n32 32 64 +-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) +-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) +-MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++MULTILIB_DIRNAMES = . . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ++ +diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +index 2830ed0d861..d057facd2fd 100644 +--- a/gcc/config/rs6000/t-linux64 ++++ b/gcc/config/rs6000/t-linux64 +@@ -26,10 +26,9 @@ + # MULTILIB_OSDIRNAMES according to what is found on the target. + + MULTILIB_OPTIONS := m64/m32 +-MULTILIB_DIRNAMES := 64 32 ++MULTILIB_DIRNAMES := . . + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch new file mode 100644 index 000000000..3439bf67d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch @@ -0,0 +1,125 @@ +From 26a58d05844274915d011edbf9330c6151687b22 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:12:56 +0400 +Subject: [PATCH 13/47] optional libstdc + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + gcc/c-family/c.opt | 4 ++++ + gcc/cp/g++spec.c | 1 + + gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++- + gcc/gcc.c | 1 + + 4 files changed, 37 insertions(+), 1 deletion(-) + +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 9ad2f6e1fcc..c4ef7796282 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1848,6 +1848,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++. + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c +index ffcc87c79c9..28d8a9cf530 100644 +--- a/gcc/cp/g++spec.c ++++ b/gcc/cp/g++spec.c +@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 060cd7169c6..8e2adc25644 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -211,6 +211,9 @@ in the following sections. + -fno-weak -nostdinc++ @gol + -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol ++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol ++-fvtv-counts -fvtv-debug @gol ++-nostdlib++ @gol + -fext-numeric-literals @gol + -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol + -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol +@@ -496,7 +499,7 @@ Objective-C and Objective-C++ Dialects}. + -s -static -static-libgcc -static-libstdc++ @gol + -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol + -static-libmpx -static-libmpxwrappers @gol +--shared -shared-libgcc -symbolic @gol ++-shared -shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol} -z @var{keyword}} + +@@ -11606,6 +11609,33 @@ library subroutines. + constructors are called; @pxref{Collect2,,@code{collect2}, gccint, + GNU Compiler Collection (GCC) Internals}.) + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ ++@cindex @option{-lgcc}, use with @option{-nostdlib} ++@cindex @option{-nostdlib} and unresolved references ++@cindex unresolved references and @option{-nostdlib} ++@cindex @option{-lgcc}, use with @option{-nodefaultlibs} ++@cindex @option{-nodefaultlibs} and unresolved references ++@cindex unresolved references and @option{-nodefaultlibs} ++One of the standard libraries bypassed by @option{-nostdlib} and ++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines ++which GCC uses to overcome shortcomings of particular machines, or special ++needs for some languages. ++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++Collection (GCC) Internals}, ++for more discussion of @file{libgcc.a}.) ++In most cases, you need @file{libgcc.a} even when you want to avoid ++other standard libraries. In other words, when you specify @option{-nostdlib} ++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well. ++This ensures that you have no unresolved references to internal GCC ++library subroutines. ++(An example of such an internal subroutine is @code{__main}, used to ensure C++ ++constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++GNU Compiler Collection (GCC) Internals}.) ++ + @item -pie + @opindex pie + Produce a position independent executable on targets that support it. +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 6315aa0dd16..a5fafbe5107 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1046,6 +1046,7 @@ proper position among the other output files. */ + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}" + #endif + +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file mode 100644 index 000000000..f92b5fbaa --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch @@ -0,0 +1,59 @@ +From 716de5db6859fd1ea21078c94a41fac7a885b7e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:14:20 +0400 +Subject: [PATCH 14/47] gcc: disable MASK_RELAX_PIC_CALLS bit + +The new feature added after 4.3.3 +"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" +will cause cc1plus eat up all the system memory when build webkit-gtk. +The function mips_get_pic_call_symbol keeps on recursively calling itself. +Disable this feature to walk aside the bug. + +Signed-off-by: Dongxiao Xu +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 7 ------- + gcc/configure.ac | 7 ------- + 2 files changed, 14 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 4898f04fa6b..640e4643805 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -27303,13 +27303,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 + $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 9dc1dc7fc96..9a2dae55ba2 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4641,13 +4641,6 @@ x: + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) + + AC_CACHE_CHECK([linker for .eh_frame personality relaxation], +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 000000000..6e62945e5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch @@ -0,0 +1,38 @@ +From 04a7a672301bb07caea6a7cad8378f63f1fe3200 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:16:28 +0400 +Subject: [PATCH 15/47] COLLECT_GCC_OPTIONS + +This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to +invoke collect2. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/gcc.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index a5fafbe5107..05896e19926 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4654,6 +4654,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 000000000..1991251c2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch @@ -0,0 +1,96 @@ +From 47071cbd4f13ff5a4974f71f359a04afcfb125da Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:17:25 +0400 +Subject: [PATCH 16/47] Use the defaults.h in ${B} instead of ${S}, and t-oe in + ${B} + +Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that +the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +While compiling gcc-crosssdk-initial-x86_64 on some host, there is +occasionally failure that test the existance of default.h doesn't +work, the reason is tm_include_list='** defaults.h' rather than +tm_include_list='** ./defaults.h' + +So we add the test condition for this situation. +Signed-off-by: Hongxu Jia +--- + gcc/Makefile.in | 2 +- + gcc/configure | 4 ++-- + gcc/configure.ac | 4 ++-- + gcc/mkconfig.sh | 4 ++-- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 2411671cea3..7b590c9bbd3 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -532,7 +532,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ + TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + + xmake_file=@xmake_file@ +-tmake_file=@tmake_file@ ++tmake_file=@tmake_file@ ./t-oe + TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ + TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ + TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ +diff --git a/gcc/configure b/gcc/configure +index 640e4643805..b5ac1552541 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12150,8 +12150,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 9a2dae55ba2..cb1479d1ef4 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1922,8 +1922,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh +index 9fc7b5ca734..04abecfe648 100644 +--- a/gcc/mkconfig.sh ++++ b/gcc/mkconfig.sh +@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then + if [ $# -ge 1 ]; then + echo '#ifdef IN_GCC' >> ${output}T + for file in "$@"; do +- if test x"$file" = x"defaults.h"; then ++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then + postpone_defaults_h="yes" + else + echo "# include \"$file\"" >> ${output}T +@@ -109,7 +109,7 @@ esac + + # If we postponed including defaults.h, add the #include now. + if test x"$postpone_defaults_h" = x"yes"; then +- echo "# include \"defaults.h\"" >> ${output}T ++ echo "# include \"./defaults.h\"" >> ${output}T + fi + + # Add multiple inclusion protection guard, part two. +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch new file mode 100644 index 000000000..e2830c59d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch @@ -0,0 +1,46 @@ +From 4fc35a2bb7666a7de35568eb5d47f0ce6acebe62 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:20:01 +0400 +Subject: [PATCH 17/47] fortran cross-compile hack. + +* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used +used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross +directory. + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + libgfortran/configure | 2 +- + libgfortran/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgfortran/configure b/libgfortran/configure +index 81238fcb79c..7ded7abd456 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -12792,7 +12792,7 @@ esac + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + ac_ext=${ac_fc_srcext-f} + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 37b12d2998f..63a4166ef62 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -243,7 +243,7 @@ AC_SUBST(enable_static) + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch new file mode 100644 index 000000000..555907417 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch @@ -0,0 +1,54 @@ +From 1c8a332469ca4bfefb10df70720e0dc83ff9a756 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:22:00 +0400 +Subject: [PATCH 18/47] cpp: honor sysroot. + +Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile +preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location +rather than the --sysroot option specified on the commandline. If access to that directory is +permission denied (unreadable), gcc will error. + +This happens when ccache is in use due to the fact it uses preprocessed source files. + +The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, +-isystem, -isysroot happen and the correct sysroot is used. + +[YOCTO #2074] + +RP 2012/04/13 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/cp/lang-specs.h | 2 +- + gcc/gcc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h +index 6b383e1d86d..c7c7d6a56ec 100644 +--- a/gcc/cp/lang-specs.h ++++ b/gcc/cp/lang-specs.h +@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see + {".ii", "@c++-cpp-output", 0, 0, 0}, + {"@c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1plus -fpreprocessed %i %(cc1_options) %2\ ++ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 05896e19926..c73d4023987 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1351,7 +1351,7 @@ static const struct compiler default_compilers[] = + %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 000000000..742a4012a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch @@ -0,0 +1,57 @@ +From 0a3b3cc45ea7ba83b46df7464b41c377e3966d88 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:23:08 +0400 +Subject: [PATCH 19/47] MIPS64: Default to N64 ABI + +MIPS64 defaults to n32 ABI, this patch makes it +so that it defaults to N64 ABI + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE config specific] +--- + gcc/config.gcc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index b8bb4d65825..5e45f4b5199 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2084,29 +2084,29 @@ mips*-*-linux*) # Linux MIPS, either endian. + default_mips_arch=mips32 + ;; + mips64el-st-linux-gnu) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_file="${tm_file} mips/st.h" + tmake_file="${tmake_file} mips/t-st" + enable_mips_multilibs="yes" + ;; + mips64octeon*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" + target_cpu_default=MASK_SOFT_FLOAT_ABI + enable_mips_multilibs="yes" + ;; + mipsisa64r6*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r6 + enable_mips_multilibs="yes" + ;; + mipsisa64r2*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r2 + enable_mips_multilibs="yes" + ;; + mips64*-*-linux* | mipsisa64*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + enable_mips_multilibs="yes" + ;; + esac +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 000000000..de7b4df57 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch @@ -0,0 +1,234 @@ +From d6c983b685ee03e9cf21189108d31ed9f760ff3f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:24:50 +0400 +Subject: [PATCH 20/47] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER + relative to SYSTEMLIBS_DIR + +This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER +relative to SYSTEMLIBS_DIR which can be set in generated headers +This breaks the assumption of hardcoded multilib in gcc +Change is only for the supported architectures in OE including +SH, sparc, alpha for possible future support (if any) + +Removes the do_headerfix task in metadata + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE configuration] +--- + gcc/config/alpha/linux-elf.h | 4 ++-- + gcc/config/arm/linux-eabi.h | 4 ++-- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 6 +++--- + gcc/config/linux.h | 8 ++++---- + gcc/config/mips/linux.h | 12 ++++++------ + gcc/config/rs6000/linux64.h | 16 ++++++---------- + gcc/config/sh/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + gcc/config/sparc/linux64.h | 4 ++-- + 11 files changed, 29 insertions(+), 33 deletions(-) + +diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h +index 2c39fbe601c..6d88e21abe2 100644 +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see + #define EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" + #elif DEFAULT_LIBC == LIBC_GLIBC +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index a08cfb34377..fbac9a9d994 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -62,8 +62,8 @@ + GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ + + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" ++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" + #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT + + #define GLIBC_DYNAMIC_LINKER \ +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index 3d62367ae68..e8a16191849 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + + #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + %{static:-Bstatic} \ +diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h +index 59132124d6b..336d158629c 100644 +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #define GNU_USER_LINK_EMULATION "elf_i386" +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index e65c404ff91..c34ded98481 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index b3a9e85e77f..2e683d0c430 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + GLIBC_DYNAMIC_LINKER must be defined for each target using them, or + GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets + supporting both 32-bit and 64-bit compilation. */ +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" +diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h +index 44132b8e44d..80505ad9f48 100644 +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" + + #define GLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + + #undef UCLIBC_DYNAMIC_LINKER32 + #define UCLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + #undef UCLIBC_DYNAMIC_LINKER64 + #define UCLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" + #define UCLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 71e35b709ad..3b00ec0fcf0 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -412,16 +412,11 @@ extern int dot_symbols; + #undef LINK_OS_DEFAULT_SPEC + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" + +-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" +- ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" + #ifdef LINUX64_DEFAULT_ABI_ELFv2 +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.2}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" + #else +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.1}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +@@ -429,8 +424,9 @@ extern int dot_symbols; + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++ + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h +index c30083423f2..196b82725f8 100644 +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ + "%{mfdpic:-fdpic}.so.1" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" +diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h +index ce084656fca..bed6300cb2a 100644 +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ +diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h +index 573ce8a9a4c..6749f6b5d9c 100644 +--- a/gcc/config/sparc/linux64.h ++++ b/gcc/config/sparc/linux64.h +@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" + + #ifdef SPARC_BI_ARCH + +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 000000000..4e562144e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch @@ -0,0 +1,40 @@ +From 80c24247fed52c1269791088090bc0fa85280983 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:26:37 +0400 +Subject: [PATCH 21/47] gcc: Fix argument list too long error. + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 7b590c9bbd3..23cca7f0d5a 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3459,7 +3459,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch new file mode 100644 index 000000000..871f195c9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch @@ -0,0 +1,113 @@ +From 3021fec485f44478a3d5fffb4adac13d831fcdc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:28:10 +0400 +Subject: [PATCH 22/47] Disable sdt. + +We don't list dtrace in DEPENDS so we shouldn't be depending on this header. +It may or may not exist from preivous builds though. To be determinstic, disable +sdt.h usage always. This avoids build failures if the header is removed after configure +but before libgcc is compiled for example. + +RP 2012/8/7 + +Signed-off-by: Khem Raj + +Disable sdt for libstdc++-v3. + +Signed-off-by: Robert Yang + +Upstream-Status: Inappropriate [hack] +--- + gcc/configure | 12 ++++++------ + gcc/configure.ac | 18 +++++++++--------- + libstdc++-v3/configure | 6 +++--- + libstdc++-v3/configure.ac | 2 +- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index b5ac1552541..08b2f63c7fa 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -28967,12 +28967,12 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 + $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } + have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h +- +-fi ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++# ++#fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 + $as_echo "$have_sys_sdt_h" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index cb1479d1ef4..0581fe963dc 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5754,15 +5754,15 @@ fi + AC_SUBST([enable_default_ssp]) + + # Test for on the target. +-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) +-AC_MSG_CHECKING(sys/sdt.h in the target C library) +-have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- AC_DEFINE(HAVE_SYS_SDT_H, 1, +- [Define if your target C library provides sys/sdt.h]) +-fi +-AC_MSG_RESULT($have_sys_sdt_h) ++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) ++#AC_MSG_CHECKING(sys/sdt.h in the target C library) ++#have_sys_sdt_h=no ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# AC_DEFINE(HAVE_SYS_SDT_H, 1, ++# [Define if your target C library provides sys/sdt.h]) ++#fi ++#AC_MSG_RESULT($have_sys_sdt_h) + + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index fb7e126c0b0..a18057feb88 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -21856,11 +21856,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test $glibcxx_cv_sys_sdt_h = yes; then ++# if test $glibcxx_cv_sys_sdt_h = yes; then + +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h + +- fi ++# fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 + $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } + +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 8e973503be0..a46d25e740d 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN + GLIBCXX_CHECK_SC_NPROC_ONLN + GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP + GLIBCXX_CHECK_SYSCTL_HW_NCPU +-GLIBCXX_CHECK_SDT_H ++#GLIBCXX_CHECK_SDT_H + + # Check for available headers. + AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch new file mode 100644 index 000000000..27dfb1fdd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch @@ -0,0 +1,42 @@ +From e79a4f8169e836c8deabca5a45884cfe11d07847 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:29:11 +0400 +Subject: [PATCH 23/47] libtool + +libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 +when running on am x86_64 build host. + +This patch stops this speading to libdir in the libstdc++.la file within libtool. +Arguably, it shouldn't be passing this into libtool in the first place but +for now this resolves the nastiest problems this causes. + +func_normal_abspath would resolve an empty path to `pwd` so we need +to filter the zero case. + +RP 2012/8/24 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + ltmain.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec85d70..0121fba707f 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6359,6 +6359,10 @@ func_mode_link () + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" ++ if test -n "$install_libdir"; then ++ func_normal_abspath "$install_libdir" ++ install_libdir=$func_normal_abspath_result ++ fi + + oldlibs= + if test -z "$rpath"; then +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 000000000..aa1e1bb8b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch @@ -0,0 +1,43 @@ +From 74d8dc48cb185e304c60067b4d8b50447ec328ec Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:30:32 +0400 +Subject: [PATCH 24/47] gcc: armv4: pass fix-v4bx to linker to support EABI. + +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/config/arm/linux-eabi.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index fbac9a9d994..5a51a8a7095 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -88,10 +88,14 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 000000000..b23413231 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch @@ -0,0 +1,102 @@ +From ac50dc3010a66220ad483c09efe270bb3f4c9424 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:33:04 +0400 +Subject: [PATCH 25/47] Use the multilib config files from ${B} instead of + using the ones from ${S} + +Use the multilib config files from ${B} instead of using the ones from ${S} +so that the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 22 ++++++++++++++++++---- + gcc/configure.ac | 22 ++++++++++++++++++---- + 2 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 08b2f63c7fa..6ba391ed068 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12130,10 +12130,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -12144,6 +12154,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 0581fe963dc..8551a412df3 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1902,10 +1902,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -1916,6 +1926,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch new file mode 100644 index 000000000..fe2471347 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch @@ -0,0 +1,31 @@ +From 9fab47d8662986ad887d9eddc39fcbe25e576383 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:39:38 +0000 +Subject: [PATCH 26/47] Avoid using libdir from .la which usually points to a + host path + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jonathan Liu +Signed-off-by: Khem Raj +--- + ltmain.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 0121fba707f..52bdbdb5f9c 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5628,6 +5628,9 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else ++ # Instead of using libdir from .la which usually points to a host path, ++ # use the path the .la is contained in. ++ libdir="$abs_ladir" + dir="$libdir" + absdir="$libdir" + fi +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch new file mode 100644 index 000000000..4f9e1f0b2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch @@ -0,0 +1,53 @@ +From fa6a46fdf73de7eacd289c084bbde6643b23f73b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:40:59 +0000 +Subject: [PATCH 27/47] export CPP + +The OE environment sets and exports CPP as being the target gcc. When +building gcc-cross-canadian for a mingw targetted sdk, the following can be found +in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: + +configure:3641: checking for _FILE_OFFSET_BITS value needed for large files +configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 +configure:3666: $? = 0 +configure:3698: result: no +configure:3786: checking how to run the C preprocessor +configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 +configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c +configure:3876: $? = 0 + +Note this is a *build* target (in build-x86_64-linux) so it should be +using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 +headers are very different, using the wrong cpp is a real problem. It is leaking +into configure through the CPP variable. Ultimately this leads to build +failures related to not being able to include a process.h file for pem-unix.c. + +The fix is to ensure we export a sane CPP value into the build +environment when using build targets. We could define a CPP_FOR_BUILD value which may be +the version which needs to be upstreamed but for now, this fix is good enough to +avoid the problem. + +RP 22/08/2013 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index b824e0a0ca1..e34e9555388 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -149,6 +149,7 @@ BUILD_EXPORTS = \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ ++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch new file mode 100644 index 000000000..b903349d5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch @@ -0,0 +1,56 @@ +From 2c05b4072f982df8002d61327837e18a724e934f Mon Sep 17 00:00:00 2001 +From: Alexandru-Cezar Sardan +Date: Wed, 5 Feb 2014 16:52:31 +0200 +Subject: [PATCH 28/47] Enable SPE & AltiVec generation on powepc*linux target + +When is configured with --target=powerpc-linux, the resulting GCC will +not be able to generate code for SPE targets (e500v1/v2). +GCC configured with --target=powerpc-linuxspe will not be able to +generate AltiVec instructions (for e6500). +This patch modifies the configured file such that SPE or AltiVec code +can be generated when gcc is configured with --target=powerpc-linux. +The ABI and speciffic instructions can be selected through the +"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Alexandru-Cezar Sardan +--- + gcc/config.gcc | 9 ++++++++- + gcc/config/rs6000/linuxspe.h | 3 --- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 5e45f4b5199..9b381dfd9af 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2415,7 +2415,14 @@ powerpc-*-rtems*) + tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm" + ;; + powerpc*-*-linux*) +- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" ++ case ${target} in ++ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" ++ ;; ++ *) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ++ ;; ++ esac + extra_options="${extra_options} rs6000/sysv4.opt" + tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm" + extra_objs="$extra_objs rs6000-linux.o" +diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h +index 92efabfe664..6d486451a7e 100644 +--- a/gcc/config/rs6000/linuxspe.h ++++ b/gcc/config/rs6000/linuxspe.h +@@ -27,6 +27,3 @@ + #undef TARGET_DEFAULT + #define TARGET_DEFAULT MASK_STRICT_ALIGN + #endif +- +-#undef ASM_DEFAULT_SPEC +-#define ASM_DEFAULT_SPEC "-mppc -mspe -me500" +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch new file mode 100644 index 000000000..7306a282b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch @@ -0,0 +1,42 @@ +From ec0f843b86c0f76bc5ebb20fafbc4aae1be4db61 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:21:55 +0000 +Subject: [PATCH 29/47] Disable the MULTILIB_OSDIRNAMES and other multilib + options. + +Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on +systems where the libdir is NOT set to /lib64. This is allowed by the +ABI, as +long as the dynamic loader is present in /lib. + +We simply want to use the default rules in gcc to find and configure the +normal libdir. + +Upstream-Status: Inappropriate[OE-Specific] + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/t-aarch64-linux | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +index ab064ab6f22..f4b1f98b216 100644 +--- a/gcc/config/aarch64/t-aarch64-linux ++++ b/gcc/config/aarch64/t-aarch64-linux +@@ -21,8 +21,8 @@ + LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + +-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) +-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) ++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) ++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + +-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32 ++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32 +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 000000000..568ba95ea --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch @@ -0,0 +1,98 @@ +From bf5836989e0ffc1c1df1369df06877e96c08df41 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:25:11 +0000 +Subject: [PATCH 30/47] Ensure target gcc headers can be included + +There are a few headers installed as part of the OpenEmbedded +gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe +built for the target architecture, these are within the target +sysroot and not cross/nativesdk; thus they weren't able to be +found by gcc with the existing search paths. Add support for +picking up these headers under the sysroot supplied on the gcc +command line in order to resolve this. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton +Signed-off-by: Khem Raj +--- + gcc/Makefile.in | 2 ++ + gcc/cppdefault.c | 4 ++++ + gcc/defaults.h | 9 +++++++++ + gcc/gcc.c | 7 ------- + 4 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 23cca7f0d5a..95d21effad3 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -608,6 +608,7 @@ libexecdir = @libexecdir@ + + # Directory in which the compiler finds libraries etc. + libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libsubdir_target = gcc/$(target_noncanonical)/$(version) + # Directory in which the compiler finds executables + libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which all plugin resources are installed +@@ -2791,6 +2792,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" + + PREPROCESSOR_DEFINES = \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ + -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ + -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index 10b96eca0a7..c8da0884872 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] + /* This is the dir for gcc's private headers. */ + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, + #endif ++#ifdef GCC_INCLUDE_SUBDIR_TARGET ++ /* This is the dir for gcc's private headers under the specified sysroot. */ ++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++#endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 7ad92d920f8..39848cc9c0e 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -1475,4 +1475,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB + #endif + ++/* Default prefixes to attach to command names. */ ++ ++#ifndef STANDARD_STARTFILE_PREFIX_1 ++#define STANDARD_STARTFILE_PREFIX_1 "/lib/" ++#endif ++#ifndef STANDARD_STARTFILE_PREFIX_2 ++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" ++#endif ++ + #endif /* ! GCC_DEFAULTS_H */ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index c73d4023987..b27245dbf77 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1472,13 +1472,6 @@ static const char *gcc_libexec_prefix; + + /* Default prefixes to attach to command names. */ + +-#ifndef STANDARD_STARTFILE_PREFIX_1 +-#define STANDARD_STARTFILE_PREFIX_1 "/lib/" +-#endif +-#ifndef STANDARD_STARTFILE_PREFIX_2 +-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" +-#endif +- + #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ + #undef MD_EXEC_PREFIX + #undef MD_STARTFILE_PREFIX +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch new file mode 100644 index 000000000..0184010f0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch @@ -0,0 +1,54 @@ +From c7b4d957edda955fbe405fd5295846614529f517 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 11:17:19 +0000 +Subject: [PATCH 31/47] gcc 4.8+ won't build with --disable-dependency-tracking + +since the *.Ppo files don't get created unless --enable-dependency-tracking is true. + +This patch ensures we only use those compiler options when its enabled. + +Upstream-Status: Submitted + +(Problem was already reported upstream, attached this patch there +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) + +RP +2012/09/22 + +Signed-off-by: Khem Raj +--- + libatomic/Makefile.am | 3 ++- + libatomic/Makefile.in | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index d731406fdbd..2fafc72d2e7 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) + +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index f6eeab312ea..3f06a894058 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -331,7 +331,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch new file mode 100644 index 000000000..e8905f525 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch @@ -0,0 +1,38 @@ +From 3be6b766a5881b0b187c3c3c68250a9e4f7c0fa3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 3 Mar 2015 08:21:19 +0000 +Subject: [PATCH 32/47] Don't search host directory during "relink" if + $inst_prefix is provided + +http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj +--- + ltmain.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 52bdbdb5f9c..82bcec39f05 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6004,12 +6004,13 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. ++ # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" +- # Try looking first in the location we're being installed to. ++ + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ add_dir="-L$inst_prefix_dir$libdir" + ;; + esac + fi +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch new file mode 100644 index 000000000..c0b8df3e7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch @@ -0,0 +1,29 @@ +From 6edcab9046b862cbb9b46892fc390ce69976539c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:15:27 -0700 +Subject: [PATCH 33/47] Use SYSTEMLIBS_DIR replacement instead of hardcoding + base_libdir + +Signed-off-by: Khem Raj +--- +Upstream-Status: Inappropriate [OE-Specific] + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index c45fc1d35d1..a7afe197266 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,7 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch new file mode 100644 index 000000000..7d866d906 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch @@ -0,0 +1,28 @@ +From b140d6839cfba9cac892bc736d984540552d6a56 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:18:39 -0700 +Subject: [PATCH 34/47] aarch64: Add support for musl ldso + +Signed-off-by: Khem Raj +--- +Upstream-Status: Inappropriate [OE-Specific] + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index a7afe197266..580c2c7ea15 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -24,7 +24,7 @@ + #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file mode 100644 index 000000000..e2c1956d1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch @@ -0,0 +1,54 @@ +From 63617f2da153db10fa2fe938cce31bee01d47fe8 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sun, 5 Jul 2015 20:25:18 -0700 +Subject: [PATCH 35/47] libcc1: fix libcc1's install path and rpath + +* Install libcc1.so and libcc1plugin.so into + $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we + had done to lto-plugin. +* Fix bad RPATH iussue: + gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file + /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 + [rpaths] + +Upstream-Status: Inappropriate [OE configuration] + +Signed-off-by: Robert Yang +--- + libcc1/Makefile.am | 4 ++-- + libcc1/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am +index 5e61a92a26b..e8b627f9cec 100644 +--- a/libcc1/Makefile.am ++++ b/libcc1/Makefile.am +@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + + if ENABLE_PLUGIN + plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la +diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in +index 54babb02a49..e51d87ffdce 100644 +--- a/libcc1/Makefile.in ++++ b/libcc1/Makefile.in +@@ -303,8 +303,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la + BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch new file mode 100644 index 000000000..aa0b10827 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch @@ -0,0 +1,213 @@ +From ca14820ae834a62ef2b80b283e8f900714636272 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:39:54 +0000 +Subject: [PATCH 36/47] handle sysroot support for nativesdk-gcc + +Being able to build a nativesdk gcc is useful, particularly in cases +where the host compiler may be of an incompatible version (or a 32 +bit compiler is needed). + +Sadly, building nativesdk-gcc is not straight forward. We install +nativesdk-gcc into a relocatable location and this means that its +library locations can change. "Normal" sysroot support doesn't help +in this case since the values of paths like "libdir" change, not just +base root directory of the system. + +In order to handle this we do two things: + +a) Add %r into spec file markup which can be used for injected paths + such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). +b) Add other paths which need relocation into a .gccrelocprefix section + which the relocation code will notice and adjust automatically. + +Upstream-Status: Inappropriate +RP 2015/7/28 + +Signed-off-by: Khem Raj +--- + gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++------------- + gcc/cppdefault.h | 3 ++- + gcc/gcc.c | 20 ++++++++++++++------ + 3 files changed, 53 insertions(+), 20 deletions(-) + +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index c8da0884872..43dc597a0c3 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -35,6 +35,30 @@ + # undef CROSS_INCLUDE_DIR + #endif + ++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; ++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; ++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; ++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; ++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; ++#ifdef LOCAL_INCLUDE_DIR ++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; ++#endif ++#ifdef PREFIX_INCLUDE_DIR ++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; ++#endif ++#ifdef FIXED_INCLUDE_DIR ++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; ++#endif ++#ifdef CROSS_INCLUDE_DIR ++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; ++#endif ++#ifdef TOOL_INCLUDE_DIR ++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; ++#endif ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; ++#endif ++ + const struct default_include cpp_include_defaults[] + #ifdef INCLUDE_DEFAULTS + = INCLUDE_DEFAULTS; +@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[] + = { + #ifdef GPLUSPLUS_INCLUDE_DIR + /* Pick up GNU C++ generic include files. */ +- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR + /* Pick up GNU C++ target-dependent include files. */ +- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, + #endif + #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR + /* Pick up GNU C++ backward and deprecated include files. */ +- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GCC_INCLUDE_DIR + /* This is the dir for gcc's private headers. */ +- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef GCC_INCLUDE_SUBDIR_TARGET + /* This is the dir for gcc's private headers under the specified sysroot. */ +- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, + #endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, + #endif + #ifdef PREFIX_INCLUDE_DIR +- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, ++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, + #endif + #ifdef FIXED_INCLUDE_DIR + /* This is the dir for fixincludes. */ +- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, ++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, + /* A multilib suffix needs adding if different multilibs use + different headers. */ + #ifdef SYSROOT_HEADERS_SUFFIX_SPEC +@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[] + #endif + #ifdef CROSS_INCLUDE_DIR + /* One place the target system's headers might be. */ +- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef TOOL_INCLUDE_DIR + /* Another place the target system's headers might be. */ +- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, ++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, + #endif + #ifdef NATIVE_SYSTEM_HEADER_DIR + /* /usr/include comes dead last. */ +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, + #endif + { 0, 0, 0, 0, 0, 0 } + }; +diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h +index 17bbb0eaef7..a937ec1d187 100644 +--- a/gcc/cppdefault.h ++++ b/gcc/cppdefault.h +@@ -33,7 +33,8 @@ + + struct default_include + { +- const char *const fname; /* The name of the directory. */ ++ const char *fname; /* The name of the directory. */ ++ + const char *const component; /* The component containing the directory + (see update_path in prefix.c) */ + const char cplusplus; /* Only look here if we're compiling C++. */ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index b27245dbf77..e015c77f15f 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL; + #endif + static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; + ++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; ++ + /* Nonzero means pass the updated target_system_root to the compiler. */ + + static int target_system_root_changed; +@@ -518,6 +520,7 @@ or with constant text in a single argument. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. ++ %r Output the base path target_relocatable_prefix + %S process STARTFILE_SPEC as a spec. A capital S is actually used here. + %E process ENDFILE_SPEC as a spec. A capital E is actually used here. + %C process CPP_SPEC as a spec. +@@ -1495,10 +1498,10 @@ static const char *gcc_libexec_prefix; + gcc_exec_prefix is set because, in that case, we know where the + compiler has been installed, and use paths relative to that + location instead. */ +-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; +-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; +-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; ++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; ++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; ++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + + /* For native compilers, these are well-known paths containing + components that may be provided by the system. For cross +@@ -1506,9 +1509,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + static const char *md_exec_prefix = MD_EXEC_PREFIX; + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; + static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_1 ++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_2 ++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_2; + + /* A relative path to be used in finding the location of tools +@@ -5826,6 +5829,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + } + break; + ++ case 'r': ++ obstack_grow (&obstack, target_relocatable_prefix, ++ strlen (target_relocatable_prefix)); ++ break; ++ + case 'S': + value = do_spec_1 (startfile_spec, 0, NULL); + if (value != 0) +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file mode 100644 index 000000000..6c85a03f4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch @@ -0,0 +1,102 @@ +From 16a326bcd126b395b29019072905bae7a5d47500 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:41:45 +0000 +Subject: [PATCH 37/47] Search target sysroot gcc version specific dirs with + multilib. + +We install the gcc libraries (such as crtbegin.p) into +//5.2.0/ +which is a default search path for GCC (aka multi_suffix in the +code below). is 'machine' in gcc's terminology. We use +these directories so that multiple gcc versions could in theory +co-exist on target. + +We only want to build one gcc-cross-canadian per arch and have this work +for all multilibs. can be handled by mapping the multilib + to the one used by gcc-cross-canadian, e.g. +mips64-polkmllib32-linux +is symlinked to by mips64-poky-linux. + +The default gcc search path in the target sysroot for a "lib64" mutlilib +is: + +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +which means that the lib32 crtbegin.o will be found and the lib64 ones +will not which leads to compiler failures. + +This patch injects a multilib version of that path first so the lib64 +binaries can be found first. With this change the search path becomes: + +/lib32/../lib64/mips64-poky-linux/5.2.0/ +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +Upstream-Status: Pending +RP 2015/7/31 + +Signed-off-by: Khem Raj +--- + gcc/gcc.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index e015c77f15f..84af5d5a2e1 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -2533,7 +2533,7 @@ for_each_path (const struct path_prefix *paths, + if (path == NULL) + { + len = paths->max_len + extra_space + 1; +- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); + path = XNEWVEC (char, len); + } + +@@ -2545,6 +2545,33 @@ for_each_path (const struct path_prefix *paths, + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { ++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) ++ { ++ const char *this_multi; ++ size_t this_multi_len; ++ ++ if (pl->os_multilib) ++ { ++ this_multi = multi_os_dir; ++ this_multi_len = multi_os_dir_len; ++ } ++ else ++ { ++ this_multi = multi_dir; ++ this_multi_len = multi_dir_len; ++ } ++ ++ /* Look in multilib MACHINE/VERSION subdirectory first */ ++ if (this_multi_len) ++ { ++ memcpy (path + len, this_multi, this_multi_len + 1); ++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); ++ ret = callback (path, callback_info); ++ if (ret) ++ break; ++ } ++ } ++ + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch new file mode 100644 index 000000000..a226d10d0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch @@ -0,0 +1,137 @@ +From 6e7f526e71a76aac3d49ba8f1742fe1b359c1060 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:42:45 +0000 +Subject: [PATCH 38/47] Fix various _FOR_BUILD and related variables + +When doing a FOR_BUILD thing, you have to override CFLAGS with +CFLAGS_FOR_BUILD. And if you use C++, you also have to override +CXXFLAGS with CXXFLAGS_FOR_BUILD. +Without this, when building for mingw, you end up trying to use +the mingw headers for a host build. + +The same goes for other variables as well, such as CPPFLAGS, +CPP, and GMPINC. + +Upstream-Status: Pending + +Signed-off-by: Peter Seebach +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + Makefile.in | 6 ++++++ + Makefile.tpl | 5 +++++ + gcc/Makefile.in | 2 +- + gcc/configure | 2 +- + gcc/configure.ac | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index e34e9555388..a03740f3f9d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -152,6 +152,7 @@ BUILD_EXPORTS = \ + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -169,6 +170,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -186,6 +190,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +@@ -734,6 +739,7 @@ BASE_FLAGS_TO_PASS = \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ ++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ + "INSTALL=$(INSTALL)" \ +diff --git a/Makefile.tpl b/Makefile.tpl +index d0fa07005be..953376c658d 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -154,6 +154,7 @@ BUILD_EXPORTS = \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -171,6 +172,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 95d21effad3..dbe2bacde50 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -795,7 +795,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ + BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) + BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ +- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) ++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) + + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') +diff --git a/gcc/configure b/gcc/configure +index 6ba391ed068..72ca6e5c535 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -11789,7 +11789,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 8551a412df3..6eefb61dc2b 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1708,7 +1708,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch new file mode 100644 index 000000000..a7aeccdf0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch @@ -0,0 +1,28 @@ +From 6d03ddfb7a092942be6b58b1830f6986d012d5e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Feb 2016 10:26:10 -0800 +Subject: [PATCH 39/47] nios2: Define MUSL_DYNAMIC_LINKER + +Signed-off-by: Marek Vasut +Signed-off-by: Khem Raj +--- +Upstream-Status: Inappropriate [OE-Specific] + + gcc/config/nios2/linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h +index 5177fa641a4..1b8accda6ee 100644 +--- a/gcc/config/nios2/linux.h ++++ b/gcc/config/nios2/linux.h +@@ -30,6 +30,7 @@ + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" + + #undef LINK_SPEC + #define LINK_SPEC LINK_SPEC_ENDIAN \ +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch new file mode 100644 index 000000000..29b7ce72d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch @@ -0,0 +1,87 @@ +From 210f6b3b82084cc756e02b8bc12f909a43b14ee8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 18:10:54 -0700 +Subject: [PATCH 40/49] Add ssp_nonshared to link commandline for musl targets + +when -fstack-protector options are enabled we need to +link with ssp_shared on musl since it does not provide +the __stack_chk_fail_local() so essentially it provides +libssp but not libssp_nonshared something like +TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED + where-as for glibc the needed symbols +are already present in libc_nonshared library therefore +we do not need any library helper on glibc based systems +but musl needs the libssp_noshared from gcc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/linux.h | 7 +++++++ + gcc/config/rs6000/linux.h | 10 ++++++++++ + gcc/config/rs6000/linux64.h | 10 ++++++++++ + 3 files changed, 27 insertions(+) + +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 2e683d0c430..1b4df798671 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ + { 0, 0, 0, 0, 0, 0 } \ + } ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++ + #endif + + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ +diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h +index 684afd6c190..22cfa391b89 100644 +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -91,6 +91,16 @@ + " -m elf32ppclinux") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #undef LINK_OS_LINUX_SPEC + #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 3b00ec0fcf0..8371f8d7b6b 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -465,6 +465,16 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \ +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch new file mode 100644 index 000000000..5260e363d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch @@ -0,0 +1,284 @@ +From 4eadc99bdd0974761bf48f0fd32994dd9a3ffcfe Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 16 Mar 2016 02:27:43 -0400 +Subject: [PATCH 41/47] gcc/libcpp: support -ffile-prefix-map== + +Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one +directory name (old) to another (new) in __FILE__, __BASE_FILE__ and +__builtin_FILE (). + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268 + +Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] +Signed-off-by: Hongxu Jia +--- + gcc/c-family/c-opts.c | 13 +++++++ + gcc/c-family/c.opt | 4 +++ + gcc/dwarf2out.c | 1 + + gcc/gimplify.c | 2 ++ + libcpp/Makefile.in | 10 +++--- + libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++ + libcpp/include/file-map.h | 30 ++++++++++++++++ + libcpp/macro.c | 2 ++ + 8 files changed, 149 insertions(+), 5 deletions(-) + create mode 100644 libcpp/file-map.c + create mode 100644 libcpp/include/file-map.h + +diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c +index ea0e01b101c..a741c75a78f 100644 +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -39,6 +39,14 @@ along with GCC; see the file COPYING3. If not see + #include "opts.h" + #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */ + #include "mkdeps.h" ++#include "file-map.h" ++#include "c-target.h" ++#include "tm.h" /* For BYTES_BIG_ENDIAN, ++ DOLLARS_IN_IDENTIFIERS, ++ STDC_0_IN_SYSTEM_HEADERS, ++ TARGET_FLT_EVAL_METHOD_NON_DEFAULT and ++ TARGET_OPTF. */ ++#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */ + #include "dumpfile.h" + + #ifndef DOLLARS_IN_IDENTIFIERS +@@ -517,6 +525,11 @@ c_common_handle_option (size_t scode, const char *arg, int value, + cpp_opts->narrow_charset = arg; + break; + ++ case OPT_ffile_prefix_map_: ++ if (add_file_prefix_map (arg) < 0) ++ error ("invalid argument %qs to -ffile-prefix-map", arg); ++ break; ++ + case OPT_fwide_exec_charset_: + cpp_opts->wide_charset = arg; + break; +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index c4ef7796282..73333dfd57c 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1372,6 +1372,10 @@ fexec-charset= + C ObjC C++ ObjC++ Joined RejectNegative + -fexec-charset= Convert all strings and character constants to character set . + ++ffile-prefix-map= ++C ObjC C++ ObjC++ Joined RejectNegative ++-ffile-prefix-map= Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE () ++ + fextended-identifiers + C ObjC C++ ObjC++ + Permit universal character names (\\u and \\U) in identifiers. +diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c +index 98c51576ec2..762f69ae88e 100644 +--- a/gcc/dwarf2out.c ++++ b/gcc/dwarf2out.c +@@ -23421,6 +23421,7 @@ gen_producer_string (void) + case OPT_fltrans_output_list_: + case OPT_fresolution_: + case OPT_fdebug_prefix_map_: ++ case OPT_ffile_prefix_map_: + /* Ignore these. */ + continue; + default: +diff --git a/gcc/gimplify.c b/gcc/gimplify.c +index fd27eb1523f..5542b379f28 100644 +--- a/gcc/gimplify.c ++++ b/gcc/gimplify.c +@@ -58,6 +58,8 @@ along with GCC; see the file COPYING3. If not see + #include "gomp-constants.h" + #include "tree-dump.h" + #include "gimple-walk.h" ++#include "file-map.h" ++ + #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */ + #include "builtins.h" + #include "asan.h" +diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in +index 0bd3787c25e..d3b52956b52 100644 +--- a/libcpp/Makefile.in ++++ b/libcpp/Makefile.in +@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE) + + + libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \ +- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \ +- mkdeps.o pch.o symtab.o traditional.o ++ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \ ++ macro.o mkdeps.o pch.o symtab.o traditional.o + + libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \ +- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \ +- mkdeps.c pch.c symtab.c traditional.c ++ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \ ++ macro.c mkdeps.c pch.c symtab.c traditional.c + + all: libcpp.a $(USED_CATALOGS) + +@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES) + + TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \ + include/line-map.h include/symtab.h include/cpp-id-data.h \ +- include/cpplib.h include/mkdeps.h system.h ++ include/cpplib.h include/mkdeps.h system.h include/file-map.h + + TAGS: $(TAGS_SOURCES) + cd $(srcdir) && etags $(TAGS_SOURCES) +diff --git a/libcpp/file-map.c b/libcpp/file-map.c +new file mode 100644 +index 00000000000..18035ef6a72 +--- /dev/null ++++ b/libcpp/file-map.c +@@ -0,0 +1,92 @@ ++/* Map one directory name to another in __FILE__, __BASE_FILE__ ++ and __builtin_FILE (). ++ Copyright (C) 2001-2016 Free Software Foundation, Inc. ++ ++This program is free software; you can redistribute it and/or modify it ++under the terms of the GNU General Public License as published by the ++Free Software Foundation; either version 3, or (at your option) any ++later version. ++ ++This program is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with this program; see the file COPYING3. If not see ++. ++ ++ In other words, you are welcome to use, share and improve this program. ++ You are forbidden to forbid anyone else to use, share and improve ++ what you give them. Help stamp out software-hoarding! */ ++ ++#include "config.h" ++#include "system.h" ++#include "file-map.h" ++ ++/* Structure recording the mapping from source file and directory ++ names at compile time to __FILE__ */ ++typedef struct file_prefix_map ++{ ++ const char *old_prefix; ++ const char *new_prefix; ++ size_t old_len; ++ size_t new_len; ++ struct file_prefix_map *next; ++} file_prefix_map; ++ ++/* Linked list of such structures. */ ++static file_prefix_map *file_prefix_maps; ++ ++/* Record prefix mapping of __FILE__. ARG is the argument to ++ -ffile-prefix-map and must be of the form OLD=NEW. */ ++int ++add_file_prefix_map (const char *arg) ++{ ++ file_prefix_map *map; ++ const char *p; ++ ++ p = strchr (arg, '='); ++ if (!p) ++ { ++ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg); ++ return -1; ++ } ++ map = XNEW (file_prefix_map); ++ map->old_prefix = xstrndup (arg, p - arg); ++ map->old_len = p - arg; ++ p++; ++ map->new_prefix = xstrdup (p); ++ map->new_len = strlen (p); ++ map->next = file_prefix_maps; ++ file_prefix_maps = map; ++ ++ return 0; ++} ++ ++/* Perform user-specified mapping of __FILE__ prefixes. Return ++ the new name corresponding to filename. */ ++ ++const char * ++remap_file_filename (const char *filename) ++{ ++ file_prefix_map *map; ++ char *s; ++ const char *name; ++ size_t name_len; ++ ++ for (map = file_prefix_maps; map; map = map->next) ++ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) ++ break; ++ if (!map) ++ return filename; ++ name = filename + map->old_len; ++ name_len = strlen (name) + 1; ++ s = (char *) alloca (name_len + map->new_len); ++ memcpy (s, map->new_prefix, map->new_len); ++ memcpy (s + map->new_len, name, name_len); ++ ++ return xstrdup (s); ++} ++ ++ +diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h +new file mode 100644 +index 00000000000..87503152d27 +--- /dev/null ++++ b/libcpp/include/file-map.h +@@ -0,0 +1,30 @@ ++/* Map one directory name to another in __FILE__, __BASE_FILE__ ++ and __builtin_FILE (). ++ Copyright (C) 2001-2016 Free Software Foundation, Inc. ++ ++This program is free software; you can redistribute it and/or modify it ++under the terms of the GNU General Public License as published by the ++Free Software Foundation; either version 3, or (at your option) any ++later version. ++ ++This program is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with this program; see the file COPYING3. If not see ++. ++ ++ In other words, you are welcome to use, share and improve this program. ++ You are forbidden to forbid anyone else to use, share and improve ++ what you give them. Help stamp out software-hoarding! */ ++ ++#ifndef LIBCPP_FILE_MAP_H ++#define LIBCPP_FILE_MAP_H ++ ++const char * remap_file_filename (const char *filename); ++ ++int add_file_prefix_map (const char *arg); ++ ++#endif /* !LIBCPP_FILE_MAP_H */ +diff --git a/libcpp/macro.c b/libcpp/macro.c +index de18c2210cf..2748c70d520 100644 +--- a/libcpp/macro.c ++++ b/libcpp/macro.c +@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see + #include "system.h" + #include "cpplib.h" + #include "internal.h" ++#include "file-map.h" + + typedef struct macro_arg macro_arg; + /* This structure represents the tokens of a macro argument. These +@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, + if (!name) + abort (); + } ++ name = remap_file_filename (name); + len = strlen (name); + buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); + result = buf; +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch new file mode 100644 index 000000000..524716790 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch @@ -0,0 +1,43 @@ +From ddddc7335539fb8a6d30beba21781762df159186 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 16 Mar 2016 05:39:59 -0400 +Subject: [PATCH 42/47] Reuse -fdebug-prefix-map to replace -ffile-prefix-map + +The oe-core may use external toolchain to compile, +which may not support -ffile-prefix-map. + +Since we use -fdebug-prefix-map to do the same thing, +so we could reuse it to replace -ffile-prefix-map. + +Upstream-Status: Inappropriate[oe-core specific] + +Signed-off-by: Hongxu Jia +--- + gcc/opts-global.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gcc/opts-global.c b/gcc/opts-global.c +index 50bad77c347..32b1d286721 100644 +--- a/gcc/opts-global.c ++++ b/gcc/opts-global.c +@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see + #include "langhooks.h" + #include "dbgcnt.h" + #include "debug.h" ++#include "file-map.h" + #include "output.h" + #include "plugin.h" + #include "toplev.h" +@@ -357,6 +358,9 @@ handle_common_deferred_options (void) + + case OPT_fdebug_prefix_map_: + add_debug_prefix_map (opt->arg); ++ ++ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */ ++ add_file_prefix_map (opt->arg); + break; + + case OPT_fdump_: +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch new file mode 100644 index 000000000..74a5c8644 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch @@ -0,0 +1,54 @@ +From 5bc97be388485a5f8dd85db34372a1299bffd263 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 24 Mar 2016 11:23:14 -0400 +Subject: [PATCH 43/47] gcc/final.c: -fdebug-prefix-map support to remap + sources with relative path + +PR other/70428 +* final.c (remap_debug_filename): Use lrealpath to translate +relative path before remapping + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428 +Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] + +Signed-off-by: Hongxu Jia +--- + gcc/final.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/gcc/final.c b/gcc/final.c +index 820162b2d28..d74cb901abd 100644 +--- a/gcc/final.c ++++ b/gcc/final.c +@@ -1559,16 +1559,25 @@ remap_debug_filename (const char *filename) + const char *name; + size_t name_len; + ++ /* Support to remap filename with relative path */ ++ char *realpath = lrealpath (filename); ++ if (realpath == NULL) ++ return filename; ++ + for (map = debug_prefix_maps; map; map = map->next) +- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) ++ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0) + break; + if (!map) +- return filename; +- name = filename + map->old_len; ++ { ++ free (realpath); ++ return filename; ++ } ++ name = realpath + map->old_len; + name_len = strlen (name) + 1; + s = (char *) alloca (name_len + map->new_len); + memcpy (s, map->new_prefix, map->new_len); + memcpy (s + map->new_len, name, name_len); ++ free (realpath); + return ggc_strdup (s); + } + +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch new file mode 100644 index 000000000..e39af9b1a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch @@ -0,0 +1,124 @@ +From 847aec764540636ec654fd7a012e271afa8d4e0f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Apr 2016 20:03:28 +0000 +Subject: [PATCH 44/47] libgcc: Add knob to use ldbl-128 on ppc + +musl does not support ldbl 128 so we can not assume +that linux as a whole supports ldbl-128 bits, instead +act upon configure option passed to gcc and assume no +on musl and yes otherwise if no option is passed since +default behaviour is to assume ldbl128 it does not +change the defaults + +Signed-off-by: Khem Raj +Upstream-Status: Pending +--- + libgcc/Makefile.in | 1 + + libgcc/config/rs6000/t-linux | 5 ++++- + libgcc/configure | 18 ++++++++++++++++++ + libgcc/configure.ac | 12 ++++++++++++ + 4 files changed, 35 insertions(+), 1 deletion(-) + mode change 100644 => 100755 libgcc/configure + +diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in +index a1a392de88d..2fe6889a342 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -48,6 +48,7 @@ unwind_header = @unwind_header@ + md_unwind_header = @md_unwind_header@ + sfp_machine_header = @sfp_machine_header@ + thread_header = @thread_header@ ++with_ldbl128 = @with_ldbl128@ + + host_noncanonical = @host_noncanonical@ + real_host_noncanonical = @real_host_noncanonical@ +diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux +index 4f6d4c4a4d2..c50dd94a2da 100644 +--- a/libgcc/config/rs6000/t-linux ++++ b/libgcc/config/rs6000/t-linux +@@ -1,3 +1,6 @@ + SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc ++ifeq ($(with_ldbl128),yes) ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 ++endif ++HOST_LIBGCC2_CFLAGS += -mno-minimal-toc +diff --git a/libgcc/configure b/libgcc/configure +old mode 100644 +new mode 100755 +index 45c459788c3..e2d19b144b8 +--- a/libgcc/configure ++++ b/libgcc/configure +@@ -618,6 +618,7 @@ build_vendor + build_cpu + build + with_aix_soname ++with_ldbl128 + enable_vtable_verify + enable_shared + libgcc_topdir +@@ -667,6 +668,7 @@ with_cross_host + with_ld + enable_shared + enable_vtable_verify ++with_long_double_128 + with_aix_soname + enable_version_specific_runtime_libs + with_slibdir +@@ -1324,6 +1326,7 @@ Optional Packages: + --with-target-subdir=SUBDIR Configuring in a subdirectory for target + --with-cross-host=HOST Configuring with a cross compiler + --with-ld arrange to use the specified ld (full pathname) ++ --with-long-double-128 use 128-bit long double by default + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX +@@ -2208,6 +2211,21 @@ fi + + + ++# Check whether --with-long-double-128 was given. ++if test "${with_long_double_128+set}" = set; then : ++ withval=$with_long_double_128; with_ldbl128="$with_long_double_128" ++else ++ case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++ ++fi ++ ++ ++ ++ + # Check whether --with-aix-soname was given. + if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case "${host}:${enable_shared}" in +diff --git a/libgcc/configure.ac b/libgcc/configure.ac +index af151473709..dada52416da 100644 +--- a/libgcc/configure.ac ++++ b/libgcc/configure.ac +@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify, + [enable_vtable_verify=no]) + AC_SUBST(enable_vtable_verify) + ++AC_ARG_WITH(long-double-128, ++[AS_HELP_STRING([--with-long-double-128], ++ [use 128-bit long double by default])], ++ with_ldbl128="$with_long_double_128", ++[case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++]) ++AC_SUBST(with_ldbl128) ++ + AC_ARG_WITH(aix-soname, + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX])], +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch new file mode 100644 index 000000000..3aa038c91 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch @@ -0,0 +1,29 @@ +From 92beb883ab57a23a35ba76c496bc1f4cabb1690e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 May 2016 21:11:34 -0700 +Subject: [PATCH 45/47] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson +Signed-off-by: Khem Raj +--- + libgcc/config/t-slibgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +index 76be7710960..a1ee2ee26ed 100644 +--- a/libgcc/config/t-slibgcc ++++ b/libgcc/config/t-slibgcc +@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ +- $(SHLIB_LDFLAGS) \ ++ $(LDFLAGS) $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ + $(SHLIB_OBJS) $(SHLIB_LC) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch new file mode 100644 index 000000000..65d22f169 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch @@ -0,0 +1,91 @@ +From 9b951c8f6b0aaff7c16dc4db72b5e56ec73810bb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 3 Feb 2017 12:56:00 -0800 +Subject: [PATCH 47/47] sync gcc stddef.h with musl + +musl defines ptrdiff_t size_t and wchar_t +so dont define them here if musl is definining them + +Signed-off-by: Khem Raj +--- +Upstream-Status: Inappropriate [OE-Specific] + + gcc/ginclude/stddef.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 872f451cac9..7e90938387c 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -134,6 +134,7 @@ _TYPE_wchar_t; + #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T + #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ ++#ifndef __DEFINED_ptrdiff_t /* musl */ + #define _PTRDIFF_T + #define _T_PTRDIFF_ + #define _T_PTRDIFF +@@ -143,10 +144,12 @@ _TYPE_wchar_t; + #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T + #define _PTRDIFF_T_DECLARED ++#define __DEFINED_ptrdiff_t /* musl */ + #ifndef __PTRDIFF_TYPE__ + #define __PTRDIFF_TYPE__ long int + #endif + typedef __PTRDIFF_TYPE__ ptrdiff_t; ++#endif /* __DEFINED_ptrdiff_t */ + #endif /* _PTRDIFF_T_DECLARED */ + #endif /* _GCC_PTRDIFF_T */ + #endif /* ___int_ptrdiff_t_h */ +@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__DragonFly__) \ + || defined(__FreeBSD_kernel__) +@@ -235,6 +240,7 @@ typedef long ssize_t; + #endif /* _SIZE_T */ + #endif /* __SIZE_T__ */ + #endif /* __size_t__ */ ++#endif /* __DEFINED_size_t */ + #undef __need_size_t + #endif /* _STDDEF_H or __need_size_t. */ + +@@ -264,6 +270,7 @@ typedef long ssize_t; + #ifndef ___int_wchar_t_h + #ifndef __INT_WCHAR_T_H + #ifndef _GCC_WCHAR_T ++#ifndef __DEFINED_wchar_t /* musl */ + #define __wchar_t__ /* BeOS */ + #define __WCHAR_T__ /* Cray Unicos/Mk */ + #define _WCHAR_T +@@ -279,6 +286,7 @@ typedef long ssize_t; + #define __INT_WCHAR_T_H + #define _GCC_WCHAR_T + #define _WCHAR_T_DECLARED ++#define __DEFINED_wchar_t /* musl */ + + /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ + instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other +@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t; + #endif + #endif /* __WCHAR_T__ */ + #endif /* __wchar_t__ */ ++#endif /* __DEFINED_wchar_t musl */ + #undef __need_wchar_t + #endif /* _STDDEF_H or __need_wchar_t. */ + +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch new file mode 100644 index 000000000..a96e91339 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch @@ -0,0 +1,46 @@ +From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 13 Jun 2017 12:12:52 -0700 +Subject: [PATCH 49/49] gcc: Enable static PIE + +Static PIE support in GCC +see +https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html + +startfiles before patch: + -static -> crt1.o crti.o crtbeginT.o + -static -PIE -> crt1.o crti.o crtbeginT.o + +after patch: + -static -> crt1.o crti.o crtbeginT.o + -static -PIE -> rcrt1.o crti.o crtbeginS.o + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky + +--- + gcc/config/gnu-user.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index de605b0..b035bbe 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -52,11 +52,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{shared:; \ + pg|p|profile:gcrt1.o%s; \ +- static:crt1.o%s; \ ++ static: %{" PIE_SPEC ": rcrt1.o%s; :crt1.o%s}; \ + " PIE_SPEC ":Scrt1.o%s; \ + :crt1.o%s} \ + crti.o%s \ +- %{static:crtbeginT.o%s; \ ++ %{static: %{" PIE_SPEC ": crtbeginS.o%s; :crtbeginT.o%s}; \ + shared|" PIE_SPEC ":crtbeginS.o%s; \ + :crtbegin.o%s} \ + %{fvtable-verify=none:%s; \ + +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch new file mode 100644 index 000000000..5a14d04b6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch @@ -0,0 +1,51 @@ +From 16210e6270e200cd4892a90ecef608906be3a130 Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Thu, 4 May 2017 02:11:13 +0800 +Subject: [PATCH] RISC-V: Handle non-legitimate address in + riscv_legitimize_move + +GCC may generate non-legitimate address due to we allow some +load/store with non-legitimate address in pic.md. + + 2017-05-12 Kito Cheng + + * config/riscv/riscv.c (riscv_legitimize_move): Handle + non-legitimate address. +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj + + gcc/ChangeLog | 5 +++++ + gcc/config/riscv/riscv.c | 16 ++++++++++++++++ + 2 files changed, 21 insertions(+) + +diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c +index f7fec4bfcf8..d519be1659a 100644 +--- a/gcc/config/riscv/riscv.c ++++ b/gcc/config/riscv/riscv.c +@@ -1385,6 +1385,22 @@ riscv_legitimize_move (enum machine_mode mode, rtx dest, rtx src) + return true; + } + ++ /* RISC-V GCC may generate non-legitimate address due to we provide some ++ pattern for optimize access PIC local symbol and it's make GCC generate ++ unrecognizable instruction during optmizing. */ ++ ++ if (MEM_P (dest) && !riscv_legitimate_address_p (mode, XEXP (dest, 0), ++ reload_completed)) ++ { ++ XEXP (dest, 0) = riscv_force_address (XEXP (dest, 0), mode); ++ } ++ ++ if (MEM_P (src) && !riscv_legitimate_address_p (mode, XEXP (src, 0), ++ reload_completed)) ++ { ++ XEXP (src, 0) = riscv_force_address (XEXP (src, 0), mode); ++ } ++ + return false; + } + +-- +2.14.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch new file mode 100644 index 000000000..c0adef6f2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch @@ -0,0 +1,49 @@ + +Prevent a segmentation fault which occurs when using incorrect +structure trying to access name of some named operators, such as +CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in +those cases, as is may not be initialized at all. + + +[YOCTO #11738] + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky + +diff --git a/libcpp/lex.c b/libcpp/lex.c +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -3229,11 +3229,27 @@ + spell_ident: + case SPELL_IDENT: + if (forstring) +- { +- memcpy (buffer, NODE_NAME (token->val.node.spelling), +- NODE_LEN (token->val.node.spelling)); +- buffer += NODE_LEN (token->val.node.spelling); +- } ++ { ++ if (token->type == CPP_NAME) ++ { ++ memcpy (buffer, NODE_NAME (token->val.node.spelling), ++ NODE_LEN (token->val.node.spelling)); ++ buffer += NODE_LEN (token->val.node.spelling); ++ break; ++ } ++ /* NAMED_OP, cannot use node.spelling */ ++ if (token->flags & NAMED_OP) ++ { ++ const char *str = cpp_named_operator2name (token->type); ++ if (str) ++ { ++ size_t len = strlen(str); ++ memcpy(buffer, str, len); ++ buffer += len; ++ } ++ break; ++ } ++ } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc index 857aa8f50..aa3b53e64 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc @@ -43,7 +43,7 @@ def get_gcc_ppc_plt_settings(bb, d): return "" def get_long_double_setting(bb, d): - if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'uclibc', 'glibc' ]: + if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'glibc' ]: return "--with-long-double-128" else: return "--without-long-double-128" @@ -105,6 +105,7 @@ gcclibdir = "${libdir}/gcc" BINV = "${PV}" #S = "${WORKDIR}/gcc-${PV}" S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" + B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" target_includedir ?= "${includedir}" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc index 00ef89ec5..e2ce234aa 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -22,6 +22,8 @@ EXTRA_OECONF_INITIAL ?= "" GCCMULTILIB ?= "--disable-multilib" GCCTHREADS ?= "posix" +GCCPIE ??= "" + EXTRA_OECONF = "\ ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \ --with-gnu-ld \ @@ -29,6 +31,7 @@ EXTRA_OECONF = "\ --enable-languages=${LANGUAGES} \ --enable-threads=${GCCTHREADS} \ ${GCCMULTILIB} \ + ${GCCPIE} \ --enable-c99 \ --enable-long-long \ --enable-symvers=gnu \ @@ -53,9 +56,7 @@ export gcc_cv_collect2_libs = 'none required' # in the config.log files (which might not get generated until do_compile # hence being missed by the insane do_configure check). -# Build uclibc compilers without cxa_atexit support EXTRA_OECONF_append_linux = " --enable-__cxa_atexit" -EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit" EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" @@ -66,14 +67,6 @@ EXTRA_OECONF_append_mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6" EXTRA_OECONF_append_mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6" EXTRA_OECONF_append_mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6" -# ARMv6+ adds atomic instructions that affect the ABI in libraries built -# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a -# compatible architecture. armv6 and armv7a cover the minimum tune -# features used in OE. -EXTRA_OECONF_append_armv6 = " --with-arch=armv6" -EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a" -EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a" - EXTRA_OECONF_GCC_FLOAT ??= "" CPPFLAGS = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index ec1d28180..6d77620df 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc @@ -60,6 +60,7 @@ do_configure () { do_compile () { oe_runmake all-host configure-target-libgcc + (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) } # Having anything auto depending on gcc-cross-sdk is a really bad idea... @@ -80,7 +81,7 @@ FILES_${PN} = "\ ${includedir}/c++/${BINV} \ ${prefix}/${TARGET_SYS}/bin/* \ ${prefix}/${TARGET_SYS}/lib/* \ - ${prefix}/${TARGET_SYS}/usr/include/* \ + ${prefix}/${TARGET_SYS}${target_includedir}/* \ " INSANE_SKIP_${PN} += "dev-so" @@ -96,7 +97,7 @@ EXEEXT = "" BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" do_install () { - ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h ) + ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) oe_runmake 'DESTDIR=${D}' install-host # Cleanup some of the ${libdir}{,exec}/gcc stuff ... @@ -153,7 +154,7 @@ ELFUTILS = "nativesdk-elfutils" DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib" RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}" -SYSTEMHEADERS = "/usr/include" +SYSTEMHEADERS = "${target_includedir}/" SYSTEMLIBS = "${target_base_libdir}/" SYSTEMLIBS1 = "${target_libdir}/" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb deleted file mode 100644 index bf53c5cd7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb +++ /dev/null @@ -1,5 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require gcc-cross-canadian.inc - - - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb new file mode 100644 index 000000000..bf53c5cd7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-cross-canadian.inc + + + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc index 9502c2b1a..892b1dbf2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc @@ -35,10 +35,11 @@ EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}" do_compile () { oe_runmake all-gcc configure-target-libgcc + (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) } do_install () { - ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h ) + ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h) oe_runmake 'DESTDIR=${D}' install-gcc # We don't really need this (here shares/ contains man/, info/, locale/). diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb deleted file mode 100644 index 4c73e5ce6..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-devtools/gcc/gcc-cross_${PV}.bb -require gcc-cross-initial.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb new file mode 100644 index 000000000..4c73e5ce6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-cross_${PV}.bb +require gcc-cross-initial.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc index 45985c384..1e184a60d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc @@ -57,6 +57,7 @@ do_compile () { export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" oe_runmake all-host configure-target-libgcc + (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) # now generate script to drive testing echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc set >> ${B}/${TARGET_PREFIX}testgcc @@ -155,22 +156,24 @@ INHIBIT_PACKAGE_STRIP = "1" BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" do_install () { - ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h ) + ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) oe_runmake 'DESTDIR=${D}' install-host install -d ${D}${target_base_libdir} install -d ${D}${target_libdir} - + # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 # gfortran is fully backwards compatible. This is a safe and practical solution. - ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true + if [ -n "${@d.getVar('FORTRAN')}" ]; then + ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true + fortsymlinks="g77 gfortran" + fi - # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are # found. These need to be relative paths so they work in different locations. dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest - for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do + for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t done diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb deleted file mode 100644 index b43cca0c5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require gcc-cross.inc - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb new file mode 100644 index 000000000..b43cca0c5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-cross.inc + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb deleted file mode 100644 index fd90e1140..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb -require gcc-crosssdk-initial.inc - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb new file mode 100644 index 000000000..fd90e1140 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb +require gcc-crosssdk-initial.inc + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb deleted file mode 100644 index 40a6c4fef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-devtools/gcc/gcc-cross_${PV}.bb -require gcc-crosssdk.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb new file mode 100644 index 000000000..40a6c4fef --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-cross_${PV}.bb +require gcc-crosssdk.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc index 0dc405c59..ee08529a5 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -34,7 +34,6 @@ RUNTIMETARGET_remove_libc-musl = "libmpx" do_configure () { export CXX="${CXX} -nostdinc++ -nostdlib++" - for d in libgcc ${RUNTIMETARGET}; do echo "Configuring $d" rm -rf ${B}/${TARGET_SYS}/$d/ @@ -43,6 +42,9 @@ do_configure () { chmod a+x ${S}/$d/configure relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")} $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} + if [ "$d" = "libgcc" ]; then + (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) + fi done } EXTRACONFFUNCS += "extract_stashed_builddir" @@ -99,8 +101,8 @@ do_install_append_class-target () { if [ "${TCLIBC}" != "glibc" ]; then case "${TARGET_OS}" in - "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";; - "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";; + "linux-musl" | "linux-*spe") extra_target_os="linux";; + "linux-musleabi") extra_target_os="linux-gnueabi";; *) extra_target_os="linux";; esac ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb deleted file mode 100644 index 8f31e7792..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require gcc-runtime.inc - -FILES_libgomp-dev += "\ - ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ -" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb new file mode 100644 index 000000000..8f31e7792 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb @@ -0,0 +1,7 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-runtime.inc + +FILES_libgomp-dev += "\ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ +" + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc index f97885b37..3183b29de 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc @@ -97,6 +97,7 @@ FILES_libtsan += "${libdir}/libtsan.so.*" FILES_libtsan-dev += "\ ${libdir}/libtsan.so \ ${libdir}/libtsan.la \ + ${libdir}/libtsan_*.o \ " FILES_libtsan-staticdev += "${libdir}/libtsan.a" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb deleted file mode 100644 index 601f66602..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require gcc-sanitizers.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb new file mode 100644 index 000000000..601f66602 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-sanitizers.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb deleted file mode 100644 index b890fa33e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb +++ /dev/null @@ -1,4 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require recipes-devtools/gcc/gcc-source.inc - -EXCLUDE_FROM_WORLD = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb new file mode 100644 index 000000000..b890fa33e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb @@ -0,0 +1,4 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-source.inc + +EXCLUDE_FROM_WORLD = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc index eef4434db..b6e31f5d9 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc @@ -9,6 +9,14 @@ EXTRA_OECONF_PATHS = "\ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" +# ARMv6+ adds atomic instructions that affect the ABI in libraries built +# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a +# compatible architecture. armv6 and armv7a cover the minimum tune +# features used in OE. +EXTRA_OECONF_append_armv6 = " --with-arch=armv6" +EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a" +EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a" + # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is # set in subdir gcc, so subdir libcc1 can't use it, export it here to # fix the problem. diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb deleted file mode 100644 index 2c618dfb9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb +++ /dev/null @@ -1,9 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require gcc-target.inc - -# Building with thumb enabled on armv4t fails with -# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs -# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output -ARM_INSTRUCTION_SET_armv4 = "arm" - -BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb new file mode 100644 index 000000000..ab208e702 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb @@ -0,0 +1,10 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-target.inc + +# Building with thumb enabled on armv4t armv5t fails with +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb deleted file mode 100644 index 19f253fce..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require libgcc-initial.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb new file mode 100644 index 000000000..19f253fce --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require libgcc-initial.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc index 38d1643a9..1500fb5ac 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc @@ -5,8 +5,8 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" do_install_append_class-target () { if [ "${TCLIBC}" != "glibc" ]; then case "${TARGET_OS}" in - "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";; - "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";; + "linux-musl" | "linux-*spe") extra_target_os="linux";; + "linux-musleabi") extra_target_os="linux-gnueabi";; *) extra_target_os="linux";; esac ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb deleted file mode 100644 index a5152f28e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require libgcc.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb new file mode 100644 index 000000000..a5152f28e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require libgcc.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc index 4846decbb..5f5d4af75 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc @@ -37,7 +37,7 @@ do_install () { } INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "gcc-runtime" +DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}" BBCLASSEXTEND = "nativesdk" @@ -54,6 +54,7 @@ FILES_${PN}-dev = "\ ${libdir}/libgfortran.la \ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \ " FILES_${PN}-staticdev = "${libdir}/libgfortran.a" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb deleted file mode 100644 index 71dd8b4bd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -require recipes-devtools/gcc/gcc-${PV}.inc -require libgfortran.inc - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb new file mode 100644 index 000000000..71dd8b4bd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require libgfortran.inc + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc deleted file mode 100644 index 634756ce4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc +++ /dev/null @@ -1,22 +0,0 @@ -LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" - -SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ - file://0001-include-sys-types.h-for-mode_t.patch \ - file://0002-make-man-install-relative-to-DESTDIR.patch \ - file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ - file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ - file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \ - file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \ - file://0007-use-asm-sgidefs.h.patch \ - file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ - file://0009-Change-order-of-CFLAGS.patch \ - file://0010-resolve-restrict-keyword-conflict.patch \ - file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ -" -SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b" -SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc new file mode 100644 index 000000000..fba32ce12 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc @@ -0,0 +1,22 @@ +LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" + +SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ + file://0001-include-sys-types.h-for-mode_t.patch \ + file://0002-make-man-install-relative-to-DESTDIR.patch \ + file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \ + file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0007-use-asm-sgidefs.h.patch \ + file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ + file://0009-Change-order-of-CFLAGS.patch \ + file://0010-resolve-restrict-keyword-conflict.patch \ + file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ +" +SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88" +SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee" + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc index 239b37586..9164a2bba 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc @@ -5,7 +5,6 @@ DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST}" LTTNGUST = "lttng-ust" LTTNGUST_aarch64 = "" -LTTNGUST_libc-uclibc = "" LTTNGUST_mipsarch = "" LTTNGUST_sh4 = "" LTTNGUST_libc-musl = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb deleted file mode 100644 index 301035940..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb +++ /dev/null @@ -1,3 +0,0 @@ -require gdb-common.inc -require gdb-cross-canadian.inc -require gdb-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb new file mode 100644 index 000000000..301035940 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb @@ -0,0 +1,3 @@ +require gdb-common.inc +require gdb-cross-canadian.inc +require gdb-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb deleted file mode 100644 index 50cf159fd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require gdb-cross.inc -require gdb-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb new file mode 100644 index 000000000..50cf159fd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb @@ -0,0 +1,2 @@ +require gdb-cross.inc +require gdb-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch index fc6c92f18..4f06d46d7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch @@ -1,4 +1,4 @@ -From 2c81e17216b4e471a1ce0bddb50f374b0722a2ce Mon Sep 17 00:00:00 2001 +From 91da0458b333249eb9c2f4c1f1e53fa4bc085cc9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 19 Jan 2016 18:18:52 -0800 Subject: [PATCH 01/10] include sys/types.h for mode_t @@ -14,7 +14,7 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h -index 4c14c204bb..bdab18f7f7 100644 +index 3cc2bc4bab..e6b19b06b9 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -28,6 +28,7 @@ @@ -26,5 +26,5 @@ index 4c14c204bb..bdab18f7f7 100644 struct emit_ops; struct buffer; -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch index 9a9201b39..83c4dded3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch @@ -1,4 +1,4 @@ -From f316d604b312bead78594f02e1355633eda9507b Mon Sep 17 00:00:00 2001 +From 9ce61f97b7758794f06894e934fbb256ff62163e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 02:27:55 +0000 Subject: [PATCH 02/10] make man install relative to DESTDIR @@ -11,7 +11,7 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in -index a05f50767a..8d0fa64ea8 100644 +index 3944956b5d..aa355e8347 100644 --- a/sim/common/Makefile.in +++ b/sim/common/Makefile.in @@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias) @@ -24,5 +24,5 @@ index a05f50767a..8d0fa64ea8 100644 includedir = @includedir@ -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch index 74c00063e..6f7955be1 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch @@ -1,4 +1,4 @@ -From f2912b1d2e5c854a112176682903b696da33e003 Mon Sep 17 00:00:00 2001 +From ca0ef06b7320912df350e730e63f9bafdaa6ea70 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 23 Mar 2016 06:30:09 +0000 Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined @@ -17,10 +17,10 @@ Upstream-Status: Pending 1 file changed, 5 insertions(+) diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c -index 0f20f16814..722532bb6c 100644 +index 8041d84be7..f2df1b9907 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c -@@ -46,6 +46,11 @@ +@@ -47,6 +47,11 @@ #define PTRACE_GET_THREAD_AREA 25 #endif @@ -33,5 +33,5 @@ index 0f20f16814..722532bb6c 100644 we'll clear this and use PTRACE_PEEKUSER instead. */ static int have_ptrace_regsets = 1; -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch index 847f24f7f..357db25ec 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -1,6 +1,6 @@ -From 7ef7b709885378279c424eab0510b93233400b24 Mon Sep 17 00:00:00 2001 +From 0f6d71118ca914002fcad78d2c8a518223d06bfb Mon Sep 17 00:00:00 2001 From: Khem Raj -Date: Sat, 6 Aug 2016 17:32:50 -0700 +Date: Sat, 30 Apr 2016 18:32:14 -0700 Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj 2 files changed, 12 insertions(+) diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c -index 1d013f185f..68098b3db9 100644 +index 33a9feb12c..1a9141faef 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c @@ -21,7 +21,13 @@ @@ -31,7 +31,7 @@ index 1d013f185f..68098b3db9 100644 #include "nat/ppc-linux.h" #include "linux-ppc-tdesc.h" diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index 85fbcd84bb..cbec9c53b2 100644 +index 5837ea1767..7233929192 100644 --- a/gdb/nat/ppc-linux.h +++ b/gdb/nat/ppc-linux.h @@ -18,7 +18,13 @@ @@ -49,5 +49,5 @@ index 85fbcd84bb..cbec9c53b2 100644 /* This sometimes isn't defined. */ -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch index d0c15f628..cb1b7abd0 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch @@ -1,4 +1,4 @@ -From 6649e2cccfb11dec076abb02eae0afab95614829 Mon Sep 17 00:00:00 2001 +From 60ac68f601885ea6480229a5c8a89a0257da376c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2015 02:31:12 +0000 Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture. @@ -13,7 +13,7 @@ Bug-Debian: http://bugs.debian.org/576242 Upstream-Status: Pending Signed-off-by: Khem Raj --- - gdb/Makefile.in | 1 + + gdb/Makefile.in | 2 + gdb/configure.host | 1 + gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++ gdb/sh-tdep.c | 54 ++-- @@ -24,25 +24,26 @@ Signed-off-by: Khem Raj gdb/testsuite/gdb.base/annota3.c | 4 + gdb/testsuite/gdb.base/sigall.c | 3 + gdb/testsuite/gdb.base/signals.c | 4 + - 11 files changed, 617 insertions(+), 29 deletions(-) + 11 files changed, 618 insertions(+), 29 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index 7b2df86878..10f1266fe3 100644 +index 8be73ba423..e287ff6a2e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1750,6 +1750,7 @@ ALLDEPFILES = \ - score-tdep.c \ - ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \ - sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ -+ sh-linux-tdep.c sh-linux-nat.c \ +@@ -2638,6 +2638,8 @@ ALLDEPFILES = \ + sh-nbsd-tdep.c \ + sh-tdep.c \ + sh64-tdep.c \ ++ sh-linux-tdep.c \ ++ sh-linux-nat.c \ sol2-tdep.c \ - solib-svr4.c \ - sparc-linux-nat.c sparc-linux-tdep.c \ + solib-aix.c \ + solib-spu.c \ diff --git a/gdb/configure.host b/gdb/configure.host -index ef265ebe29..322a1e2c67 100644 +index d74fd04934..be12de1446 100644 --- a/gdb/configure.host +++ b/gdb/configure.host -@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;; +@@ -150,6 +150,7 @@ powerpc*-*-linux*) gdb_host=linux ;; s390*-*-linux*) gdb_host=linux ;; @@ -51,7 +52,7 @@ index ef265ebe29..322a1e2c67 100644 gdb_host=nbsd ;; sh*-*-openbsd*) gdb_host=nbsd ;; diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c -index 2418d25010..ac8ea9e2a4 100644 +index c5c745d218..84e539aad3 100644 --- a/gdb/sh-linux-tdep.c +++ b/gdb/sh-linux-tdep.c @@ -18,14 +18,37 @@ @@ -599,7 +600,7 @@ index 2418d25010..ac8ea9e2a4 100644 /* GNU/Linux uses SVR4-style shared libraries. */ diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c -index 694f5f742d..8d54df7a1a 100644 +index 2c2b26847d..14f5281ed4 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -21,6 +21,9 @@ @@ -620,7 +621,7 @@ index 694f5f742d..8d54df7a1a 100644 #include "doublest.h" #include "osabi.h" #include "reggroups.h" -@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = { +@@ -68,23 +72,6 @@ static const char *const sh_cc_enum[] = { static const char *sh_active_calling_convention = sh_cc_gcc; @@ -644,7 +645,7 @@ index 694f5f742d..8d54df7a1a 100644 static int sh_is_renesas_calling_convention (struct type *func_type) { -@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type) +@@ -1052,7 +1039,7 @@ sh_treat_as_flt_p (struct type *type) return 0; /* Otherwise if the type of that member is float, the whole type is treated as float. */ @@ -653,7 +654,7 @@ index 694f5f742d..8d54df7a1a 100644 return 1; /* Otherwise it's not treated as float. */ return 0; -@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, +@@ -1102,7 +1089,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -662,7 +663,7 @@ index 694f5f742d..8d54df7a1a 100644 len = TYPE_LENGTH (type); val = sh_justify_value_in_reg (gdbarch, args[argnum], len); -@@ -1819,7 +1806,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, +@@ -1828,7 +1815,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, reg->how = DWARF2_FRAME_REG_UNDEFINED; } @@ -671,7 +672,7 @@ index 694f5f742d..8d54df7a1a 100644 sh_alloc_frame_cache (void) { struct sh_frame_cache *cache; -@@ -1846,7 +1833,7 @@ sh_alloc_frame_cache (void) +@@ -1855,7 +1842,7 @@ sh_alloc_frame_cache (void) return cache; } @@ -680,7 +681,7 @@ index 694f5f742d..8d54df7a1a 100644 sh_frame_cache (struct frame_info *this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); -@@ -1913,9 +1900,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) +@@ -1922,9 +1909,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) return cache; } @@ -693,7 +694,7 @@ index 694f5f742d..8d54df7a1a 100644 { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); -@@ -1929,7 +1916,7 @@ sh_frame_prev_register (struct frame_info *this_frame, +@@ -1938,7 +1925,7 @@ sh_frame_prev_register (struct frame_info *this_frame, the current frame. Frob regnum so that we pull the value from the correct place. */ if (regnum == gdbarch_pc_regnum (gdbarch)) @@ -702,7 +703,7 @@ index 694f5f742d..8d54df7a1a 100644 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) return frame_unwind_got_memory (this_frame, regnum, -@@ -2238,8 +2225,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, +@@ -2247,8 +2234,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, static struct gdbarch * sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { @@ -712,7 +713,7 @@ index 694f5f742d..8d54df7a1a 100644 /* SH5 is handled entirely in sh64-tdep.c. */ if (info.bfd_arch_info->mach == bfd_mach_sh5) -@@ -2255,6 +2242,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -2264,6 +2251,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); @@ -731,7 +732,7 @@ index 694f5f742d..8d54df7a1a 100644 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); -@@ -2405,10 +2404,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -2418,10 +2417,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; } @@ -745,7 +746,7 @@ index 694f5f742d..8d54df7a1a 100644 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h -index 666968f787..62c65b55ea 100644 +index d15ef050e0..c4642cefa4 100644 --- a/gdb/sh-tdep.h +++ b/gdb/sh-tdep.h @@ -21,6 +21,12 @@ @@ -828,7 +829,7 @@ index 666968f787..62c65b55ea 100644 where each general-purpose register is stored inside the associated core file section. */ diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp -index 6d9aef81bb..5b66b429d1 100644 +index e07e5543f2..f5e60e1002 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -116,6 +116,11 @@ switch -glob -- [istarget] { @@ -917,5 +918,5 @@ index 756606880f..1205a9bc9c 100644 static int count = 0; -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch index 5ed8e81e4..8b1395810 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch @@ -1,4 +1,4 @@ -From 2a6e28ad5c0cad189a3697d96de031e4713052b8 Mon Sep 17 00:00:00 2001 +From 5c92ebd5e117e4cf118c984171e0703dfcfb8cd8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Apr 2016 15:25:03 -0700 Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static @@ -19,10 +19,10 @@ Signed-off-by: Khem Raj 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.def b/Makefile.def -index ea8453e851..0fc66c694b 100644 +index 0d13f037d0..8bcd86e13f 100644 --- a/Makefile.def +++ b/Makefile.def -@@ -104,7 +104,8 @@ host_modules= { module= libiconv; +@@ -105,7 +105,8 @@ host_modules= { module= libiconv; missing= install-html; missing= install-info; }; host_modules= { module= m4; }; @@ -33,10 +33,10 @@ index ea8453e851..0fc66c694b 100644 host_modules= { module= sim; }; host_modules= { module= texinfo; no_install= true; }; diff --git a/Makefile.in b/Makefile.in -index cb0136e8f8..55f9085c16 100644 +index 3acb83b8de..e348907128 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -25385,7 +25385,7 @@ configure-readline: +@@ -25470,7 +25470,7 @@ configure-readline: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ @@ -46,5 +46,5 @@ index cb0136e8f8..55f9085c16 100644 @endif readline -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch index a42c9fd2a..33b4c30ee 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch @@ -1,4 +1,4 @@ -From d7543b44255da4ae71447d4e4d63e0b6aa4ed909 Mon Sep 17 00:00:00 2001 +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Sat, 30 Apr 2016 15:29:06 -0700 Subject: [PATCH 07/10] use @@ -19,7 +19,7 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c -index 722532bb6c..51d8fc8f66 100644 +index f2df1b9907..d24664cb56 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -31,7 +31,7 @@ @@ -30,7 +30,7 @@ index 722532bb6c..51d8fc8f66 100644 +#include #include "nat/gdb_ptrace.h" #include - + #include "inf-ptrace.h" -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch index ae9cb8c0e..4f64dea25 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch @@ -1,4 +1,4 @@ -From aacd77184da1328908da41c9fdb55ad881fa0e99 Mon Sep 17 00:00:00 2001 +From d3f240b38eed7cd08f6c50ea896572f1327b437a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Apr 2016 15:31:40 -0700 Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN @@ -20,10 +20,10 @@ Signed-off-by: Khem Raj 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c -index 5d5efa0af4..e3420b49a0 100644 +index 8b29245c3d..f424ae9711 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -5022,6 +5022,6 @@ lin_thread_get_thread_signals (sigset_t *set) +@@ -5021,6 +5021,6 @@ lin_thread_get_thread_signals (sigset_t *set) /* NPTL reserves the first two RT signals, but does not provide any way for the debugger to query the signal numbers - fortunately they don't change. */ @@ -33,12 +33,12 @@ index 5d5efa0af4..e3420b49a0 100644 + sigaddset (set, SIGRTMIN + 1); } diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h -index 2b485db141..d058afcde8 100644 +index 7dd18fefff..35137ab34f 100644 --- a/gdb/nat/linux-nat.h +++ b/gdb/nat/linux-nat.h -@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp); +@@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp); - extern void linux_stop_lwp (struct lwp_info *lwp); + extern int lwp_is_stepping (struct lwp_info *lwp); +#ifndef W_STOPCODE +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) @@ -46,5 +46,5 @@ index 2b485db141..d058afcde8 100644 + #endif /* LINUX_NAT_H */ -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch index ed6e0aeb7..0c103ef3f 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch @@ -1,4 +1,4 @@ -From 8c35d5d1825ed017cc58ea91011412e54c002eeb Mon Sep 17 00:00:00 2001 +From 3f54036b891054072b3e43ea8daaa57aa367b2e0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Apr 2016 15:35:39 -0700 Subject: [PATCH 09/10] Change order of CFLAGS @@ -9,26 +9,22 @@ Upstream-Status: Inappropriate Signed-off-by: Khem Raj --- - gdb/gdbserver/Makefile.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + gdb/gdbserver/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in -index f844ab8853..3f88db52e3 100644 +index 01dfdc0b89..f6aebef464 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in -@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@ - CPPFLAGS = @CPPFLAGS@ - - # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. --INTERNAL_CFLAGS_BASE = ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \ -+INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \ +@@ -140,7 +140,7 @@ CPPFLAGS = @CPPFLAGS@ + INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} - INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) --INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER -+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER + INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) +-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER ++INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER # LDFLAGS is specifically reserved for setting from the command line # when running make. -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch index 1938beb56..c9507109b 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch @@ -1,4 +1,4 @@ -From 7816d3497266e55c1c921d7cc1c8bf81c8ed0b4a Mon Sep 17 00:00:00 2001 +From 3ead0dd143521b0ba69c9e753bc4a236f9445ad9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 08:47:05 -0700 Subject: [PATCH 10/10] resolve restrict keyword conflict @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h -index c556c5db23..2a6107fcf8 100644 +index d535a6a48b..7c34d5a1aa 100644 --- a/gdb/gnulib/import/sys_time.in.h +++ b/gdb/gnulib/import/sys_time.in.h @@ -93,20 +93,20 @@ struct timeval @@ -42,7 +42,7 @@ index c556c5db23..2a6107fcf8 100644 + (struct timeval *__restrict, void *__restrict)); # endif _GL_CXXALIASWARN (gettimeofday); - #elif defined GNULIB_POSIXCHECK + # if defined __cplusplus && defined GNULIB_NAMESPACE -- -2.11.0 +2.13.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb deleted file mode 100644 index ea8fef122..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -require gdb.inc -require gdb-${PV}.inc - -inherit python3-dir - -EXTRA_OEMAKE_append_libc-musl = "\ - gt_cv_func_gnugettext1_libc=yes \ - gt_cv_func_gnugettext2_libc=yes \ - gl_cv_func_gettimeofday_clobber=no \ - " - -do_configure_prepend() { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - cat > ${WORKDIR}/python << EOF -#!/bin/sh -case "\$2" in - --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; - --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; - --exec-prefix) echo "${exec_prefix}" ;; - *) exit 1 ;; -esac -exit 0 -EOF - chmod +x ${WORKDIR}/python - fi -} -CFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb new file mode 100644 index 000000000..ea8fef122 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb @@ -0,0 +1,27 @@ +require gdb.inc +require gdb-${PV}.inc + +inherit python3-dir + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + gl_cv_func_gettimeofday_clobber=no \ + " + +do_configure_prepend() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + cat > ${WORKDIR}/python << EOF +#!/bin/sh +case "\$2" in + --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; + --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; + --exec-prefix) echo "${exec_prefix}" ;; + *) exit 1 ;; +esac +exit 0 +EOF + chmod +x ${WORKDIR}/python + fi +} +CFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc index 5c12ca8d4..9b4c1284d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc @@ -107,7 +107,6 @@ PERLTOOLS = " \ ${libexecdir}/git-core/git-cvsserver \ ${bindir}/git-cvsserver \ ${libexecdir}/git-core/git-difftool \ - ${libexecdir}/git-core/git-relink \ ${libexecdir}/git-core/git-send-email \ ${libexecdir}/git-core/git-svn \ ${libexecdir}/git-core/git-instaweb \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb deleted file mode 100644 index f2f072c52..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -require git.inc - -EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ - ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ - " -EXTRA_OEMAKE += "NO_GETTEXT=1" - -SRC_URI[tarball.md5sum] = "6a7a73db076bb0514b602720669d685c" -SRC_URI[tarball.sha256sum] = "a1cdd7c820f92c44abb5003b36dc8cb7201ba38e8744802399f59c97285ca043" -SRC_URI[manpages.md5sum] = "e4268a6b514ccdb624b6450ff55881a3" -SRC_URI[manpages.sha256sum] = "ee567e7b0f95333816793714bb31c54e288cf8041f77a0092b85e62c9c2974f9" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb new file mode 100644 index 000000000..b3e388731 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb @@ -0,0 +1,11 @@ +require git.inc + +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ + ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ + " +EXTRA_OEMAKE += "NO_GETTEXT=1" + +SRC_URI[tarball.md5sum] = "d2dc550f6693ba7e5b16212b2714f59f" +SRC_URI[tarball.sha256sum] = "1497001772f630d49809e981672edfe3e3ce1a1d18e905cd539c4d2f4dbcd75a" +SRC_URI[manpages.md5sum] = "3037d11a4f4cdd19435871c267ca48b4" +SRC_URI[manpages.sha256sum] = "f9b302eeb08ce08934e7afb42280ce9294411fbf5f7b6ac3fcc236e8031f10c5" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch deleted file mode 100644 index 2094116f0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch +++ /dev/null @@ -1,170 +0,0 @@ -Upstream-Status: Pending - -Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch. - -updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand) -updated to 20080123 by Nitin A Kamble (by hand) -updated to 20111001 by Saul Wold (by hand) -updated to 20120818 by Marcin 'Hrw' Juszkiewicz (by hand) - -Signed-off-by: Saul Wold -Signed-off-by: Marcin Juszkiewicz - ---- - config.guess | 67 +++++++++++++++++++++++++++++++++++------------------------ - 1 file changed, 40 insertions(+), 27 deletions(-) - ---- git.orig/config.guess -+++ git/config.guess -@@ -138,6 +138,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+# Detect uclibc systems. -+ -+LIBC="gnu" -+if [ -f /usr/include/bits/uClibc_config.h ] -+then -+ LIBC=uclibc -+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ] -+ then -+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h` -+ LIBC=$LIBC$UCLIBC_SUBVER -+ fi -+fi -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -@@ -886,15 +899,15 @@ EOF - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ if test "$?" = 0 ; then LIBC="gnulibc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP -@@ -906,19 +919,19 @@ EOF - fi - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo ${UNAME_MACHINE}-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo ${UNAME_MACHINE}-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - LIBC=gnu -@@ -932,13 +945,13 @@ EOF - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build -@@ -957,54 +970,54 @@ EOF - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or32:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) -- echo sparc-unknown-linux-gnu -+ echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo powerpc-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch deleted file mode 100644 index 75fe10082..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Pending - ---- config.sub.orig 2004-05-14 19:38:36.000000000 -0500 -+++ config.sub 2004-05-14 19:39:17.000000000 -0500 -@@ -118,7 +118,7 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -1135,7 +1135,8 @@ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb index 0d05e79fd..3d428b9b7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb @@ -10,7 +10,6 @@ INHIBIT_DEFAULT_DEPS = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV}.tar.bz2 \ - file://config-guess-uclibc.patch \ file://musl-support.patch \ file://gnu-configize.in" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb index f1c77884e..4fded60f1 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb @@ -13,8 +13,8 @@ PV = "20150728+git${SRCPV}" SRC_URI = "git://git.savannah.gnu.org/config.git \ file://gnu-configize.in" - S = "${WORKDIR}/git" +UPSTREAM_VERSION_UNKNOWN = "1" CLEANBROKEN = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc deleted file mode 100644 index 2f500f32b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc +++ /dev/null @@ -1,16 +0,0 @@ -require go-common.inc - -PV = "1.4.3" -GO_BASEVERSION = "1.4" -FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" - -SRC_URI += "\ - file://016-armhf-elf-header.patch \ - file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \ - file://syslog.patch \ - file://0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch \ -" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" -SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04" -SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch deleted file mode 100644 index f2adc200b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 855145d5c03c4b4faf60736c38d7a299c682af4a Mon Sep 17 00:00:00 2001 -From: Shenghou Ma -Date: Sat, 7 Feb 2015 14:06:02 -0500 -Subject: [PATCH] cmd/ld: set alignment for the .rel.plt section on 32-bit - architectures - -Fixes #9802. - -Change-Id: I22c52a37bdb23a14cc4615c9519431bb14ca81ca -Reviewed-on: https://go-review.googlesource.com/4170 -Reviewed-by: Ian Lance Taylor ---- -Upstream-Status: Backport -Signed-off-by: Khem Raj - - src/cmd/ld/elf.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c -index 12ced98..97ed4bd 100644 ---- a/src/cmd/ld/elf.c -+++ b/src/cmd/ld/elf.c -@@ -1363,6 +1363,7 @@ asmbelf(vlong symo) - sh->type = SHT_REL; - sh->flags = SHF_ALLOC; - sh->entsize = ELF32RELSIZE; -+ sh->addralign = 4; - sh->link = elfshname(".dynsym")->shnum; - shsym(sh, linklookup(ctxt, ".rel.plt", 0)); - --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch deleted file mode 100644 index e6e414e52..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: Use correct ELF header for armhf binaries. -Author: Adam Conrad -Last-Update: 2013-07-08 - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Index: go/src/cmd/ld/elf.c -=================================================================== ---- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800 -+++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800 -@@ -57,7 +57,11 @@ - case '5': - // we use EABI on both linux/arm and freebsd/arm. - if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd) -- hdr.flags = 0x5000002; // has entry point, Version5 EABI -+#ifdef __ARM_PCS_VFP -+ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI -+#else -+ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI -+#endif - // fallthrough - default: - hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch deleted file mode 100644 index 95ca9d3aa..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch +++ /dev/null @@ -1,225 +0,0 @@ -From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001 -From: Paul Gortmaker -Date: Tue, 29 Mar 2016 21:14:33 -0400 -Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64 - relocations" - -Newer binutils won't support building older go-1.4.3 as per: - -https://github.com/golang/go/issues/13114 - -Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj) -was identified as the fix and nominated for 1.4.4 but that release -never happened. The paths in 1.4.3 aren't the same as go1.6beta1~662 -where this commit appeared, but the NetBSD folks indicated what a -1.4.3 backport would look like here: https://gnats.netbsd.org/50777 - -This is based on that, but without the BSD wrapper infrastructure -layer that makes things look like patches of patches. - -Signed-off-by: Paul Gortmaker - -Upstream-Status: Backport [ Partial ] - -diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c -index 18b5aa311981..2e9d339aef87 100644 ---- a/src/cmd/6l/asm.c -+++ b/src/cmd/6l/asm.c -@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r) - return; - - case 256 + R_X86_64_GOTPCREL: -+ case 256 + R_X86_64_GOTPCRELX: -+ case 256 + R_X86_64_REX_GOTPCRELX: - if(targ->type != SDYNIMPORT) { - // have symbol - if(r->off >= 2 && s->p[r->off-2] == 0x8b) { -diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c -index 98c04240374f..cff29488e8af 100644 ---- a/src/cmd/8l/asm.c -+++ b/src/cmd/8l/asm.c -@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r) - return; - - case 256 + R_386_GOT32: -+ case 256 + R_386_GOT32X: - if(targ->type != SDYNIMPORT) { - // have symbol - if(r->off >= 2 && s->p[r->off-2] == 0x8b) { -diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h -index e84d996f2596..bbf2cfaa3cc0 100644 ---- a/src/cmd/ld/elf.h -+++ b/src/cmd/ld/elf.h -@@ -478,32 +478,47 @@ typedef struct { - * Relocation types. - */ - --#define R_X86_64_NONE 0 /* No relocation. */ --#define R_X86_64_64 1 /* Add 64 bit symbol value. */ --#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */ --#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */ --#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */ --#define R_X86_64_COPY 5 /* Copy data from shared object. */ --#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */ --#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */ --#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */ --#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */ --#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */ --#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ --#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */ --#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ --#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ --#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ --#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ --#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ --#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ --#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ --#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ --#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ --#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ --#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ -- --#define R_X86_64_COUNT 24 /* Count of defined relocation types. */ -+#define R_X86_64_NONE 0 -+#define R_X86_64_64 1 -+#define R_X86_64_PC32 2 -+#define R_X86_64_GOT32 3 -+#define R_X86_64_PLT32 4 -+#define R_X86_64_COPY 5 -+#define R_X86_64_GLOB_DAT 6 -+#define R_X86_64_JMP_SLOT 7 -+#define R_X86_64_RELATIVE 8 -+#define R_X86_64_GOTPCREL 9 -+#define R_X86_64_32 10 -+#define R_X86_64_32S 11 -+#define R_X86_64_16 12 -+#define R_X86_64_PC16 13 -+#define R_X86_64_8 14 -+#define R_X86_64_PC8 15 -+#define R_X86_64_DTPMOD64 16 -+#define R_X86_64_DTPOFF64 17 -+#define R_X86_64_TPOFF64 18 -+#define R_X86_64_TLSGD 19 -+#define R_X86_64_TLSLD 20 -+#define R_X86_64_DTPOFF32 21 -+#define R_X86_64_GOTTPOFF 22 -+#define R_X86_64_TPOFF32 23 -+#define R_X86_64_PC64 24 -+#define R_X86_64_GOTOFF64 25 -+#define R_X86_64_GOTPC32 26 -+#define R_X86_64_GOT64 27 -+#define R_X86_64_GOTPCREL64 28 -+#define R_X86_64_GOTPC64 29 -+#define R_X86_64_GOTPLT64 30 -+#define R_X86_64_PLTOFF64 31 -+#define R_X86_64_SIZE32 32 -+#define R_X86_64_SIZE64 33 -+#define R_X86_64_GOTPC32_TLSDEC 34 -+#define R_X86_64_TLSDESC_CALL 35 -+#define R_X86_64_TLSDESC 36 -+#define R_X86_64_IRELATIVE 37 -+#define R_X86_64_PC32_BND 40 -+#define R_X86_64_GOTPCRELX 41 -+#define R_X86_64_REX_GOTPCRELX 42 - - - #define R_ALPHA_NONE 0 /* No reloc */ -@@ -581,39 +596,42 @@ typedef struct { - #define R_ARM_COUNT 38 /* Count of defined relocation types. */ - - --#define R_386_NONE 0 /* No relocation. */ --#define R_386_32 1 /* Add symbol value. */ --#define R_386_PC32 2 /* Add PC-relative symbol value. */ --#define R_386_GOT32 3 /* Add PC-relative GOT offset. */ --#define R_386_PLT32 4 /* Add PC-relative PLT offset. */ --#define R_386_COPY 5 /* Copy data from shared object. */ --#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */ --#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */ --#define R_386_RELATIVE 8 /* Add load address of shared object. */ --#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */ --#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */ --#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */ --#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */ --#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */ --#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */ --#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */ --#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */ --#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */ --#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */ --#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */ --#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */ --#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */ --#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */ --#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */ --#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */ --#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */ --#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */ --#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */ --#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */ --#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */ --#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ -- --#define R_386_COUNT 38 /* Count of defined relocation types. */ -+#define R_386_NONE 0 -+#define R_386_32 1 -+#define R_386_PC32 2 -+#define R_386_GOT32 3 -+#define R_386_PLT32 4 -+#define R_386_COPY 5 -+#define R_386_GLOB_DAT 6 -+#define R_386_JMP_SLOT 7 -+#define R_386_RELATIVE 8 -+#define R_386_GOTOFF 9 -+#define R_386_GOTPC 10 -+#define R_386_TLS_TPOFF 14 -+#define R_386_TLS_IE 15 -+#define R_386_TLS_GOTIE 16 -+#define R_386_TLS_LE 17 -+#define R_386_TLS_GD 18 -+#define R_386_TLS_LDM 19 -+#define R_386_TLS_GD_32 24 -+#define R_386_TLS_GD_PUSH 25 -+#define R_386_TLS_GD_CALL 26 -+#define R_386_TLS_GD_POP 27 -+#define R_386_TLS_LDM_32 28 -+#define R_386_TLS_LDM_PUSH 29 -+#define R_386_TLS_LDM_CALL 30 -+#define R_386_TLS_LDM_POP 31 -+#define R_386_TLS_LDO_32 32 -+#define R_386_TLS_IE_32 33 -+#define R_386_TLS_LE_32 34 -+#define R_386_TLS_DTPMOD32 35 -+#define R_386_TLS_DTPOFF32 36 -+#define R_386_TLS_TPOFF32 37 -+#define R_386_TLS_GOTDESC 39 -+#define R_386_TLS_DESC_CALL 40 -+#define R_386_TLS_DESC 41 -+#define R_386_IRELATIVE 42 -+#define R_386_GOT32X 43 - - #define R_PPC_NONE 0 /* No relocation. */ - #define R_PPC_ADDR32 1 -diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c -index dd5fa0d2a839..2e2fbd17377f 100644 ---- a/src/cmd/ld/ldelf.c -+++ b/src/cmd/ld/ldelf.c -@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz) - case R('6', R_X86_64_PC32): - case R('6', R_X86_64_PLT32): - case R('6', R_X86_64_GOTPCREL): -+ case R('6', R_X86_64_GOTPCRELX): -+ case R('6', R_X86_64_REX_GOTPCRELX): - case R('8', R_386_32): - case R('8', R_386_PC32): - case R('8', R_386_GOT32): - case R('8', R_386_PLT32): - case R('8', R_386_GOTOFF): - case R('8', R_386_GOTPC): -+ case R('8', R_386_GOT32X): - *siz = 4; - break; - case R('6', R_X86_64_64): --- -2.7.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch deleted file mode 100644 index 29be06f1b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add timeouts to logger - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go ---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 -@@ -33,6 +33,9 @@ - const severityMask = 0x07 - const facilityMask = 0xf8 - -+var writeTimeout = 1 * time.Second -+var connectTimeout = 1 * time.Second -+ - const ( - // Severity. - -@@ -100,6 +103,7 @@ - type serverConn interface { - writeString(p Priority, hostname, tag, s, nl string) error - close() error -+ setWriteDeadline(t time.Time) error - } - - type netConn struct { -@@ -273,7 +277,11 @@ - nl = "\n" - } - -- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) -+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) -+ if err != nil { -+ return 0, err -+ } -+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) - if err != nil { - return 0, err - } -@@ -305,6 +313,10 @@ - return n.conn.Close() - } - -+func (n *netConn) setWriteDeadline(t time.Time) error { -+ return n.conn.SetWriteDeadline(t) -+} -+ - // NewLogger creates a log.Logger whose output is written to - // the system log service with the specified priority. The logFlag - // argument is the flag set passed through to log.New to create -diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go ---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 -@@ -19,7 +19,7 @@ - logPaths := []string{"/dev/log", "/var/run/syslog"} - for _, network := range logTypes { - for _, path := range logPaths { -- conn, err := net.Dial(network, path) -+ conn, err := net.DialTimeout(network, path, connectTimeout) - if err != nil { - continue - } else { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc deleted file mode 100644 index 769c1d8f2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc +++ /dev/null @@ -1,19 +0,0 @@ -require go-common.inc - -PV = "1.6.3" -GO_BASEVERSION = "1.6" -FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" - -SRC_URI += "\ - file://armhf-elf-header.patch \ - file://syslog.patch \ - file://fix-target-cc-for-build.patch \ - file://fix-cc-handling.patch \ - file://split-host-and-target-build.patch \ - file://gotooldir.patch \ -" -SRC_URI[md5sum] = "bf3fce6ccaadd310159c9e874220e2a2" -SRC_URI[sha256sum] = "6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch deleted file mode 100644 index 1e3a16b31..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch +++ /dev/null @@ -1,23 +0,0 @@ -Encode arm EABI ( hard/soft ) calling convention in ELF header - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/link/internal/ld/elf.go -=================================================================== ---- go.orig/src/cmd/link/internal/ld/elf.go -+++ go/src/cmd/link/internal/ld/elf.go -@@ -827,7 +827,13 @@ - // 32-bit architectures - case '5': - // we use EABI on both linux/arm and freebsd/arm. -- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { -+ if HEADTYPE == obj.Hlinux { -+ if Ctxt.Goarm == 7 { -+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float -+ } else { -+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float -+ } -+ } else if HEADTYPE == obj.Hfreebsd { - // We set a value here that makes no indication of which - // float ABI the object uses, because this is information - // used by the dynamic linker to compare executables and diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch deleted file mode 100644 index 983323ace..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch +++ /dev/null @@ -1,50 +0,0 @@ -Accept CC with multiple words in its name - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 -+++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 -@@ -2805,12 +2805,24 @@ - return b.ccompilerCmd("CC", defaultCC, objdir) - } - -+// gccCmd returns a gcc command line prefix -+// defaultCC is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gccCmdForReal() []string { -+ return envList("CC", defaultCC) -+} -+ - // gxxCmd returns a g++ command line prefix - // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. - func (b *builder) gxxCmd(objdir string) []string { - return b.ccompilerCmd("CXX", defaultCXX, objdir) - } - -+// gxxCmd returns a g++ command line prefix -+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gxxCmdForReal() []string { -+ return envList("CXX", defaultCXX) -+} -+ - // ccompilerCmd returns a command line prefix for the given environment - // variable and using the default command when the variable is empty. - func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { -Index: go/src/cmd/go/env.go -=================================================================== ---- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 -+++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 -@@ -52,10 +52,9 @@ - - if goos != "plan9" { - cmd := b.gccCmd(".") -- env = append(env, envVar{"CC", cmd[0]}) -+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) - env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) -- cmd = b.gxxCmd(".") -- env = append(env, envVar{"CXX", cmd[0]}) -+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) - } - - if buildContext.CgoEnabled { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch deleted file mode 100644 index 2f6156ecd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 -+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 -@@ -158,7 +158,7 @@ - fi - - echo "##### Building packages and commands for $GOOS/$GOARCH." --CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd - echo - - rm -f "$GOTOOLDIR"/go_bootstrap diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch deleted file mode 100644 index 94670259f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch +++ /dev/null @@ -1,30 +0,0 @@ -Define tooldir in relation to GOTOOLDIR env var - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/go/build/build.go -=================================================================== ---- go.orig/src/go/build/build.go -+++ go/src/go/build/build.go -@@ -1388,7 +1388,7 @@ func init() { - } - - // ToolDir is the directory containing build tools. --var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) -+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) - - // IsLocalImport reports whether the import path is - // a local import path, like ".", "..", "./foo", or "../foo". -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go -+++ go/src/cmd/go/build.go -@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err - } - - cgoExe := tool("cgo") -- if a.cgo != nil && a.cgo.target != "" { -+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { - cgoExe = a.cgo.target - } - outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch deleted file mode 100644 index afbae02b4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch +++ /dev/null @@ -1,63 +0,0 @@ -Add new option --target-only to build target components -Separates the host and target pieces of build - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash -+++ go/src/make.bash -@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then - buildall="" - shift - fi --./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap --# Delay move of dist tool to now, because bootstrap may clear tool directory. --mv cmd/dist/dist "$GOTOOLDIR"/dist --echo - --if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then -+do_host_build="yes" -+do_target_build="yes" -+if [ "$1" = "--target-only" ]; then -+ do_host_build="no" -+ shift -+elif [ "$1" = "--host-only" ]; then -+ do_target_build="no" -+ shift -+fi -+ -+if [ "$do_host_build" = "yes" ]; then -+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap -+ # Delay move of dist tool to now, because bootstrap may clear tool directory. -+ mv cmd/dist/dist "$GOTOOLDIR"/dist -+ echo -+ - echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." - # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, - # use the host compiler, CC, from `cmd/dist/dist env` instead. -@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH - echo - fi - --echo "##### Building packages and commands for $GOOS/$GOARCH." --CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd --echo -+if [ "$do_target_build" = "yes" ]; then -+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" -+ echo "##### Building packages and commands for $GOOS/$GOARCH." -+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then -+ rm -rf ./host-tools -+ mkdir ./host-tools -+ mv "$GOTOOLDIR"/* ./host-tools -+ GOTOOLDIR="$PWD/host-tools" -+ fi -+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} -+ echo - --rm -f "$GOTOOLDIR"/go_bootstrap -+ rm -f "$GOTOOLDIR"/go_bootstrap -+fi - - if [ "$1" != "--no-banner" ]; then - "$GOTOOLDIR"/dist banner diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch deleted file mode 100644 index 29be06f1b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add timeouts to logger - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go ---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 -@@ -33,6 +33,9 @@ - const severityMask = 0x07 - const facilityMask = 0xf8 - -+var writeTimeout = 1 * time.Second -+var connectTimeout = 1 * time.Second -+ - const ( - // Severity. - -@@ -100,6 +103,7 @@ - type serverConn interface { - writeString(p Priority, hostname, tag, s, nl string) error - close() error -+ setWriteDeadline(t time.Time) error - } - - type netConn struct { -@@ -273,7 +277,11 @@ - nl = "\n" - } - -- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) -+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) -+ if err != nil { -+ return 0, err -+ } -+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) - if err != nil { - return 0, err - } -@@ -305,6 +313,10 @@ - return n.conn.Close() - } - -+func (n *netConn) setWriteDeadline(t time.Time) error { -+ return n.conn.SetWriteDeadline(t) -+} -+ - // NewLogger creates a log.Logger whose output is written to - // the system log service with the specified priority. The logFlag - // argument is the flag set passed through to log.New to create -diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go ---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 -@@ -19,7 +19,7 @@ - logPaths := []string{"/dev/log", "/var/run/syslog"} - for _, network := range logTypes { - for _, path := range logPaths { -- conn, err := net.Dial(network, path) -+ conn, err := net.DialTimeout(network, path, connectTimeout) - if err != nil { - continue - } else { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc deleted file mode 100644 index 5c3004e87..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc +++ /dev/null @@ -1,19 +0,0 @@ -require go-common.inc - -PV = "1.7.4" -GO_BASEVERSION = "1.7" -FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" - -SRC_URI += "\ - file://armhf-elf-header.patch \ - file://syslog.patch \ - file://fix-target-cc-for-build.patch \ - file://fix-cc-handling.patch \ - file://split-host-and-target-build.patch \ - file://gotooldir.patch \ -" -SRC_URI[md5sum] = "49c1076428a5d3b5ad7ac65233fcca2f" -SRC_URI[sha256sum] = "4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch deleted file mode 100644 index 1e3a16b31..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch +++ /dev/null @@ -1,23 +0,0 @@ -Encode arm EABI ( hard/soft ) calling convention in ELF header - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/link/internal/ld/elf.go -=================================================================== ---- go.orig/src/cmd/link/internal/ld/elf.go -+++ go/src/cmd/link/internal/ld/elf.go -@@ -827,7 +827,13 @@ - // 32-bit architectures - case '5': - // we use EABI on both linux/arm and freebsd/arm. -- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { -+ if HEADTYPE == obj.Hlinux { -+ if Ctxt.Goarm == 7 { -+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float -+ } else { -+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float -+ } -+ } else if HEADTYPE == obj.Hfreebsd { - // We set a value here that makes no indication of which - // float ABI the object uses, because this is information - // used by the dynamic linker to compare executables and diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch deleted file mode 100644 index a67caf41a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch +++ /dev/null @@ -1,50 +0,0 @@ -Accept CC with multiple words in its name - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go -+++ go/src/cmd/go/build.go -@@ -2991,12 +2991,24 @@ func (b *builder) gccCmd(objdir string) - return b.ccompilerCmd("CC", defaultCC, objdir) - } - -+// gccCmd returns a gcc command line prefix -+// defaultCC is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gccCmdForReal() []string { -+ return envList("CC", defaultCC) -+} -+ - // gxxCmd returns a g++ command line prefix - // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. - func (b *builder) gxxCmd(objdir string) []string { - return b.ccompilerCmd("CXX", defaultCXX, objdir) - } - -+// gxxCmd returns a g++ command line prefix -+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gxxCmdForReal() []string { -+ return envList("CXX", defaultCXX) -+} -+ - // gfortranCmd returns a gfortran command line prefix. - func (b *builder) gfortranCmd(objdir string) []string { - return b.ccompilerCmd("FC", "gfortran", objdir) -Index: go/src/cmd/go/env.go -=================================================================== ---- go.orig/src/cmd/go/env.go -+++ go/src/cmd/go/env.go -@@ -51,10 +51,9 @@ func mkEnv() []envVar { - - if goos != "plan9" { - cmd := b.gccCmd(".") -- env = append(env, envVar{"CC", cmd[0]}) -+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) - env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) -- cmd = b.gxxCmd(".") -- env = append(env, envVar{"CXX", cmd[0]}) -+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) - } - - if buildContext.CgoEnabled { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch deleted file mode 100644 index 2f6156ecd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 -+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 -@@ -158,7 +158,7 @@ - fi - - echo "##### Building packages and commands for $GOOS/$GOARCH." --CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd - echo - - rm -f "$GOTOOLDIR"/go_bootstrap diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch deleted file mode 100644 index 94670259f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch +++ /dev/null @@ -1,30 +0,0 @@ -Define tooldir in relation to GOTOOLDIR env var - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/go/build/build.go -=================================================================== ---- go.orig/src/go/build/build.go -+++ go/src/go/build/build.go -@@ -1388,7 +1388,7 @@ func init() { - } - - // ToolDir is the directory containing build tools. --var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) -+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) - - // IsLocalImport reports whether the import path is - // a local import path, like ".", "..", "./foo", or "../foo". -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go -+++ go/src/cmd/go/build.go -@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err - } - - cgoExe := tool("cgo") -- if a.cgo != nil && a.cgo.target != "" { -+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { - cgoExe = a.cgo.target - } - outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch deleted file mode 100644 index b0dd95bbe..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add new option --target-only to build target components -Separates the host and target pieces of build - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash -+++ go/src/make.bash -@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then - buildall="" - shift - fi --./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap -+do_host_build="yes" -+do_target_build="yes" -+if [ "$1" = "--target-only" ]; then -+ do_host_build="no" -+ shift -+elif [ "$1" = "--host-only" ]; then -+ do_target_build="no" -+ shift -+fi - --# Delay move of dist tool to now, because bootstrap may clear tool directory. --mv cmd/dist/dist "$GOTOOLDIR"/dist --echo -+if [ "$do_host_build" = "yes" ]; then -+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap -+ # Delay move of dist tool to now, because bootstrap may clear tool directory. -+ mv cmd/dist/dist "$GOTOOLDIR"/dist -+ echo - --if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then - echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." - # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, - # use the host compiler, CC, from `cmd/dist/dist env` instead. -@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH - echo - fi - --echo "##### Building packages and commands for $GOOS/$GOARCH." --CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd --echo -+if [ "$do_target_build" = "yes" ]; then -+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" -+ echo "##### Building packages and commands for $GOOS/$GOARCH." -+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then -+ rm -rf ./host-tools -+ mkdir ./host-tools -+ mv "$GOTOOLDIR"/* ./host-tools -+ GOTOOLDIR="$PWD/host-tools" -+ fi -+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} -+ echo - --rm -f "$GOTOOLDIR"/go_bootstrap -+ rm -f "$GOTOOLDIR"/go_bootstrap -+fi - - if [ "$1" != "--no-banner" ]; then - "$GOTOOLDIR"/dist banner diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch deleted file mode 100644 index 29be06f1b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add timeouts to logger - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go ---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 -@@ -33,6 +33,9 @@ - const severityMask = 0x07 - const facilityMask = 0xf8 - -+var writeTimeout = 1 * time.Second -+var connectTimeout = 1 * time.Second -+ - const ( - // Severity. - -@@ -100,6 +103,7 @@ - type serverConn interface { - writeString(p Priority, hostname, tag, s, nl string) error - close() error -+ setWriteDeadline(t time.Time) error - } - - type netConn struct { -@@ -273,7 +277,11 @@ - nl = "\n" - } - -- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) -+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) -+ if err != nil { -+ return 0, err -+ } -+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) - if err != nil { - return 0, err - } -@@ -305,6 +313,10 @@ - return n.conn.Close() - } - -+func (n *netConn) setWriteDeadline(t time.Time) error { -+ return n.conn.SetWriteDeadline(t) -+} -+ - // NewLogger creates a log.Logger whose output is written to - // the system log service with the specified priority. The logFlag - // argument is the flag set passed through to log.New to create -diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go ---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 -@@ -19,7 +19,7 @@ - logPaths := []string{"/dev/log", "/var/run/syslog"} - for _, network := range logTypes { - for _, path := range logPaths { -- conn, err := net.Dial(network, path) -+ conn, err := net.DialTimeout(network, path, connectTimeout) - if err != nil { - continue - } else { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc deleted file mode 100644 index 5c376a2eb..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc +++ /dev/null @@ -1,19 +0,0 @@ -require go-common.inc - -GOMINOR = "" -GO_BASEVERSION = "1.8" -PV .= "${GOMINOR}" -FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" - -SRC_URI += "\ - file://armhf-elf-header.patch \ - file://syslog.patch \ - file://fix-target-cc-for-build.patch \ - file://fix-cc-handling.patch \ - file://split-host-and-target-build.patch \ - file://gotooldir.patch \ -" -SRC_URI[md5sum] = "7743960c968760437b6e39093cfe6f67" -SRC_URI[sha256sum] = "406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch deleted file mode 100644 index 3508838e8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch +++ /dev/null @@ -1,23 +0,0 @@ -Encode arm EABI ( hard/soft ) calling convention in ELF header - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/link/internal/ld/elf.go -=================================================================== ---- go.orig/src/cmd/link/internal/ld/elf.go -+++ go/src/cmd/link/internal/ld/elf.go -@@ -950,7 +950,13 @@ func Elfinit(ctxt *Link) { - case sys.ARM, sys.MIPS: - if SysArch.Family == sys.ARM { - // we use EABI on linux/arm, freebsd/arm, netbsd/arm. -- if Headtype == obj.Hlinux || Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd { -+ if Headtype == obj.Hlinux { -+ if obj.GOARM == 7 { -+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float -+ } else { -+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float -+ } -+ } else if Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd { - // We set a value here that makes no indication of which - // float ABI the object uses, because this is information - // used by the dynamic linker to compare executables and diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch deleted file mode 100644 index dc9b811b2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch +++ /dev/null @@ -1,50 +0,0 @@ -Accept CC with multiple words in its name - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go -+++ go/src/cmd/go/build.go -@@ -3100,12 +3100,24 @@ func (b *builder) gccCmd(objdir string) - return b.ccompilerCmd("CC", defaultCC, objdir) - } - -+// gccCmd returns a gcc command line prefix -+// defaultCC is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gccCmdForReal() []string { -+ return envList("CC", defaultCC) -+} -+ - // gxxCmd returns a g++ command line prefix - // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. - func (b *builder) gxxCmd(objdir string) []string { - return b.ccompilerCmd("CXX", defaultCXX, objdir) - } - -+// gxxCmd returns a g++ command line prefix -+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. -+func (b *builder) gxxCmdForReal() []string { -+ return envList("CXX", defaultCXX) -+} -+ - // gfortranCmd returns a gfortran command line prefix. - func (b *builder) gfortranCmd(objdir string) []string { - return b.ccompilerCmd("FC", "gfortran", objdir) -Index: go/src/cmd/go/env.go -=================================================================== ---- go.orig/src/cmd/go/env.go -+++ go/src/cmd/go/env.go -@@ -63,10 +63,9 @@ func mkEnv() []envVar { - } - - cmd := b.gccCmd(".") -- env = append(env, envVar{"CC", cmd[0]}) -+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) - env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) -- cmd = b.gxxCmd(".") -- env = append(env, envVar{"CXX", cmd[0]}) -+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) - - if buildContext.CgoEnabled { - env = append(env, envVar{"CGO_ENABLED", "1"}) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch deleted file mode 100644 index 2f6156ecd..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 -+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 -@@ -158,7 +158,7 @@ - fi - - echo "##### Building packages and commands for $GOOS/$GOARCH." --CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd - echo - - rm -f "$GOTOOLDIR"/go_bootstrap diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch deleted file mode 100644 index 94670259f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch +++ /dev/null @@ -1,30 +0,0 @@ -Define tooldir in relation to GOTOOLDIR env var - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/go/build/build.go -=================================================================== ---- go.orig/src/go/build/build.go -+++ go/src/go/build/build.go -@@ -1388,7 +1388,7 @@ func init() { - } - - // ToolDir is the directory containing build tools. --var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) -+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) - - // IsLocalImport reports whether the import path is - // a local import path, like ".", "..", "./foo", or "../foo". -Index: go/src/cmd/go/build.go -=================================================================== ---- go.orig/src/cmd/go/build.go -+++ go/src/cmd/go/build.go -@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err - } - - cgoExe := tool("cgo") -- if a.cgo != nil && a.cgo.target != "" { -+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { - cgoExe = a.cgo.target - } - outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch deleted file mode 100644 index b0dd95bbe..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add new option --target-only to build target components -Separates the host and target pieces of build - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: go/src/make.bash -=================================================================== ---- go.orig/src/make.bash -+++ go/src/make.bash -@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then - buildall="" - shift - fi --./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap -+do_host_build="yes" -+do_target_build="yes" -+if [ "$1" = "--target-only" ]; then -+ do_host_build="no" -+ shift -+elif [ "$1" = "--host-only" ]; then -+ do_target_build="no" -+ shift -+fi - --# Delay move of dist tool to now, because bootstrap may clear tool directory. --mv cmd/dist/dist "$GOTOOLDIR"/dist --echo -+if [ "$do_host_build" = "yes" ]; then -+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap -+ # Delay move of dist tool to now, because bootstrap may clear tool directory. -+ mv cmd/dist/dist "$GOTOOLDIR"/dist -+ echo - --if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then - echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." - # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, - # use the host compiler, CC, from `cmd/dist/dist env` instead. -@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH - echo - fi - --echo "##### Building packages and commands for $GOOS/$GOARCH." --CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd --echo -+if [ "$do_target_build" = "yes" ]; then -+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" -+ echo "##### Building packages and commands for $GOOS/$GOARCH." -+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then -+ rm -rf ./host-tools -+ mkdir ./host-tools -+ mv "$GOTOOLDIR"/* ./host-tools -+ GOTOOLDIR="$PWD/host-tools" -+ fi -+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} -+ echo - --rm -f "$GOTOOLDIR"/go_bootstrap -+ rm -f "$GOTOOLDIR"/go_bootstrap -+fi - - if [ "$1" != "--no-banner" ]; then - "$GOTOOLDIR"/dist banner diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch deleted file mode 100644 index 29be06f1b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch +++ /dev/null @@ -1,62 +0,0 @@ -Add timeouts to logger - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go ---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 -@@ -33,6 +33,9 @@ - const severityMask = 0x07 - const facilityMask = 0xf8 - -+var writeTimeout = 1 * time.Second -+var connectTimeout = 1 * time.Second -+ - const ( - // Severity. - -@@ -100,6 +103,7 @@ - type serverConn interface { - writeString(p Priority, hostname, tag, s, nl string) error - close() error -+ setWriteDeadline(t time.Time) error - } - - type netConn struct { -@@ -273,7 +277,11 @@ - nl = "\n" - } - -- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) -+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) -+ if err != nil { -+ return 0, err -+ } -+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) - if err != nil { - return 0, err - } -@@ -305,6 +313,10 @@ - return n.conn.Close() - } - -+func (n *netConn) setWriteDeadline(t time.Time) error { -+ return n.conn.SetWriteDeadline(t) -+} -+ - // NewLogger creates a log.Logger whose output is written to - // the system log service with the specified priority. The logFlag - // argument is the flag set passed through to log.New to create -diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go ---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 -+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 -@@ -19,7 +19,7 @@ - logPaths := []string{"/dev/log", "/var/run/syslog"} - for _, network := range logTypes { - for _, path := range logPaths { -- conn, err := net.Dial(network, path) -+ conn, err := net.DialTimeout(network, path, connectTimeout) - if err != nil { - continue - } else { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc new file mode 100644 index 000000000..7f12241dc --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc @@ -0,0 +1,23 @@ +require go-common.inc + +GO_BASEVERSION = "1.9" +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" + +SRC_URI += "\ + file://0001-make.bash-quote-CC_FOR_TARGET.patch \ + file://0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch \ + file://0003-make.bash-better-separate-host-and-target-builds.patch \ + file://0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ + file://0005-cmd-go-make-GOROOT-precious-by-default.patch \ + file://0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch \ + file://0007-ld-add-soname-to-shareable-objects.patch \ + file://0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch \ + file://0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch \ + file://0010-make.bash-override-CC-when-building-dist-and-go_boot.patch \ +" +SRC_URI_append_libc-musl = " file://set-external-linker.patch" + +SRC_URI[main.md5sum] = "da2d44ea384076efec43ee1f8b7d45d2" +SRC_URI[main.sha256sum] = "a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch new file mode 100644 index 000000000..7800975e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch @@ -0,0 +1,32 @@ +From d24734ad44006791fd48fc45ea34fe608ff672fb Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:04:23 -0700 +Subject: [PATCH 1/7] make.bash: quote CC_FOR_TARGET + +For OE cross-builds, $CC_FOR_TARGET has more than +one word and needs to be quoted. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Matt Madison +--- + src/make.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/make.bash b/src/make.bash +index 71e7531..dcf3256 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -175,7 +175,7 @@ echo "##### Building packages and commands for $GOOS/$GOARCH." + + old_bin_files=$(cd $GOROOT/bin && echo *) + +-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd ++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd + + # Check that there are no new files in $GOROOT/bin other than go and gofmt + # and $GOOS_$GOARCH (a directory used when cross-compiling). +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch new file mode 100644 index 000000000..a4e42261c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch @@ -0,0 +1,67 @@ +From a7170d32a13aead608abd18996f6dab2e2a631b5 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:06:37 -0700 +Subject: [PATCH 2/7] cmd/go: fix CC and CXX environment variable construction + +For OE cross-builds, CC and CXX have multiple words, and +we need their complete definitions when setting up the +environment during Go builds. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Matt Madison +--- + src/cmd/go/internal/envcmd/env.go | 4 ++-- + src/cmd/go/internal/work/build.go | 12 ++++++++++++ + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go +index 43d4334..529d21d 100644 +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -74,10 +74,10 @@ func MkEnv() []cfg.EnvVar { + } + + cmd := b.GccCmd(".") +- env = append(env, cfg.EnvVar{Name: "CC", Value: cmd[0]}) ++ env = append(env, cfg.EnvVar{Name: "CC", Value: strings.Join(b.GccCmdForReal(), " ")}) + env = append(env, cfg.EnvVar{Name: "GOGCCFLAGS", Value: strings.Join(cmd[3:], " ")}) + cmd = b.GxxCmd(".") +- env = append(env, cfg.EnvVar{Name: "CXX", Value: cmd[0]}) ++ env = append(env, cfg.EnvVar{Name: "CXX", Value: strings.Join(b.GxxCmdForReal(), " ")}) + + if cfg.BuildContext.CgoEnabled { + env = append(env, cfg.EnvVar{Name: "CGO_ENABLED", Value: "1"}) +diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go +index 7d667ff..85df0b3 100644 +--- a/src/cmd/go/internal/work/build.go ++++ b/src/cmd/go/internal/work/build.go +@@ -3127,12 +3127,24 @@ func (b *Builder) GccCmd(objdir string) []string { + return b.ccompilerCmd("CC", cfg.DefaultCC, objdir) + } + ++// gccCmd returns a gcc command line prefix ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist. ++func (b *Builder) GccCmdForReal() []string { ++ return envList("CC", cfg.DefaultCC) ++} ++ + // gxxCmd returns a g++ command line prefix + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. + func (b *Builder) GxxCmd(objdir string) []string { + return b.ccompilerCmd("CXX", cfg.DefaultCXX, objdir) + } + ++// gxxCmd returns a g++ command line prefix ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. ++func (b *Builder) GxxCmdForReal() []string { ++ return envList("CXX", cfg.DefaultCXX) ++} ++ + // gfortranCmd returns a gfortran command line prefix. + func (b *Builder) gfortranCmd(objdir string) []string { + return b.ccompilerCmd("FC", "gfortran", objdir) +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch new file mode 100644 index 000000000..ffd9f2359 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch @@ -0,0 +1,92 @@ +From 31e88f06af7ab787d8fe0c1ca625193e1799e167 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:12:04 -0700 +Subject: [PATCH 3/7] make.bash: better separate host and target builds + +Fore OE cross-builds, the simple checks in make.bash are +insufficient for distinguishing host and target build +environments, so add some options for telling the +script which parts are being built. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Matt Madison +--- + src/make.bash | 51 ++++++++++++++++++++++++++++----------------------- + 1 file changed, 28 insertions(+), 23 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index dcf3256..9553623 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -156,13 +156,22 @@ if [ "$1" = "--no-clean" ]; then + buildall="" + shift + fi +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++do_host_build="yes" ++do_target_build="yes" ++if [ "$1" = "--target-only" ]; then ++ do_host_build="no" ++ shift ++elif [ "$1" = "--host-only" ]; then ++ do_target_build="no" ++ shift ++fi + +-# Delay move of dist tool to now, because bootstrap may clear tool directory. +-mv cmd/dist/dist "$GOTOOLDIR"/dist +-echo ++if [ "$do_host_build" = "yes" ]; then ++ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ # Delay move of dist tool to now, because bootstrap may clear tool directory. ++ mv cmd/dist/dist "$GOTOOLDIR"/dist ++ echo + +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +@@ -171,24 +180,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then + echo + fi + +-echo "##### Building packages and commands for $GOOS/$GOARCH." +- +-old_bin_files=$(cd $GOROOT/bin && echo *) +- +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd +- +-# Check that there are no new files in $GOROOT/bin other than go and gofmt +-# and $GOOS_$GOARCH (a directory used when cross-compiling). +-(cd $GOROOT/bin && for f in *; do +- if ! expr " $old_bin_files go gofmt ${GOOS}_${GOARCH} " : ".* $f " >/dev/null 2>/dev/null; then +- echo 1>&2 "ERROR: unexpected new file in $GOROOT/bin: $f" +- exit 1 +- fi +-done) +- +-echo +- +-rm -f "$GOTOOLDIR"/go_bootstrap ++if [ "$do_target_build" = "yes" ]; then ++ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" ++ echo "##### Building packages and commands for $GOOS/$GOARCH." ++ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then ++ rm -rf ./host-tools ++ mkdir ./host-tools ++ mv "$GOTOOLDIR"/* ./host-tools ++ GOTOOLDIR="$PWD/host-tools" ++ fi ++ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} ++ echo ++ ++ rm -f "$GOTOOLDIR"/go_bootstrap ++fi + + if [ "$1" != "--no-banner" ]; then + "$GOTOOLDIR"/dist banner +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch new file mode 100644 index 000000000..180b06a4d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch @@ -0,0 +1,68 @@ +From 1369178b497b12088ec4c2794606cc9f14cc327c Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:15:03 -0700 +Subject: [PATCH 4/7] cmd/go: allow GOTOOLDIR to be overridden in the + environment + +For OE cross-builds, host-side tools reside in the native +GOROOT, not the target GOROOT. Allow GOTOOLDIR to be set +in the environment to allow that split, rather than always +computing GOTOOLDIR relative to the GOROOT setting. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Matt Madison +--- + src/cmd/go/internal/cfg/cfg.go | 7 ++++++- + src/cmd/go/internal/work/build.go | 2 +- + src/go/build/build.go | 2 +- + 3 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go +index b3ad1ce..c1dc974 100644 +--- a/src/cmd/go/internal/cfg/cfg.go ++++ b/src/cmd/go/internal/cfg/cfg.go +@@ -91,7 +91,12 @@ func init() { + // as the tool directory does not move based on environment variables. + // This matches the initialization of ToolDir in go/build, + // except for using GOROOT rather than runtime.GOROOT(). +- build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ s := os.Getenv("GOTOOLDIR") ++ if s == "" { ++ build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ } else { ++ build.ToolDir = s ++ } + } + + func findGOROOT() string { +diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go +index 85df0b3..7b9a69e 100644 +--- a/src/cmd/go/internal/work/build.go ++++ b/src/cmd/go/internal/work/build.go +@@ -1337,7 +1337,7 @@ func (b *Builder) build(a *Action) (err error) { + } + + var cgoExe string +- if a.cgo != nil && a.cgo.Target != "" { ++ if a.cgo != nil && a.cgo.Target != "" && os.Getenv("GOTOOLDIR") == "" { + cgoExe = a.cgo.Target + } else { + cgoExe = base.Tool("cgo") +diff --git a/src/go/build/build.go b/src/go/build/build.go +index fd89871..e16145b 100644 +--- a/src/go/build/build.go ++++ b/src/go/build/build.go +@@ -1588,7 +1588,7 @@ func init() { + } + + // ToolDir is the directory containing build tools. +-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) + + // IsLocalImport reports whether the import path is + // a local import path, like ".", "..", "./foo", or "../foo". +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch new file mode 100644 index 000000000..6e93bcb6c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch @@ -0,0 +1,41 @@ +From 44f961975dac6cf464a77b5f6dd0c47cc192c4fd Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:19:52 -0700 +Subject: [PATCH 5/7] cmd/go: make GOROOT precious by default + +For OE builds, we never want packages that have +already been installed into the build root to be +modified, so prevent the go build tool from checking +if they should be rebuilt. + +Also add an environment variable to override this +behavior, just for building the Go runtime. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison +--- + src/cmd/go/internal/load/pkg.go | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go +index 60de666..2660d3f 100644 +--- a/src/cmd/go/internal/load/pkg.go ++++ b/src/cmd/go/internal/load/pkg.go +@@ -1530,6 +1530,13 @@ func isStale(p *Package) (bool, string) { + return true, "build ID mismatch" + } + ++ // For OE builds, make anything in GOROOT non-stale, ++ // to prevent a package build from overwriting the ++ // build root. ++ if p.Goroot && os.Getenv("GOROOT_OVERRIDE") != "1" { ++ return false, "GOROOT-resident packages do not get rebuilt" ++ } ++ + // Package is stale if a dependency is. + for _, p1 := range p.Internal.Deps { + if p1.Stale { +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch new file mode 100644 index 000000000..f0f564044 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch @@ -0,0 +1,36 @@ +From aae74d1045ca03306ba4159206ee3bac72bcdfbb Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:23:23 -0700 +Subject: [PATCH 6/7] make.bash: add GOTOOLDIR_BOOTSTRAP environment variable + +For cross-canadian builds, we need to use the native +GOTOOLDIR during the bootstrap phase, so provide a way +to pass that setting into the build script. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison +--- + src/make.bash | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/make.bash b/src/make.bash +index 9553623..2e6fb05 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -172,10 +172,11 @@ if [ "$do_host_build" = "yes" ]; then + mv cmd/dist/dist "$GOTOOLDIR"/dist + echo + ++ GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}" + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +- CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ ++ CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOTOOLDIR="$GOTOOLDIR_BOOTSTRAP" \ + "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd + echo + fi +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch new file mode 100644 index 000000000..6459782d8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch @@ -0,0 +1,46 @@ +From e957c3458d53e37bf416f51d2f8bf54c195e50f5 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Wed, 13 Sep 2017 08:27:02 -0700 +Subject: [PATCH 7/7] ld: add soname to shareable objects + +Shared library handling in OE depends on the inclusion +of an soname header, so update the go linker to add that +header for both internal and external linking. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison +--- + src/cmd/link/internal/ld/lib.go | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go +index 0234105..0b9e2d0 100644 +--- a/src/cmd/link/internal/ld/lib.go ++++ b/src/cmd/link/internal/ld/lib.go +@@ -1124,12 +1124,14 @@ func (l *Link) hostlink() { + // Pass -z nodelete to mark the shared library as + // non-closeable: a dlclose will do nothing. + argv = append(argv, "-shared", "-Wl,-z,nodelete") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + } + case BuildmodeShared: + if UseRelro() { + argv = append(argv, "-Wl,-z,relro") + } + argv = append(argv, "-shared") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + case BuildmodePlugin: + if Headtype == objabi.Hdarwin { + argv = append(argv, "-dynamiclib") +@@ -1138,6 +1140,7 @@ func (l *Link) hostlink() { + argv = append(argv, "-Wl,-z,relro") + } + argv = append(argv, "-shared") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + } + } + +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch new file mode 100644 index 000000000..0977c7835 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch @@ -0,0 +1,33 @@ +From 03e6c339d4fb712fbb8c4ca6ef2fc7100dcdb3d7 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Thu, 14 Sep 2017 05:38:10 -0700 +Subject: [PATCH 8/8] make.bash: add GOHOSTxx indirection for cross-canadian + builds + +Add environment variables for specifying the host OS/arch +that we are building the compiler for, so it can differ from +the build host OS/arch. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison +--- + src/make.bash | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/make.bash b/src/make.bash +index 2e6fb05..0bdadc6 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -173,6 +173,8 @@ if [ "$do_host_build" = "yes" ]; then + echo + + GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}" ++ GOHOSTOS="${GOHOSTOS_CROSS:-$GOHOSTOS}" ++ GOHOSTARCH="${GOHOSTARCH_CROSS:-$GOHOSTARCH}" + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch new file mode 100644 index 000000000..aa5fcfdd2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch @@ -0,0 +1,47 @@ +From aae44527c8065d54f6acaf87c82cba1ac96fae59 Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor +Date: Fri, 18 Aug 2017 17:46:03 -0700 +Subject: [PATCH] cmd/go: -buildmode=pie forces external linking mode on all + systems + +The go tool assumed that -buildmode=pie implied internal linking on +linux-amd64. However, that was changed by CL 36417 for issue #18968. + +Fixes #21452 + +Change-Id: I8ed13aea52959cc5c53223f4c41ba35329445545 +Reviewed-on: https://go-review.googlesource.com/57231 +Run-TryBot: Ian Lance Taylor +TryBot-Result: Gobot Gobot +Reviewed-by: Avelino +Reviewed-by: Rob Pike +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj + + src/cmd/go/internal/load/pkg.go | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go +index 2660d3f..d40773b 100644 +--- a/src/cmd/go/internal/load/pkg.go ++++ b/src/cmd/go/internal/load/pkg.go +@@ -954,11 +954,12 @@ func (p *Package) load(stk *ImportStack, bp *build.Package, err error) *Package + + if cfg.BuildContext.CgoEnabled && p.Name == "main" && !p.Goroot { + // Currently build modes c-shared, pie (on systems that do not +- // support PIE with internal linking mode), plugin, and +- // -linkshared force external linking mode, as of course does ++ // support PIE with internal linking mode (currently all ++ // systems: issue #18968)), plugin, and -linkshared force ++ // external linking mode, as of course does + // -ldflags=-linkmode=external. External linking mode forces + // an import of runtime/cgo. +- pieCgo := cfg.BuildBuildmode == "pie" && (cfg.BuildContext.GOOS != "linux" || cfg.BuildContext.GOARCH != "amd64") ++ pieCgo := cfg.BuildBuildmode == "pie" + linkmodeExternal := false + for i, a := range cfg.BuildLdflags { + if a == "-linkmode=external" { +-- +2.14.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch new file mode 100644 index 000000000..83fd78c3d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch @@ -0,0 +1,43 @@ +From 21d83dd9499e5be30eea28dd7034d1ea2a01c838 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Tue, 14 Nov 2017 07:38:42 -0800 +Subject: [PATCH 10/10] make.bash: override CC when building dist and + go_bootstrap + +For cross-canadian builds, dist and go_bootstrap +run on the build host, so CC needs to point to the +build host's C compiler. Add a BUILD_CC environment +for this, falling back to $CC if not present. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index 0bdadc6..f199349 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -131,7 +131,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++CC=${BUILD_CC:-${CC}} GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist + + # -e doesn't propagate out of eval, so check success by hand. + eval $(./cmd/dist/dist env -p || echo FAIL=true) +@@ -167,7 +167,7 @@ elif [ "$1" = "--host-only" ]; then + fi + + if [ "$do_host_build" = "yes" ]; then +- ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ CC=${BUILD_CC:-${CC}} ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap + # Delay move of dist tool to now, because bootstrap may clear tool directory. + mv cmd/dist/dist "$GOTOOLDIR"/dist + echo +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch new file mode 100644 index 000000000..d6bd7fa39 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch @@ -0,0 +1,111 @@ +Change the dynamic linker hardcoding to use musl when not using glibc +this should be applied conditional to musl being the system C library + +Upstream-Status: Inappropriate [Real Fix should be portable across libcs] + +Signed-off-by: Khem Raj + +Index: go/src/cmd/link/internal/amd64/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/amd64/obj.go ++++ go/src/cmd/link/internal/amd64/obj.go +@@ -67,7 +67,7 @@ func Init() { + ld.Thearch.Append64 = ld.Append64l + ld.Thearch.TLSIEtoLE = tlsIEtoLE + +- ld.Thearch.Linuxdynld = "/lib64/ld-linux-x86-64.so.2" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-x86_64.so.1" + ld.Thearch.Freebsddynld = "/libexec/ld-elf.so.1" + ld.Thearch.Openbsddynld = "/usr/libexec/ld.so" + ld.Thearch.Netbsddynld = "/libexec/ld.elf_so" +Index: go/src/cmd/link/internal/arm/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/arm/obj.go ++++ go/src/cmd/link/internal/arm/obj.go +@@ -63,7 +63,7 @@ func Init() { + ld.Thearch.Append32 = ld.Append32l + ld.Thearch.Append64 = ld.Append64l + +- ld.Thearch.Linuxdynld = "/lib/ld-linux.so.3" // 2 for OABI, 3 for EABI ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-armhf.so.1" + ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1" + ld.Thearch.Openbsddynld = "/usr/libexec/ld.so" + ld.Thearch.Netbsddynld = "/libexec/ld.elf_so" +Index: go/src/cmd/link/internal/arm64/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/arm64/obj.go ++++ go/src/cmd/link/internal/arm64/obj.go +@@ -62,7 +62,7 @@ func Init() { + ld.Thearch.Append32 = ld.Append32l + ld.Thearch.Append64 = ld.Append64l + +- ld.Thearch.Linuxdynld = "/lib/ld-linux-aarch64.so.1" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-aarch64.so.1" + + ld.Thearch.Freebsddynld = "XXX" + ld.Thearch.Openbsddynld = "XXX" +Index: go/src/cmd/link/internal/mips/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/mips/obj.go ++++ go/src/cmd/link/internal/mips/obj.go +@@ -77,7 +77,7 @@ func Init() { + ld.Thearch.Append64 = ld.Append64b + } + +- ld.Thearch.Linuxdynld = "/lib/ld.so.1" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-mipsle.so.1" + + ld.Thearch.Freebsddynld = "XXX" + ld.Thearch.Openbsddynld = "XXX" +Index: go/src/cmd/link/internal/mips64/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/mips64/obj.go ++++ go/src/cmd/link/internal/mips64/obj.go +@@ -75,7 +75,7 @@ func Init() { + ld.Thearch.Append64 = ld.Append64b + } + +- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1" ++ ld.Thearch.Linuxdynld = "/lib64/ld-musl-mips64le.so.1" + + ld.Thearch.Freebsddynld = "XXX" + ld.Thearch.Openbsddynld = "XXX" +Index: go/src/cmd/link/internal/ppc64/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/ppc64/obj.go ++++ go/src/cmd/link/internal/ppc64/obj.go +@@ -77,7 +77,7 @@ func Init() { + } + + // TODO(austin): ABI v1 uses /usr/lib/ld.so.1 +- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-powerpc64le.so.1" + + ld.Thearch.Freebsddynld = "XXX" + ld.Thearch.Openbsddynld = "XXX" +Index: go/src/cmd/link/internal/s390x/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/s390x/obj.go ++++ go/src/cmd/link/internal/s390x/obj.go +@@ -62,7 +62,7 @@ func Init() { + ld.Thearch.Append32 = ld.Append32b + ld.Thearch.Append64 = ld.Append64b + +- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-s390x.so.1" + + // not relevant for s390x + ld.Thearch.Freebsddynld = "XXX" +Index: go/src/cmd/link/internal/x86/obj.go +=================================================================== +--- go.orig/src/cmd/link/internal/x86/obj.go ++++ go/src/cmd/link/internal/x86/obj.go +@@ -63,7 +63,7 @@ func Init() { + ld.Thearch.Append32 = ld.Append32l + ld.Thearch.Append64 = ld.Append64l + +- ld.Thearch.Linuxdynld = "/lib/ld-linux.so.2" ++ ld.Thearch.Linuxdynld = "/lib/ld-musl-i386.so.1" + ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1" + ld.Thearch.Openbsddynld = "/usr/libexec/ld.so" + ld.Thearch.Netbsddynld = "/usr/libexec/ld.elf_so" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb deleted file mode 100644 index 3d4141e87..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -BOOTSTRAP = "1.4" -require go-native.inc -require go-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc index f74b8b765..9af68738a 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc @@ -14,9 +14,13 @@ LICENSE = "BSD-3-Clause" inherit goarch -SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz" +SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main" S = "${WORKDIR}/go" B = "${S}" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" SSTATE_SCAN_CMD = "true" + +do_compile_prepend() { + BUILD_CC=${BUILD_CC} +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc new file mode 100644 index 000000000..8afda6b2c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc @@ -0,0 +1,62 @@ +inherit cross-canadian + +DEPENDS = "go-native virtual/${HOST_PREFIX}go-crosssdk virtual/nativesdk-${HOST_PREFIX}go-runtime \ + virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc \ + virtual/nativesdk-${HOST_PREFIX}compilerlibs" +PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" + +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOHOSTOS_CROSS = "${HOST_GOOS}" +export GOHOSTARCH_CROSS = "${HOST_GOARCH}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" +export GOROOT_FINAL = "${libdir}/go" +export CGO_ENABLED = "1" +export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" +export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" +CC = "${HOST_PREFIX}gcc" +export CGO_CFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${CFLAGS}" +export CGO_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}" +export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"' + +do_configure[noexec] = "1" + +do_compile() { + export GOBIN="${B}/bin" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + cd src + ./make.bash --host-only --no-banner + cd ${B} +} + + +make_wrapper() { + rm -f ${D}${bindir}/$2 + cat <${D}${bindir}/$2 +#!/bin/sh +here=\`dirname \$0\` +native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\` +export GOARCH="${TARGET_GOARCH}" +export GOOS="${TARGET_GOOS}" +test -n "\$GOARM" || export GOARM="${TARGET_GOARM}" +test -n "\$GO386" || export GO386="${TARGET_GO386}" +export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}" +test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go" +\$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$2 +} + +do_install() { + install -d ${D}${libdir}/go/pkg/tool + cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/ + install -d ${D}${bindir} ${D}${libdir}/go/bin + for f in ${B}/${GO_BUILD_BINDIR}/* + do + base=`basename $f` + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base ${TARGET_PREFIX}$base + done +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb new file mode 100644 index 000000000..7ac9449e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb @@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc index 93206a5d0..3ac7211bc 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc @@ -1,18 +1,62 @@ inherit cross -DEPENDS += "gcc-cross-${TARGET_ARCH}" +PROVIDES = "virtual/${TARGET_PREFIX}go" +DEPENDS += "go-native" PN = "go-cross-${TARGET_ARCH}" -# Ignore how TARGET_ARCH is computed. -TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOARCH = "${TARGET_GOARCH}" +export GOARM = "${TARGET_GOARM}" +export GO386 = "${TARGET_GO386}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOROOT_FINAL = "${libdir}/go" +export CGO_ENABLED = "1" +export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" +export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" +CC = "${@d.getVar('BUILD_CC').strip()}" -FILESEXTRAPATHS =. "${FILE_DIRNAME}/go-cross:" +do_configure[noexec] = "1" -GOROOT_FINAL = "${libdir}/go" -export GOROOT_FINAL +do_compile() { + export GOBIN="${B}/bin" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + cd src + ./make.bash --host-only + cd ${B} +} -# x32 ABI is not supported on go compiler so far -COMPATIBLE_HOST_linux-gnux32 = "null" -# ppc32 is not supported in go compilers -COMPATIBLE_HOST_powerpc = "null" + +make_wrapper() { + rm -f ${D}${bindir}/$2 + cat <${D}${bindir}/$2 +#!/bin/bash +here=\`dirname \$0\` +export GOARCH="${TARGET_GOARCH}" +export GOOS="${TARGET_GOOS}" +export GOARM="\${GOARM:-${TARGET_GOARM}}" +export GO386="\${GO386:-${TARGET_GO386}}" +\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$2 +} + +do_install() { + install -d ${D}${libdir}/go + cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ + install -d ${D}${libdir}/go/src + (cd ${S}/src; for d in *; do \ + [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \ + done) + rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata + install -d ${D}${bindir} ${D}${libdir}/go/bin + for f in ${B}/bin/* + do + base=`basename $f` + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base ${TARGET_PREFIX}$base + done +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb deleted file mode 100644 index 56ee084b1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb +++ /dev/null @@ -1,5 +0,0 @@ -require go-cross.inc -require go_${PV}.bb - -# Go binaries are not understood by the strip tool. -INHIBIT_SYSROOT_STRIP = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb deleted file mode 100644 index 56ee084b1..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb +++ /dev/null @@ -1,5 +0,0 @@ -require go-cross.inc -require go_${PV}.bb - -# Go binaries are not understood by the strip tool. -INHIBIT_SYSROOT_STRIP = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb new file mode 100644 index 000000000..80b5a03f6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb @@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc new file mode 100644 index 000000000..f67e4b92a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc @@ -0,0 +1,54 @@ +inherit crosssdk + +DEPENDS = "go-native virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/${TARGET_PREFIX}binutils-crosssdk" +PN = "go-crosssdk-${TARGET_ARCH}" +PROVIDES = "virtual/${TARGET_PREFIX}go-crosssdk" + +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOARCH = "${TARGET_GOARCH}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOROOT_FINAL = "${libdir}/go" +export CGO_ENABLED = "1" +export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}" +export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}" +export GO_INSTALL = "cmd" +CC = "${@d.getVar('BUILD_CC').strip()}" + +do_configure[noexec] = "1" + +do_compile() { + export GOBIN="${B}/bin" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + cd src + ./make.bash --host-only + cd ${B} +} + +make_wrapper() { + rm -f ${D}${bindir}/$2 + cat <${D}${bindir}/$2 +#!/bin/bash +here=\`dirname \$0\` +export GOARCH="${TARGET_GOARCH}" +export GOOS="${TARGET_GOOS}" +\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$2 +} + +do_install() { + install -d ${D}${libdir}/go + install -d ${D}${libdir}/go/bin + install -d ${D}${libdir}/go/pkg/tool + install -d ${D}${bindir} + cp --preserve=mode,timestamps -R ${S}/pkg/tool/${BUILD_GOTUPLE} ${D}${libdir}/go/pkg/tool/ + for f in ${B}/bin/* + do + base=`basename $f` + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base ${TARGET_PREFIX}$base + done +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb new file mode 100644 index 000000000..1857c8a57 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb @@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb new file mode 100644 index 000000000..abfeb4837 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Dependency management tool for Golang" +HOMEPAGE = "https://github.com/golang/dep" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d" + +GO_IMPORT = "github.com/golang/dep" +SRC_URI = "git://${GO_IMPORT}" + +# Points to 0.3.0 tag +SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b" + +inherit go + +GO_INSTALL = "${GO_IMPORT}/cmd/dep" + +RDEPENDS_${PN}-dev += "bash" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc index c21f8fda7..95db1c2b7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc @@ -1,16 +1,28 @@ +# Use immediate assingment here to get the original (/usr/lib) +# instead of the one rewritten by native.bbclass. +nonstaging_libdir := "${libdir}" + inherit native -BOOTSTRAP ?= "" +SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4" +SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04" +SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" + export GOOS = "${BUILD_GOOS}" export GOARCH = "${BUILD_GOARCH}" -export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go${BOOTSTRAP}" -export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4" +CC = "${@d.getVar('BUILD_CC').strip()}" + export CGO_ENABLED = "1" -do_configure[noexec] = "1" +do_configure() { + cd ${WORKDIR}/go1.4/go/src + CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash +} do_compile() { export GOBIN="${B}/bin" + export GOROOT_FINAL="${nonstaging_libdir}/go" + export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" rm -rf ${GOBIN} mkdir ${GOBIN} @@ -18,7 +30,7 @@ do_compile() { mkdir -p ${WORKDIR}/build-tmp cd src - CGO_ENABLED=0 ./make.bash --host-only + ./make.bash --host-only } make_wrapper() { @@ -26,31 +38,25 @@ make_wrapper() { cat <${D}${bindir}/$2$3 #!/bin/bash here=\`dirname \$0\` -export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go$3\`}" -\$here/../lib/go$3/bin/$1 "\$@" +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" +\$here/../lib/go/bin/$1 "\$@" END - chmod +x ${D}${bindir}/$2$3 + chmod +x ${D}${bindir}/$2 } do_install() { - install -d ${D}${libdir}/go${BOOTSTRAP} - cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/ - install -d ${D}${libdir}/go${BOOTSTRAP}/src + install -d ${D}${libdir}/go + cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ + install -d ${D}${libdir}/go/src (cd ${S}/src; for d in *; do \ - [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go${BOOTSTRAP}/src/; \ + [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ done) - - install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin + rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata + install -d ${D}${bindir} ${D}${libdir}/go/bin for f in ${B}/bin/* do base=`basename $f` - install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin - make_wrapper $base $base ${BOOTSTRAP} + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base $base done } - -do_package[noexec] = "1" -do_packagedata[noexec] = "1" -do_package_write_ipk[noexec] = "1" -do_package_write_deb[noexec] = "1" -do_package_write_rpm[noexec] = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb deleted file mode 100644 index 182fca27a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb +++ /dev/null @@ -1,3 +0,0 @@ -require ${PN}.inc -require go-${PV}.inc -DEPENDS += "go-bootstrap-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb new file mode 100644 index 000000000..bbf3c0dd7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb @@ -0,0 +1,2 @@ +require ${PN}.inc +require go-${PV}.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc new file mode 100644 index 000000000..29ae86e4e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc @@ -0,0 +1,98 @@ +DEPENDS = "virtual/${TARGET_PREFIX}go go-native" +DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk" +PROVIDES = "virtual/${TARGET_PREFIX}go-runtime" + +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOARCH = "${TARGET_GOARCH}" +export GOARM = "${TARGET_GOARM}" +export GO386 = "${TARGET_GO386}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOROOT_FINAL = "${libdir}/go" +export GO_TARGET_INSTALL = "std" +export CGO_ENABLED = "1" +export CC_FOR_TARGET="${CC}" +export CXX_FOR_TARGET="${CXX}" +export GOROOT_OVERRIDE = "1" + +do_configure() { + : +} + +do_configure_libc-musl() { + rm -f ${S}/src/runtime/race/*.syso +} + +do_compile() { + export GOBIN="${B}/bin" + export CC="${@d.getVar('BUILD_CC').strip()}" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + cd src + ./make.bash --host-only + cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B} + rm -rf ${B}/pkg/${TARGET_GOTUPLE} + ./make.bash --target-only + if [ -n "${GO_DYNLINK}" ]; then + cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE} + GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only + fi + cd ${B} +} + +do_install() { + install -d ${D}${libdir}/go/src + cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ + if [ "${BUILD_GOTUPLE}" != "${TARGET_GOTUPLE}" ]; then + rm -rf ${D}${libdir}/go/pkg/${BUILD_GOTUPLE} + rm -rf ${D}${libdir}/go/pkg/obj/${BUILD_GOTUPLE} + fi + rm -rf ${D}${libdir}/go/pkg/tool + rm -rf ${D}${libdir}/go/pkg/obj + rm -rf ${D}${libdir}/go/pkg/bootstrap + find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do + cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/ + done + rm -f ${D}${libdir}/go/src/cmd/dist/dist +} + +# Remove test binaries that cannot be relocated +do_install_append_class-nativesdk() { + rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata +} + +# These testdata directories aren't needed for builds and contain binaries +# that can cause errors in sysroot_strip(), so just remove them. +sysroot_stage_all_append() { + find ${SYSROOT_DESTDIR}${libdir}/go/src -depth -type d -name 'testdata' -exec rm -rf {} \; +} + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}" +FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \ +" +FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \ + ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \ +" +# The testdata directories in the source tree include some binaries for various +# architectures, scripts, and .a files +INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb new file mode 100644 index 000000000..43b68b4e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb @@ -0,0 +1,2 @@ +require go-${PV}.inc +require go-runtime.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc new file mode 100644 index 000000000..cac5d7822 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc @@ -0,0 +1,61 @@ +inherit goarch +DEPENDS = "virtual/${TARGET_PREFIX}go go-native" +DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native" + +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOARCH = "${TARGET_GOARCH}" +export GOARM = "${TARGET_GOARM}" +export GO386 = "${TARGET_GO386}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOROOT_FINAL = "${libdir}/go" +export CGO_ENABLED = "1" +export CC_FOR_TARGET = "${CC}" +export CXX_FOR_TARGET = "${CXX}" +export GO_TARGET_INSTALL = "cmd" +export GO_FLAGS = "-a" +GO_LDFLAGS = "" +GO_LDFLAGS_class-nativesdk = "-linkmode external" +export GO_LDFLAGS + +SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}" +SECURITY_LDFLAGS = "" + +do_configure[noexec] = "1" + +do_compile() { + export GOBIN="${B}/bin" + export CC="${@d.getVar('BUILD_CC').strip()}" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + + export TMPDIR=${WORKDIR}/build-tmp + mkdir -p ${WORKDIR}/build-tmp + + cd src + ./make.bash + cd ${B} +} + +do_install() { + install -d ${D}${libdir}/go/pkg/tool + cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/ + install -d ${D}${libdir}/go/src + cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/ + install -d ${D}${libdir}/go/bin + install -d ${D}${bindir} + for f in ${B}/${GO_BUILD_BINDIR}/*; do + name=`basename $f` + install -m 0755 $f ${D}${libdir}/go/bin/ + ln -sf ../${BASELIB}/go/bin/$name ${D}${bindir}/ + done +} + +PACKAGES = "${PN} ${PN}-dev" +FILES_${PN} = "${libdir}/go/bin ${libdir}/go/pkg/tool/${TARGET_GOTUPLE} ${bindir}" +FILES_${PN}-dev = "${libdir}/go" +RDEPENDS_${PN}-dev = "perl bash" +INSANE_SKIP_${PN} = "ldflags" + +BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc deleted file mode 100644 index 25437ddfe..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc +++ /dev/null @@ -1,86 +0,0 @@ -inherit goarch -DEPENDS += "go-bootstrap-native" - -# libgcc is required for the target specific libraries to build -# properly, but apparently not for go-cross and, more importantly, -# also can't be used there because go-cross cannot depend on -# the tune-specific libgcc. Otherwise go-cross also would have -# to be tune-specific. -DEPENDS += "${@ 'libgcc' if not oe.utils.inherits(d, 'cross') else ''}" - -# Prevent runstrip from running because you get errors when the host arch != target arch -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_SYSROOT_STRIP = "1" - -# x32 ABI is not supported on go compiler so far -COMPATIBLE_HOST_linux-gnux32 = "null" -# ppc32 is not supported in go compilers -COMPATIBLE_HOST_powerpc = "null" - -export GOHOSTOS = "${BUILD_GOOS}" -export GOHOSTARCH = "${BUILD_GOARCH}" -export GOOS = "${TARGET_GOOS}" -export GOARCH = "${TARGET_GOARCH}" -export GOARM = "${TARGET_GOARM}" -export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4" -export GOROOT_FINAL = "${libdir}/go" -export CGO_ENABLED = "1" -export CC_FOR_TARGET = "${CC}" -export CXX_FOR_TARGET = "${CXX}" - -do_configure[noexec] = "1" - -do_compile_prepend_class-cross() { - export CGO_ENABLED=0 -} - -do_compile() { - export GOBIN="${B}/bin" - export CC="${@d.getVar('BUILD_CC', True).strip()}" - rm -rf ${GOBIN} ${B}/pkg - mkdir ${GOBIN} - - export TMPDIR=${WORKDIR}/build-tmp - mkdir -p ${WORKDIR}/build-tmp - - cd src - ./make.bash --host-only - # Ensure cgo.a is built with the target toolchain - export GOBIN="${B}/target/bin" - rm -rf ${GOBIN} - mkdir -p ${GOBIN} - GO_FLAGS="-a" ./make.bash -} - -do_install_class-target() { - install -d ${D}${libdir}/go - cp -a ${B}/pkg ${D}${libdir}/go/ - install -d ${D}${libdir}/go/src - (cd ${S}/src; for d in *; do \ - [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ - done) - install -d ${D}${bindir} - if [ -d ${B}/bin/${GOOS}_${GOARCH} ] - then - install -m 0755 ${B}/bin/${GOOS}_${GOARCH}/* ${D}${bindir} - else - install -m 0755 ${B}/bin/* ${D}${bindir} - fi -} - -do_install_class-cross() { - install -d ${D}${libdir}/go - cp -a ${B}/pkg ${D}${libdir}/go/ - install -d ${D}${libdir}/go/src - (cd ${S}/src; for d in *; do \ - [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ - done) - install -d ${D}${bindir} - for f in ${B}/bin/go* - do - install -m755 $f ${D}${bindir} - done -} -do_package_qa[noexec] = "1" - -RDEPENDS_${PN} += "perl" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb deleted file mode 100644 index 2f590338c..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb +++ /dev/null @@ -1,4 +0,0 @@ -require go.inc -require go-${PV}.inc - -BBCLASSEXTEND = "cross" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb deleted file mode 100644 index e7a6ab277..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-${PV}.inc -require go.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb deleted file mode 100644 index 091b1318a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb +++ /dev/null @@ -1,3 +0,0 @@ -require go-${PV}.inc -require go.inc -TUNE_CCARGS_remove = "-march=mips32r2" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb new file mode 100644 index 000000000..c67e2cb05 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb @@ -0,0 +1,2 @@ +require go-${PV}.inc +require go-target.inc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch deleted file mode 100644 index f1788b62f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch +++ /dev/null @@ -1,19 +0,0 @@ -guile: add aarch64 recognition - -Assume little-endian. - -Upstream-Status: Pending - -Signed-off-by: joe.slater@windriver.com - ---- a/module/system/base/target.scm -+++ b/module/system/base/target.scm -@@ -70,6 +70,8 @@ - ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" - "mips" "mips64")) - (endianness big)) -+ ((string-match "^aarch64" cpu) -+ (endianness little)) - ((string-match "^arm.*eb" cpu) - (endianness big)) - ((string-match "^arm.*" cpu) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch deleted file mode 100644 index ea4328b81..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch +++ /dev/null @@ -1,23 +0,0 @@ -Support form ARM endianness - -Fixes Yocto bug# 2729 - -Signed-off-by: Khem Raj - -Upstream-Status: Pending - -Index: guile-2.0.5/module/system/base/target.scm -=================================================================== ---- guile-2.0.5.orig/module/system/base/target.scm 2012-01-24 03:06:06.000000000 -0800 -+++ guile-2.0.5/module/system/base/target.scm 2012-07-12 13:05:44.372364103 -0700 -@@ -70,7 +70,9 @@ - ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" - "mips" "mips64")) - (endianness big)) -- ((string-match "^arm.*el" cpu) -+ ((string-match "^arm.*eb" cpu) -+ (endianness big)) -+ ((string-match "^arm.*" cpu) - (endianness little)) - (else - (error "unknown CPU endianness" cpu))))) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch deleted file mode 100644 index c7bf635ac..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch +++ /dev/null @@ -1,39 +0,0 @@ -Upstream-Status: Inappropriate [debian patch] - -Signed-off-by: Nitin A Kamble - -From e52bfcdbaca5dce498678d8f512381e3e39a4066 Mon Sep 17 00:00:00 2001 -From: Rob Browning -Date: Sun, 18 Mar 2012 11:40:55 -0500 -Subject: Mark "Unused modules are removed" gc test as unresolved. - -As per discussion with upstream, mark this test as unresolved since it -may produce false negatives, depending on the behavior/timing of the -garbage collector. ---- - test-suite/tests/gc.test | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test -index a969752..8c8e13e 100644 ---- a/test-suite/tests/gc.test -+++ b/test-suite/tests/gc.test -@@ -84,11 +84,13 @@ - ;; one gc round. not sure why. - - (maybe-gc-flakiness -- (= (let lp ((i 0)) -- (if (guard) -- (lp (1+ i)) -- i)) -- total)))) -+ (or (= (let lp ((i 0)) -+ (if (guard) -+ (lp (1+ i)) -+ i)) -+ total) -+ (throw 'unresolved))))) -+ - - (pass-if "Lexical vars are collectable" - (let ((l (compile diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch deleted file mode 100644 index d3faf3e01..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch +++ /dev/null @@ -1,33 +0,0 @@ -Upstream-Status: Inappropriate [debian patch] - -Signed-off-by: Nitin A Kamble - -From 848543091d55dddb54a85612155964506d712852 Mon Sep 17 00:00:00 2001 -From: Rob Browning -Date: Sun, 18 Mar 2012 13:28:24 -0500 -Subject: Mark "mutex with owner not retained" threads test as unresolved. - -As per discussion with upstream, mark this test as unresolved since it -may produce false negatives, depending on the behavior/timing of the -garbage collector. ---- - test-suite/tests/threads.test | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test -index 85a7c38..50899cb 100644 ---- a/test-suite/tests/threads.test -+++ b/test-suite/tests/threads.test -@@ -414,8 +414,10 @@ - - (gc) (gc) - (let ((m (g))) -- (and (mutex? m) -- (eq? (mutex-owner m) (current-thread))))))) -+ (or -+ (and (mutex? m) -+ (eq? (mutex-owner m) (current-thread))) -+ (throw 'unresolved)))))) - - ;; - ;; mutex lock levels diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch deleted file mode 100644 index 5597bb21f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch +++ /dev/null @@ -1,24 +0,0 @@ -Upstream-Status: Pending - -This fixes sed issue when prefix has / in it, like /usr/local - -autoreconf error avoided: -| sed: -e expression #1, char 9: unknown option to `s' -| configure.ac:39: error: AC_INIT should be called with package and version arguments - -Signed-off-by: Nitin A Kamble -2012/05/01 - -Index: guile-2.0.5/build-aux/git-version-gen -=================================================================== ---- guile-2.0.5.orig/build-aux/git-version-gen -+++ guile-2.0.5/build-aux/git-version-gen -@@ -187,7 +187,7 @@ else - v=UNKNOWN - fi - --v=`echo "$v" |sed "s/^$prefix//"` -+v=`echo "$v" |sed "s#^$prefix##"` - - # Test whether to append the "-dirty" suffix only if the version - # string we're using came from git. I.e., skip the test if it's "UNKNOWN" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch deleted file mode 100644 index 290b9d447..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9c4e120a7a87db34d22a50883a5a525170b480d7 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Tue, 6 Jan 2015 23:10:51 -0800 -Subject: [PATCH] libguile/Makefile.am: install-data-hook -> install-exec-hook - -It may install such a file: -/usr/lib64/libguile-2.0*-gdb.scm - -This is because when there is no file in the directory: -for f in libguile-2.0*; do - [snip] -done - -The f would be libguile-2.0* itself, use install-exec-hook will fix the -problem since it depends on install-libLTLIBRARIES. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - libguile/Makefile.am | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/libguile/Makefile.am b/libguile/Makefile.am -index 5decd99..52645b7 100644 ---- a/libguile/Makefile.am -+++ b/libguile/Makefile.am -@@ -446,10 +446,8 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \ - ## delete guile-snarf.awk from the installation bindir, in case it's - ## lingering there due to an earlier guile version not having been - ## wiped out. --install-exec-hook: -+install-exec-hook: libguile-2.0-gdb.scm - rm -f $(DESTDIR)$(bindir)/guile-snarf.awk -- --install-data-hook: libguile-2.0-gdb.scm - @$(MKDIR_P) $(DESTDIR)$(libdir) - ## We want to install libguile-2.0-gdb.scm as SOMETHING-gdb.scm. - ## SOMETHING is the full name of the final library. We want to ignore --- -1.7.9.5 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch deleted file mode 100644 index da69b5fd7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch +++ /dev/null @@ -1,39 +0,0 @@ -Upstream-Status: Inappropriate [opensuse patch] - -Signed-off-by: Nitin A Kamble - -Index: guile-2.0.3/libguile/hash.c -=================================================================== ---- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700 -+++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800 -@@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz - unsigned long - scm_ihashq (SCM obj, unsigned long n) - { -- return (SCM_UNPACK (obj) >> 1) % n; -+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n; - } - - -@@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n) - if (SCM_NUMP(obj)) - return (unsigned long) scm_hasher(obj, n, 10); - else -- return SCM_UNPACK (obj) % n; -+ return (unsigned long) SCM_UNPACK (obj) % n; - } - - -Index: guile-2.0.3/libguile/struct.c -=================================================================== ---- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700 -+++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800 -@@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon - { - /* The length of the hash table should be a relative prime it's not - necessary to shift down the address. */ -- return SCM_UNPACK (obj) % n; -+ return (unsigned long) SCM_UNPACK (obj) % n; - } - - SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch deleted file mode 100644 index 6c348384a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch +++ /dev/null @@ -1,60 +0,0 @@ -libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O - -While compiling with option -g -O, there was a ssa corruption: -.. -Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE. -sp_48(ab) and sp_3476(ab) -guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine': -guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption - #define VM_NAME vm_debug_engine - ^ -guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME' - VM_NAME (SCM vm, SCM program, SCM *argv, int nargs) - ^ -Please submit a full bug report, -with preprocessed source if appropriate. -See for instructions. -... - -Tweak libguile/vm-i-system.c to add boundary value check to workaround it. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia ---- - libguile/vm-i-system.c | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c ---- a/libguile/vm-i-system.c -+++ b/libguile/vm-i-system.c -@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6, - /* now shuffle up, from walk to ntotal */ - { - scm_t_ptrdiff nshuf = sp - walk + 1, i; -- sp = (fp - 1) + ntotal + nshuf; -- CHECK_OVERFLOW (); -- for (i = 0; i < nshuf; i++) -- sp[-i] = walk[nshuf-i-1]; -+ /* check the value of nshuf to workaround ice ssa corruption */ -+ /* while compiling with -O -g */ -+ if (nshuf > 0) -+ { -+ sp = (fp - 1) + ntotal + nshuf; -+ CHECK_OVERFLOW (); -+ for (i = 0; i < nshuf; i++) -+ sp[-i] = walk[nshuf-i-1]; -+ } -+ else -+ { -+ sp = (fp - 1) + ntotal + nshuf; -+ CHECK_OVERFLOW (); -+ for (i = 0; i < nshuf; i++) -+ sp[-i] = walk[nshuf-i-1]; -+ } - } - /* and fill optionals & keyword args with SCM_UNDEFINED */ - while (walk <= (fp - 1) + ntotal) --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb deleted file mode 100644 index 7a01d0ffc..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb +++ /dev/null @@ -1,125 +0,0 @@ -SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions" -DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\ - the official extension language for the GNU operating system.\ - Guile is a library designed to help programmers create flexible applications.\ - Using Guile in an application allows the application's functionality to be\ - extended by users or other programmers with plug-ins, modules, or scripts.\ - Guile provides what might be described as 'practical software freedom,'\ - making it possible for users to customize an application to meet their\ - needs without digging into the application's internals." - -HOMEPAGE = "http://www.gnu.org/software/guile/" -SECTION = "devel" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \ - file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \ - file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \ - file://opensuse/guile-64bit.patch \ - file://guile_2.0.6_fix_sed_error.patch \ - file://arm_endianness.patch \ - file://arm_aarch64.patch \ - file://workaround-ice-ssa-corruption.patch \ - file://libguile-Makefile.am-hook.patch \ - " - -SRC_URI[md5sum] = "c64977c775effd19393364b3018fd8cd" -SRC_URI[sha256sum] = "e8442566256e1be14e51fc18839cd799b966bc5b16c6a1d7a7c35155a8619d82" - -inherit autotools gettext pkgconfig texinfo -BBCLASSEXTEND = "native" - -# Fix "Argument list too long" error when len(TMPDIR) = 410 -acpaths = "-I ./m4" - -DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline" -# add guile-native only to the target recipe's DEPENDS -DEPENDS_append_class-target = " guile-native libatomic-ops" - -# The comment of the script guile-config said it has been deprecated but we should -# at least add the required dependency to make it work since we still provide the script. -RDEPENDS_${PN} = "pkgconfig" - -RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1" - -EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}" - -EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \ - --with-libgmp-prefix=${STAGING_LIBDIR} \ - --with-libltdl-prefix=${STAGING_LIBDIR}" -EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no " - -CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \ - -DHAVE_GC_GET_HEAP_USAGE_SAFE \ - -DHAVE_GC_GET_FREE_SPACE_DIVISOR \ - -DHAVE_GC_SET_FINALIZE_ON_DEMAND \ - " - -do_configure_prepend() { - mkdir -p po -} - -export GUILE_FOR_BUILD="${BUILD_SYS}-guile" - -do_install_append_class-native() { - install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile - - create_wrapper ${D}/${bindir}/guile \ - GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ - GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache - create_wrapper ${D}${bindir}/${HOST_SYS}-guile \ - GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ - GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache -} - -do_install_append_class-target() { - # cleanup buildpaths in scripts - sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config - sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf - - sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc -} - -do_install_append_libc-musl() { - rm -f ${D}${libdir}/charset.alias -} - -SYSROOT_PREPROCESS_FUNCS = "guile_cross_config" - -guile_cross_config() { - # this is only for target recipe - if [ "${PN}" = "guile" ] - then - # Create guile-config returning target values instead of native values - install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} - printf '#!%s \\\n--no-auto-compile -e main -s\n!#\n(define %%guile-build-info %s(\n' $(which ${BUILD_SYS}-guile) "'" \ - > ${B}/guile-config.cross - sed -n -e 's:^[ \t]*{[ \t]*": (:' \ - -e 's:",[ \t]*": . ":' \ - -e 's:" *}, *\\:"):' \ - -e 's:^.*cachedir.*$::' \ - -e '/^ (/p' \ - < ${B}/libguile/libpath.h >> ${B}/guile-config.cross - echo '))' >> ${B}/guile-config.cross - cat ${B}/meta/guile-config >> ${B}/guile-config.cross - install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config - fi -} - -# Guile needs the compiled files to be newer than the source, and it won't -# auto-compile into the prefix even if it can write there, so touch them here as -# sysroot is managed. -SSTATEPOSTINSTFUNCS += "guile_sstate_postinst" -GUILESSTATEDIR = "${COMPONENTS_DIR}/${TUNE_PKGARCH}/${PN}/${libdir}/guile/2.0/ccache" -GUILESSTATEDIR_class-native = "${COMPONENTS_DIR}/${BUILD_ARCH}/${PN}/${libdir_native}/guile/2.0/ccache" -guile_sstate_postinst() { - if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] - then - find ${GUILESSTATEDIR} -type f | xargs touch - fi -} - -# http://errors.yoctoproject.org/Errors/Details/20491/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb index 4d255423e..c01725229 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb @@ -1,4 +1,5 @@ SUMMARY = "Set of i2c tools for linux" +HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools" SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb index 551bdf061..ecff2faf2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb @@ -16,7 +16,7 @@ UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/" DEPENDS = "libxml-parser-perl-native" RDEPENDS_${PN} = "gettext-dev libxml-parser-perl" -DEPENDS_class-native = "libxml-parser-perl-native" +DEPENDS_class-native = "libxml-parser-perl-native gettext-native" inherit autotools pkgconfig perlnative diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch index df3b6002a..537be5e6d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch @@ -1,14 +1,11 @@ -From 9522ac8e5d5b20a472f3ffc356d388d36f7f582c Mon Sep 17 00:00:00 2001 +From 7b24f8bd95ad4f7d00c93ca2ad998c14a0266dbe Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 21 Mar 2017 08:42:11 +0100 Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit --- -Upstream-Status: Backport [https://github.com/json-c/json-c/commit/014924ba899f659917bb64392bbff7d3c803afc2] -Signed-off-by: André Draszik +Upstream-Status: Backport +Signed-off-by: Khem Raj json_object.c | 1 + json_tokener.c | 1 + @@ -28,10 +25,10 @@ index 6cc73bc..77e8b21 100644 return 0; } diff --git a/json_tokener.c b/json_tokener.c -index 7fa32ae..b32d657 100644 +index 9a76293..ae7b1ae 100644 --- a/json_tokener.c +++ b/json_tokener.c -@@ -306,6 +306,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, +@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, tok->err = json_tokener_error_parse_unexpected; goto out; } @@ -73,5 +70,5 @@ index 712c387..74e3b0f 100644 break; case 0 : return c; -- -2.14.1 +2.12.2 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch deleted file mode 100644 index bfe9d7231..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 93582ad85ef48c18ac12f00a9a9e124989b1fcab Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Fri, 1 May 2015 12:52:18 +0200 -Subject: [PATCH] Link against libm when needed - -In certain C libraries (e.g uClibc), isnan() and related functions are -implemented in libm, so json-c needs to link against it. This commit -therefore adds an AC_TRY_LINK() test to check whether a program -calling isnan() can be properly linked with no special flags. If not, -we assume linking against libm is needed. - -The json-c.pc.in file is also adjusted so that in the case of static -linking against json-c, -lm is also used. - -Signed-off-by: Thomas Petazzoni ---- -Upstream-Status: Backport - - configure.ac | 4 ++++ - json-c.pc.in | 3 ++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index c50f81b..30e7174 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include ]]) - AC_CHECK_DECLS([_isnan], [], [], [[#include ]]) - AC_CHECK_DECLS([_finite], [], [], [[#include ]]) - -+if test "$ac_cv_have_decl_isnan" = "yes" ; then -+ AC_TRY_LINK([#include ], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"]) -+fi -+ - #check if .section.gnu.warning accepts long strings (for __warn_references) - AC_LANG_PUSH([C]) - -diff --git a/json-c.pc.in b/json-c.pc.in -index 037739d..05bfbc8 100644 ---- a/json-c.pc.in -+++ b/json-c.pc.in -@@ -6,6 +6,7 @@ includedir=@includedir@ - Name: json-c - Description: JSON implementation in C - Version: @VERSION@ --Requires: -+Requires: -+Libs.private: @LIBS@ - Libs: -L${libdir} -ljson-c - Cflags: -I${includedir}/json-c --- -2.8.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch deleted file mode 100644 index d29d9118d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001 -From: James Myatt -Date: Thu, 5 Feb 2015 15:57:14 +0000 -Subject: [PATCH] json_tokener requires INF and NAN - ---- -Upstream-Status: Backport - - json_tokener.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: json-c-0.12/json_tokener.c -=================================================================== ---- json-c-0.12.orig/json_tokener.c -+++ json-c-0.12/json_tokener.c -@@ -16,6 +16,7 @@ - #include "config.h" - - #include -+#include "math_compat.h" - #include - #include - #include -@@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e - - case json_tokener_state_inf: /* aka starts with 'i' */ - { -- int size; -- int size_inf; -+ size_t size_inf; - int is_negative = 0; - - printbuf_memappend_fast(tok->pb, &c, 1); -- size = json_min(tok->st_pos+1, json_null_str_len); - size_inf = json_min(tok->st_pos+1, json_inf_str_len); - char *infbuf = tok->pb->buf; - if (*infbuf == '-') diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb new file mode 100644 index 000000000..401cf1320 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "C bindings for apps which will manipulate JSON data" +DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C." +HOMEPAGE = "https://github.com/json-c/json-c/wiki" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" + +SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ + file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \ + " +SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d" +SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123" + +UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+).tar" +# json-c releases page is fetching the list of releases in some weird XML format +# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/ +#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html" +RECIPE_UPSTREAM_VERSION = "0.12.1" +RECIPE_UPSTREAM_DATE = "Jun 07, 2016" +CHECK_DATE = "Apr 19, 2017" + +RPROVIDES_${PN} = "libjson" + +inherit autotools + +EXTRA_OECONF = "--enable-rdrand" + +do_configure_prepend() { + # Clean up autoconf cruft that should not be in the tarball + rm -f ${S}/config.status +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb deleted file mode 100644 index 072c092c0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "C bindings for apps which will manipulate JSON data" -DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C." -HOMEPAGE = "https://github.com/json-c/json-c/wiki" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" - -SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ - file://0001-json_tokener-requires-INF-and-NAN.patch \ - file://0001-Link-against-libm-when-needed.patch \ - file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \ - " - -SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" -SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f" - -UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+).tar" -# json-c releases page is fetching the list of releases in some weird XML format -# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/ -#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html" -RECIPE_UPSTREAM_VERSION = "0.12" -RECIPE_UPSTREAM_DATE = "Apr 11, 2014" -CHECK_DATE = "Dec 04, 2015" - -RPROVIDES_${PN} = "libjson" - -inherit autotools - -do_configure_prepend() { - # Clean up autoconf cruft that should not be in the tarball - rm -f ${S}/config.status -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb deleted file mode 100644 index 4ca0e4da3..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2012 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Linux kernel style configuration framework for other projects" -DESCRIPTION = "The kconfig-frontends project aims at centralising \ -the effort of keeping an up-to-date, out-of-tree, packaging of the \ -kconfig infrastructure, ready for use by third-party projects. \ -The kconfig-frontends package provides the kconfig parser, as well as all \ -the frontends" -HOMEPAGE = "http://ymorin.is-a-geek.org/projects/kconfig-frontends" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408" -SECTION = "devel" -DEPENDS += "ncurses flex bison gperf-native" -RDEPENDS_${PN} += "python bash" -SRC_URI = "git://ymorin.is-a-geek.org/kconfig-frontends" - -SRCREV = "75d35b172fc0f7b6620dd659af41f2ce04edc4e6" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig -do_configure_prepend () { - mkdir -p ${S}/scripts/.autostuff/m4 -} - -do_install_append() { - ln -s kconfig-conf ${D}${bindir}/conf - ln -s kconfig-mconf ${D}${bindir}/mconf -} - -EXTRA_OECONF += "--disable-gconf --disable-qconf" - -# Some packages have the version preceeding the .so instead properly -# versioned .so., so we need to reorder and repackage. -SOLIBS = "-${@d.getVar('PV')[:-2]}.so" -FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so" - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch index ec1fdc409..dc3d97635 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:26:00 +0200 Subject: [PATCH 2/2] Set library installation path correctly -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/libcomps/pull/32] Signed-off-by: Alexander Kanavin --- libcomps/src/CMakeLists.txt | 2 +- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch index 73acda6af..791a32e74 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch @@ -7,7 +7,7 @@ Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for For some reason cmake is not able to find it when building in openembedded, and it's bundled with the source code anyway. -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin --- cmake/modules/FindGtkDoc.cmake | 2 +- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch index 954add6e7..280edb7a6 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch @@ -1,28 +1,29 @@ -From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001 +From 3012a93745223751cc979e3770207a09a075bec6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 7 Feb 2017 12:16:03 +0200 -Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is +Subject: [PATCH 5/5] Get parameters for both libsolv and libsolvext (libdnf is using both) -Upstream-Status: Pending [depends on whether https://github.com/openSUSE/libsolv/pull/177 is accepted] +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin + --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index b531da1..e512da0 100644 +index 8b2ab9a..e2d33d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED) +@@ -29,7 +29,7 @@ find_package (PkgConfig REQUIRED) SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED) FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) -PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext) set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - pkg_check_modules (CHECK REQUIRED check) - pkg_check_modules (REPO REQUIRED librepo) + if (ENABLE_RHSM_SUPPORT) + pkg_check_modules (RHSM REQUIRED librhsm) -- 2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch index 3d772a5f8..7eecc3d05 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:17:19 +0200 Subject: [PATCH 2/4] Prefix sysroot path to introspection tools path. -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin --- libdnf/CMakeLists.txt | 4 ++-- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch index d7e59d833..81264094e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:20:01 +0200 Subject: [PATCH 3/4] Set the library installation directory correctly. -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin --- CMakeLists.txt | 4 +++- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch index 931959b5f..1ea931089 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch @@ -1,29 +1,30 @@ -From 6d2718b925453f9a6915001f489606eb8e4086c8 Mon Sep 17 00:00:00 2001 +From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:24:50 +0200 -Subject: [PATCH 4/4] Set libsolv variables with pkg-config (cmake's own module +Subject: [PATCH 4/5] Set libsolv variables with pkg-config (cmake's own module doesn't work properly). -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin + --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8edb627..b531da1 100644 +index a75df04..8b2ab9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,7 +28,8 @@ find_package (PkgConfig REQUIRED) +@@ -29,7 +29,8 @@ find_package (PkgConfig REQUIRED) SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED) FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) -find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext) +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) +set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - pkg_check_modules (CHECK REQUIRED check) - pkg_check_modules (REPO REQUIRED librepo) - FIND_PROGRAM (VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin) + if (ENABLE_RHSM_SUPPORT) + pkg_check_modules (RHSM REQUIRED librhsm) + include_directories (${RHSM_INCLUDE_DIRS}) -- 2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb new file mode 100644 index 000000000..01d9346d9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb @@ -0,0 +1,28 @@ +SUMMARY = "Library providing simplified C and Python API to libsolv" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/rpm-software-management/libdnf \ + file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ + file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \ + file://0003-Set-the-library-installation-directory-correctly.patch \ + file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ + file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ + " + +SRCREV = "1b19950e82d88eec28d01b4e7c1da712c941201d" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc" + +inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base + +EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ + " +EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" +EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb deleted file mode 100644 index ef28611f8..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Library providing simplified C and Python API to libsolv" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/libdnf \ - file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ - file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \ - file://0003-Set-the-library-installation-directory-correctly.patch \ - file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ - file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ - " - -PV = "0.2.3+git${SRCPV}" -SRCREV = "367545629cc01a8e622890d89bd13d062ce60d7b" - -S = "${WORKDIR}/git" - -DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc" - -inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base - -EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ - " -EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" -EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" - -BBCLASSEXTEND = "native nativesdk" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch index 01fea4046..08a58f175 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:04:35 +0200 Subject: [PATCH 1/4] Correctly set the library installation directory -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110] Signed-off-by: Alexander Kanavin --- librepo/CMakeLists.txt | 3 ++- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch index 0d2fae434..89ca60e81 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:06:24 +0200 Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110] Signed-off-by: Alexander Kanavin --- tests/python/tests/test_yum_repo_downloading.py | 2 +- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch index 6665b316c..f7d7ab3a2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch @@ -4,7 +4,7 @@ Date: Fri, 30 Dec 2016 18:23:27 +0200 Subject: [PATCH 4/4] Set gpgme variables with pkg-config, not with cmake module (which doesn't work properly) -Upstream-Status: Pending +Upstream-Status: Inappropriate [gpgme upstream does not have pkg-config support and is not interested in it] Signed-off-by: Alexander Kanavin --- CMakeLists.txt | 3 ++- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch new file mode 100644 index 000000000..b0c7d1ca3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch @@ -0,0 +1,40 @@ +From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 8 Jun 2017 16:31:30 +0800 +Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with + CURLOPT_SSL_VERIFYHOST + +In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456 +--- +Author: Tomas Mlcoch +Date: Mon May 5 14:31:35 2014 +0200 + + Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014) +--- + +It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST. +Use CURLOPT_SSL_VERIFYHOST to correct. + +Upstream-Status: Submitted + +Signed-off-by: Hongxu Jia +--- + librepo/handle.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/librepo/handle.c b/librepo/handle.c +index ccea79b..ff39db4 100644 +--- a/librepo/handle.c ++++ b/librepo/handle.c +@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle, + + case LRO_SSLVERIFYHOST: + handle->sslverifyhost = va_arg(arg, long) ? 2 : 0; +- c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost); ++ c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost); + break; + + case LRO_SSLCLIENTCERT: +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb index 2f194f143..3238b14fa 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb @@ -7,6 +7,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \ file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \ file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ + file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \ " PV = "1.7.20+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch index b2239fbad..fcbce7286 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch @@ -4,6 +4,8 @@ hardcoding paths. RP 2015/2/3 +Upstream-Status: Inappropriate + Index: libtool-2.4.5/libtoolize.in =================================================================== --- libtool-2.4.5.orig/libtoolize.in diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb index 06abb0558..b02620b4b 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb @@ -15,6 +15,7 @@ ACLOCALEXTRAPATH_class-target = "" do_install_append () { sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \ + -e "s@${DEBUG_PREFIX_MAP}@@g" \ -e 's@${STAGING_DIR_HOST}@@g' \ -e 's@${STAGING_DIR_NATIVE}@@g' \ -e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \ @@ -22,5 +23,6 @@ do_install_append () { -e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \ -e 's@^\(predep_objects="\).*@\1"@' \ -e 's@^\(postdep_objects="\).*@\1"@' \ + -e "s@${HOSTTOOLS_DIR}/@@g" \ -i ${D}${bindir}/libtool } diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch new file mode 100644 index 000000000..e25179925 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -0,0 +1,93 @@ +From 28293e48cf1a52004c6a78de448718441f9e05f9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 21 May 2016 00:33:20 +0000 +Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they + are macros + +musl defines some functions as macros and not inline functions +if this is the case then make sure to undefine them + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + include/llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def +index 9cbe917c146..aff8419cf54 100644 +--- a/include/llvm/Analysis/TargetLibraryInfo.def ++++ b/include/llvm/Analysis/TargetLibraryInfo.def +@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") + TLI_DEFINE_ENUM_INTERNAL(fopen) + TLI_DEFINE_STRING_INTERNAL("fopen") + /// FILE *fopen64(const char *filename, const char *opentype) ++#ifdef fopen64 ++#undef fopen64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(fopen64) + TLI_DEFINE_STRING_INTERNAL("fopen64") + /// int fprintf(FILE *stream, const char *format, ...); +@@ -691,6 +694,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") + /// int fseeko(FILE *stream, off_t offset, int whence); + TLI_DEFINE_ENUM_INTERNAL(fseeko) + TLI_DEFINE_STRING_INTERNAL("fseeko") ++#ifdef fseeko64 ++#undef fseeko64 ++#endif + /// int fseeko64(FILE *stream, off64_t offset, int whence) + TLI_DEFINE_ENUM_INTERNAL(fseeko64) + TLI_DEFINE_STRING_INTERNAL("fseeko64") +@@ -701,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") + TLI_DEFINE_ENUM_INTERNAL(fstat) + TLI_DEFINE_STRING_INTERNAL("fstat") + /// int fstat64(int filedes, struct stat64 *buf) ++#ifdef fstat64 ++#undef fstat64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(fstat64) + TLI_DEFINE_STRING_INTERNAL("fstat64") + /// int fstatvfs(int fildes, struct statvfs *buf); +@@ -716,6 +725,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") + TLI_DEFINE_ENUM_INTERNAL(ftello) + TLI_DEFINE_STRING_INTERNAL("ftello") + /// off64_t ftello64(FILE *stream) ++#ifdef ftello64 ++#undef ftello64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(ftello64) + TLI_DEFINE_STRING_INTERNAL("ftello64") + /// int ftrylockfile(FILE *file); +@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") + TLI_DEFINE_ENUM_INTERNAL(lstat) + TLI_DEFINE_STRING_INTERNAL("lstat") + /// int lstat64(const char *path, struct stat64 *buf); ++#ifdef lstat64 ++#undef lstat64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(lstat64) + TLI_DEFINE_STRING_INTERNAL("lstat64") + /// void *malloc(size_t size); +@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") + TLI_DEFINE_ENUM_INTERNAL(stat) + TLI_DEFINE_STRING_INTERNAL("stat") + /// int stat64(const char *path, struct stat64 *buf); ++#ifdef stat64 ++#undef stat64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(stat64) + TLI_DEFINE_STRING_INTERNAL("stat64") + /// int statvfs(const char *path, struct statvfs *buf); +@@ -1184,6 +1202,9 @@ TLI_DEFINE_STRING_INTERNAL("times") + TLI_DEFINE_ENUM_INTERNAL(tmpfile) + TLI_DEFINE_STRING_INTERNAL("tmpfile") + /// FILE *tmpfile64(void) ++#ifdef tmpfile64 ++#undef tmpfile64 ++#endif + TLI_DEFINE_ENUM_INTERNAL(tmpfile64) + TLI_DEFINE_STRING_INTERNAL("tmpfile64") + /// int toascii(int c); +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch new file mode 100644 index 000000000..832bd729e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch @@ -0,0 +1,39 @@ +From d776487bac17650704614248d19d1e6b35775001 Mon Sep 17 00:00:00 2001 +From: Martin Kelly +Date: Fri, 19 May 2017 00:22:57 -0700 +Subject: [PATCH 2/2] llvm: allow env override of exe path + +When using a native llvm-config from inside a sysroot, we need llvm-config to +return the libraries, include directories, etc. from inside the sysroot rather +than from the native sysroot. Thus provide an env override for calling +llvm-config from a target sysroot. + +Signed-off-by: Martin Kelly +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + tools/llvm-config/llvm-config.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 08b096afb05..d8d7742744e 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -225,6 +225,13 @@ Typical components:\n\ + + /// \brief Compute the path to the main executable. + std::string GetExecutablePath(const char *Argv0) { ++ // Hack for Yocto: we need to override the root path when we are using ++ // llvm-config from within a target sysroot. ++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); ++ if (Sysroot != nullptr) { ++ return Sysroot; ++ } ++ + // This just needs to be some symbol in the binary; C++ doesn't + // allow taking the address of ::main however. + void *P = (void *)(intptr_t)GetExecutablePath; +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb new file mode 100644 index 000000000..f06fa49ae --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb @@ -0,0 +1,185 @@ +# Copyright (C) 2017 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "The LLVM Compiler Infrastructure" +HOMEPAGE = "http://llvm.org" +LICENSE = "NCSA" +SECTION = "devel" + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771" + +DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native" + +RDEPENDS_${PN}_append_class-target = " ncurses-terminfo" + +inherit perlnative pythonnative cmake pkgconfig + +PROVIDES += "llvm${PV}" + +LLVM_RELEASE = "${PV}" +LLVM_DIR = "llvm${LLVM_RELEASE}" + +SRCREV = "9a5c333388cbb54a0ce3a67c4f539f5e590a089b" +PV = "5.0" +PATCH_VERSION = "0" +SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http \ + file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ + file://0002-llvm-allow-env-override-of-exe-path.patch \ + " +UPSTREAM_VERSION_UNKNOWN = "1" +S = "${WORKDIR}/git" + +LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" +def get_llvm_arch(bb, d, arch_var): + import re + a = d.getVar(arch_var) + if re.match('(i.86|athlon|x86.64)$', a): return 'X86' + elif re.match('arm$', a): return 'ARM' + elif re.match('armeb$', a): return 'ARM' + elif re.match('aarch64$', a): return 'AArch64' + elif re.match('aarch64_be$', a): return 'AArch64' + elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' + elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' + else: + raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) + +def get_llvm_target_arch(bb, d): + return get_llvm_arch(bb, d, 'TARGET_ARCH') +# +# Default to build all OE-Core supported target arches (user overridable). +# +LLVM_TARGETS ?= "${@get_llvm_target_arch(bb, d)}" +LLVM_TARGETS_prepend_x86 = "AMDGPU;" +LLVM_TARGETS_prepend_x86-64 = "AMDGPU;" + +ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET_armv4t = "arm" + +EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ + -DLLVM_ENABLE_PIC=ON \ + -DLLVM_BINDINGS_LIST='' \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_ENABLE_FFI=ON \ + -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ + -DLLVM_OPTIMIZED_TABLEGEN=ON \ + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS}" \ + -G Ninja" + +EXTRA_OECMAKE_append_class-target = "\ + -DCMAKE_CROSSCOMPILING:BOOL=ON \ + -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ + " + +EXTRA_OECMAKE_append_class-nativesdk = "\ + -DCMAKE_CROSSCOMPILING:BOOL=ON \ + -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ + " + +do_configure_prepend() { +# Fix paths in llvm-config + sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp + sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp + sed -ri "s#lib/${LLVM_DIR}#${baselib}/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp +} + +do_compile() { + NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} +} + +do_compile_class-native() { + NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen +} + +do_install() { + NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install + install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config + + install -d ${D}${bindir}/${LLVM_DIR} + cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/ + + install -d ${D}${includedir}/${LLVM_DIR} + cp -r ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/ + + install -d ${D}${libdir}/${LLVM_DIR} + + # The LLVM sources have "/lib" embedded and so we cannot completely rely on the ${libdir} variable + if [ -d ${LLVM_INSTALL_DIR}${libdir}/ ]; then + cp -r ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/ + elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib ]; then + cp -r ${LLVM_INSTALL_DIR}${prefix}/lib/* ${D}${libdir}/${LLVM_DIR}/ + elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib64 ]; then + cp -r ${LLVM_INSTALL_DIR}${prefix}/lib64/* ${D}${libdir}/${LLVM_DIR}/ + fi + + # Remove unnecessary cmake files + rm -rf ${D}${libdir}/${LLVM_DIR}/cmake + + ln -s ${LLVM_DIR}/libLLVM-${PV}${SOLIBSDEV} ${D}${libdir}/libLLVM-${PV}${SOLIBSDEV} + + # We'll have to delete the libLLVM.so due to multiple reasons... + rm -rf ${D}${libdir}/${LLVM_DIR}/libLLVM.so + rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so +} +do_install_class-native() { + install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} + install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} + install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so +} + +PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" +ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY_${PN}-staticdev = "1" +FILES_${PN} = "" +FILES_${PN}-staticdev = "" +FILES_${PN}-dbg = " \ + ${bindir}/${LLVM_DIR}/.debug \ + ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ + ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ + ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \ + ${libdir}/${LLVM_DIR}/.debug/llvm-config \ + /usr/src/debug \ +" + +FILES_${PN}-dev = " \ + ${bindir}/${LLVM_DIR} \ + ${includedir}/${LLVM_DIR} \ + ${libdir}/${LLVM_DIR}/llvm-config \ +" + +RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello" + +FILES_${PN}-bugpointpasses = "\ + ${libdir}/${LLVM_DIR}/BugpointPasses.so \ +" +FILES_${PN} += "\ + ${libdir}/${LLVM_DIR}/libLTO.so.* \ +" + +FILES_${PN}-llvmhello = "\ + ${libdir}/${LLVM_DIR}/LLVMHello.so \ +" + +PACKAGES_DYNAMIC = "^libllvm${LLVM_RELEASE}-.*$" +NOAUTOPACKAGEDEBUG = "1" + +INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE}.${PATCH_VERSION} += "dev-so" +INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE} += "dev-so" +INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm += "dev-so" + +python llvm_populate_packages() { + libdir = bb.data.expand('${libdir}', d) + libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) + split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True) + split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True) + split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) + if split_packages: + pn = d.getVar('PN') + d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) + d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages)) + d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages)) +} + +PACKAGESPLITFUNCS_prepend = "llvm_populate_packages " + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc index 4a83929f0..2002594e8 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc @@ -1,4 +1,5 @@ SUMMARY = "Traditional Unix macro processor" +HOMEPAGE = "https://www.gnu.org/software/m4/m4.html" DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \ compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \ GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc." @@ -6,5 +7,4 @@ GNU M4 also has built-in functions for including files, running shell commands, inherit autotools texinfo EXTRA_OEMAKE += "'infodir=${infodir}'" -LDFLAGS_prepend_libc-uclibc = " -lrt " SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c new file mode 100644 index 000000000..cb6faa8c6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c @@ -0,0 +1,348 @@ +0xfc, 0xfa, 0xa3, 0x9c, 0x02, 0x01, 0x00, 0x89, 0x1d, 0xa0, 0x02, 0x01, 0x00, 0x83, 0xfc, 0x00, +0x74, 0x09, 0x8b, 0x44, 0x24, 0x04, 0xa3, 0xa4, 0x02, 0x01, 0x00, 0x8b, 0x25, 0x80, 0x14, 0x01, +0x00, 0x6a, 0x00, 0x9d, 0x31, 0xc0, 0xbf, 0xb8, 0x15, 0x01, 0x00, 0xb9, 0x44, 0x58, 0x01, 0x00, +0x29, 0xf9, 0xfc, 0xf3, 0xaa, 0xbe, 0xba, 0x02, 0x01, 0x00, 0xbf, 0x00, 0x10, 0x02, 0x00, 0xb9, +0x70, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x0f, 0x01, 0x15, 0xb4, 0x02, 0x01, 0x00, 0x0f, 0x01, 0x1d, +0xae, 0x02, 0x01, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xe0, 0x8e, +0xe8, 0x8e, 0xd0, 0x68, 0x90, 0x14, 0x01, 0x00, 0xff, 0x35, 0xa4, 0x02, 0x01, 0x00, 0xff, 0x35, +0xa0, 0x02, 0x01, 0x00, 0xff, 0x35, 0x9c, 0x02, 0x01, 0x00, 0xe8, 0xe3, 0x08, 0x00, 0x00, 0x89, +0xc6, 0x83, 0xc4, 0x10, 0x6a, 0x00, 0x9d, 0x31, 0xdb, 0xa1, 0xac, 0x14, 0x01, 0x00, 0x83, 0xf8, +0x01, 0x74, 0x13, 0x31, 0xc0, 0x31, 0xc9, 0x31, 0xd2, 0x31, 0xff, 0x31, 0xed, 0x6a, 0x10, 0xa1, +0xa8, 0x14, 0x01, 0x00, 0x50, 0xcb, 0x89, 0xf0, 0xbe, 0x2a, 0x03, 0x01, 0x00, 0xbf, 0x00, 0x20, +0x02, 0x00, 0xb9, 0x20, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x89, 0xc6, 0x0f, 0x01, 0x15, 0x2a, 0x03, +0x01, 0x00, 0x31, 0xc0, 0x0f, 0xba, 0xe8, 0x05, 0x0f, 0x22, 0xe0, 0xbf, 0x00, 0x30, 0x02, 0x00, +0x31, 0xc0, 0xb9, 0x00, 0x18, 0x00, 0x00, 0xf3, 0xab, 0xbf, 0x00, 0x30, 0x02, 0x00, 0x8d, 0x87, +0x07, 0x10, 0x00, 0x00, 0x89, 0x07, 0xbf, 0x00, 0x40, 0x02, 0x00, 0x8d, 0x87, 0x07, 0x10, 0x00, +0x00, 0xb9, 0x04, 0x00, 0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x10, 0x00, 0x00, 0x83, 0xc7, 0x08, +0x49, 0x75, 0xf3, 0xbf, 0x00, 0x50, 0x02, 0x00, 0xb8, 0x83, 0x01, 0x00, 0x00, 0xb9, 0x00, 0x08, +0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x00, 0x20, 0x00, 0x83, 0xc7, 0x08, 0x49, 0x75, 0xf3, 0xb8, +0x00, 0x30, 0x02, 0x00, 0x0f, 0x22, 0xd8, 0xb9, 0x80, 0x00, 0x00, 0xc0, 0x0f, 0x32, 0x0f, 0xba, +0xe8, 0x08, 0x0f, 0x30, 0x6a, 0x10, 0xa1, 0xa8, 0x14, 0x01, 0x00, 0x50, 0x31, 0xc0, 0x0f, 0xba, +0xe8, 0x1f, 0x0f, 0xba, 0xe8, 0x00, 0x0f, 0x22, 0xc0, 0xcb, 0x55, 0x89, 0xe5, 0x53, 0x56, 0x57, +0x8b, 0x7d, 0x08, 0x81, 0xef, 0x00, 0x00, 0x01, 0x00, 0x8b, 0x75, 0x0c, 0x56, 0xe8, 0xfc, 0x00, +0x00, 0x00, 0x66, 0x31, 0xdb, 0x66, 0xb8, 0x20, 0xe8, 0x00, 0x00, 0x66, 0xba, 0x50, 0x41, 0x4d, +0x53, 0x66, 0xb9, 0x14, 0x00, 0x00, 0x00, 0xcd, 0x15, 0x72, 0x18, 0x66, 0x3d, 0x50, 0x41, 0x4d, +0x53, 0x75, 0x10, 0x66, 0x4e, 0x66, 0x85, 0xf6, 0x74, 0x09, 0x83, 0xc7, 0x14, 0x66, 0x83, 0xfb, +0x00, 0x75, 0xd2, 0x66, 0xe8, 0x82, 0x00, 0x00, 0x00, 0x58, 0x29, 0xf0, 0x5f, 0x5e, 0x5b, 0x89, +0xec, 0x5d, 0xc3, 0x53, 0x56, 0x57, 0xe8, 0xb3, 0x00, 0x00, 0x00, 0xf9, 0x31, 0xc9, 0x31, 0xd2, +0xb8, 0x01, 0xe8, 0xcd, 0x15, 0x72, 0x28, 0x83, 0xf9, 0x00, 0x75, 0x09, 0x83, 0xfa, 0x00, 0x75, +0x04, 0x89, 0xc1, 0x89, 0xda, 0x66, 0x81, 0xe2, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc1, 0xe2, 0x06, +0x66, 0x89, 0xd0, 0x66, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x66, 0x01, 0xc8, 0xeb, 0x03, 0x66, +0x31, 0xc0, 0x66, 0xe8, 0x33, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0x53, 0x56, 0x57, 0xe8, +0x6a, 0x00, 0x00, 0x00, 0xb4, 0x88, 0xcd, 0x15, 0x66, 0x25, 0xff, 0xff, 0x00, 0x00, 0x66, 0xe8, +0x17, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0xe8, 0x51, 0x00, 0x00, 0x00, 0xcd, 0x12, 0x89, +0xc1, 0x66, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x66, 0x89, 0xc8, 0xc3, 0xfa, 0x2e, 0x67, 0x0f, 0x01, +0x15, 0xb4, 0x02, 0x00, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01, 0x0f, 0x22, 0xc0, 0x66, +0xea, 0x37, 0x02, 0x01, 0x00, 0x10, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, +0x8e, 0xd0, 0x81, 0xc4, 0x00, 0x00, 0x01, 0x00, 0x31, 0xc0, 0x8e, 0xe0, 0x8e, 0xe8, 0x58, 0x05, +0x00, 0x00, 0x01, 0x00, 0x50, 0x2e, 0x0f, 0x01, 0x1d, 0xae, 0x02, 0x01, 0x00, 0xc3, 0x58, 0x2d, +0x00, 0x00, 0x01, 0x00, 0x50, 0x81, 0xec, 0x00, 0x00, 0x01, 0x00, 0xea, 0x72, 0x02, 0x00, 0x00, +0x08, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe, 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x84, 0x02, +0x00, 0x00, 0x00, 0x10, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xd0, 0x8e, 0xe0, 0x8e, 0xe8, +0x2e, 0x67, 0x0f, 0x01, 0x1d, 0xa8, 0x02, 0x00, 0x00, 0xfb, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x9b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, +0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x93, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, +0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x20, 0x00, 0x00, 0x20, 0x02, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, +0xaf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x55, 0x89, 0xc1, 0x89, 0xe5, 0xba, +0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x20, 0x74, 0xfb, 0xba, 0xf8, 0x03, 0x00, 0x00, 0x88, 0xc8, +0xee, 0xba, 0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x40, 0x74, 0xfb, 0x5d, 0xc3, 0x55, 0x83, 0xf8, +0x0a, 0x89, 0xe5, 0x53, 0x89, 0xc3, 0x75, 0x0a, 0xb8, 0x0d, 0x00, 0x00, 0x00, 0xe8, 0xc8, 0xff, +0xff, 0xff, 0x89, 0xd8, 0x5b, 0x5d, 0xeb, 0xc2, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, +0x44, 0x8d, 0x5d, 0x0c, 0x8b, 0x7d, 0x08, 0x0f, 0xbe, 0x07, 0x84, 0xc0, 0x0f, 0x84, 0x68, 0x01, +0x00, 0x00, 0x3c, 0x25, 0x74, 0x0d, 0xe8, 0xc2, 0xff, 0xff, 0xff, 0x89, 0x7d, 0xbc, 0xe9, 0x4e, +0x01, 0x00, 0x00, 0x8d, 0x47, 0x01, 0x89, 0x45, 0xbc, 0x8a, 0x47, 0x01, 0x3c, 0x73, 0x75, 0x1a, +0x89, 0xd8, 0x83, 0xc3, 0x04, 0x8b, 0x30, 0x0f, 0xbe, 0x06, 0x84, 0xc0, 0x0f, 0x84, 0x2f, 0x01, +0x00, 0x00, 0xe8, 0x96, 0xff, 0xff, 0xff, 0x46, 0xeb, 0xed, 0x3c, 0x4c, 0x75, 0x0d, 0x8d, 0x47, +0x02, 0xbe, 0x3c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x38, 0x3c, 0x6c, 0x75, 0x0d, 0x8d, +0x47, 0x02, 0xbe, 0x1c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x27, 0xbe, 0x1c, 0x00, 0x00, +0x00, 0x3c, 0x68, 0x75, 0x1e, 0x80, 0x7f, 0x02, 0x68, 0x74, 0x0d, 0x8d, 0x47, 0x02, 0xbe, 0x0c, +0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x0b, 0x8d, 0x47, 0x03, 0xbe, 0x04, 0x00, 0x00, 0x00, +0x89, 0x45, 0xbc, 0x8b, 0x45, 0xbc, 0x8a, 0x00, 0x88, 0xc2, 0x83, 0xca, 0x20, 0x80, 0xfa, 0x78, +0x75, 0x5b, 0x8b, 0x13, 0x83, 0xfe, 0x1c, 0x7e, 0x0e, 0x8b, 0x4b, 0x04, 0x89, 0x55, 0xb0, 0x89, +0x4d, 0xb4, 0x83, 0xc3, 0x08, 0xeb, 0x0b, 0x31, 0xc9, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xb4, 0x83, +0xc3, 0x04, 0x83, 0xe0, 0x20, 0x8d, 0x7d, 0xc8, 0x88, 0x45, 0xbb, 0x89, 0xf1, 0x8b, 0x55, 0xb4, +0x8b, 0x45, 0xb0, 0x0f, 0xad, 0xd0, 0xd3, 0xea, 0xf6, 0xc1, 0x20, 0x74, 0x02, 0x89, 0xd0, 0x83, +0xe0, 0x0f, 0x8a, 0x55, 0xbb, 0x47, 0x0a, 0x90, 0x14, 0x10, 0x01, 0x00, 0x88, 0x57, 0xff, 0x83, +0xe9, 0x04, 0x79, 0xd9, 0xc1, 0xee, 0x02, 0x8d, 0x74, 0x35, 0xc9, 0xeb, 0x62, 0x3c, 0x64, 0x75, +0x4a, 0x8b, 0x03, 0x83, 0xfe, 0x1c, 0x7e, 0x05, 0x83, 0xc3, 0x08, 0xeb, 0x03, 0x83, 0xc3, 0x04, +0x8d, 0x4d, 0xc8, 0x85, 0xc0, 0x79, 0x09, 0xc6, 0x45, 0xc8, 0x2d, 0x8d, 0x4d, 0xc9, 0xf7, 0xd8, +0x89, 0xce, 0xbf, 0x0a, 0x00, 0x00, 0x00, 0x99, 0x46, 0xf7, 0xff, 0x83, 0xc2, 0x30, 0x85, 0xc0, +0x88, 0x56, 0xff, 0x75, 0xf2, 0x89, 0xf0, 0x48, 0x39, 0xc1, 0x73, 0x23, 0x0f, 0xb6, 0x38, 0x8a, +0x11, 0x41, 0x88, 0x10, 0x89, 0xfa, 0x88, 0x51, 0xff, 0xeb, 0xec, 0x3c, 0x63, 0x75, 0x0a, 0x8b, +0x03, 0x83, 0xc3, 0x04, 0x88, 0x45, 0xc8, 0xeb, 0x03, 0x88, 0x45, 0xc8, 0x8d, 0x75, 0xc9, 0x8d, +0x7d, 0xc8, 0x39, 0xf7, 0x73, 0x0b, 0x0f, 0xbe, 0x07, 0x47, 0xe8, 0x6e, 0xfe, 0xff, 0xff, 0xeb, +0xf1, 0x8b, 0x7d, 0xbc, 0x47, 0xe9, 0x8d, 0xfe, 0xff, 0xff, 0x83, 0xc4, 0x44, 0x5b, 0x5e, 0x5f, +0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x56, 0x53, 0x31, 0xdb, 0x83, 0xec, 0x10, 0x39, 0xd3, +0x74, 0x23, 0x0f, 0xb6, 0x34, 0x18, 0xf6, 0xc3, 0x01, 0x74, 0x03, 0xc1, 0xe6, 0x08, 0x01, 0xf1, +0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x76, 0x0a, 0x89, 0xce, 0xc1, 0xee, 0x10, 0x01, 0xf1, 0x0f, +0xb7, 0xc9, 0x43, 0xeb, 0xd9, 0x88, 0x4d, 0xf6, 0xc1, 0xe9, 0x08, 0x88, 0x4d, 0xf7, 0x0f, 0xb7, +0x45, 0xf6, 0x83, 0xc4, 0x10, 0x5b, 0x5e, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89, +0xc3, 0x51, 0x89, 0x55, 0xf0, 0x3b, 0x5d, 0xf0, 0x73, 0x5f, 0x81, 0x3b, 0x4c, 0x42, 0x49, 0x4f, +0x74, 0x05, 0x83, 0xc3, 0x10, 0xeb, 0xee, 0x83, 0x7b, 0x04, 0x18, 0x75, 0xf5, 0xba, 0x18, 0x00, +0x00, 0x00, 0x89, 0xd8, 0xe8, 0x89, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75, 0xe2, +0x8d, 0x73, 0x18, 0x8b, 0x53, 0x0c, 0x89, 0xf0, 0xe8, 0x75, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x0f, +0xb7, 0xc0, 0x39, 0x43, 0x10, 0x75, 0xcb, 0x8b, 0x4b, 0x0c, 0x31, 0xc0, 0x01, 0xf1, 0x39, 0xf1, +0x76, 0x10, 0x89, 0xcf, 0x8b, 0x56, 0x04, 0x29, 0xf7, 0x39, 0xfa, 0x77, 0x05, 0x40, 0x01, 0xd6, +0xeb, 0xec, 0x39, 0x43, 0x14, 0x75, 0xab, 0xeb, 0x02, 0x31, 0xdb, 0x5a, 0x89, 0xd8, 0x5b, 0x5e, +0x5f, 0x5d, 0xc3, 0x55, 0xba, 0x00, 0x10, 0x00, 0x00, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89, 0xc3, +0x31, 0xc0, 0x51, 0xe8, 0x71, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x17, 0xba, 0x00, 0x00, 0x10, +0x00, 0xb8, 0x00, 0x00, 0x0f, 0x00, 0xe8, 0x5e, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x04, 0x31, +0xc0, 0xeb, 0x2f, 0x8b, 0x50, 0x04, 0x01, 0xc2, 0x83, 0x3a, 0x11, 0x75, 0x16, 0x8b, 0x72, 0x08, +0x89, 0xf2, 0x89, 0xf0, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, 0xe8, 0x3a, 0xff, 0xff, 0xff, 0x85, +0xc0, 0x74, 0xdc, 0x89, 0x43, 0x28, 0xc7, 0x43, 0x24, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00, +0x00, 0x00, 0x5a, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, +0x14, 0x89, 0x55, 0xe8, 0x8b, 0x75, 0x0c, 0x8b, 0x5d, 0x08, 0x89, 0x75, 0xe4, 0x89, 0x4d, 0xec, +0x0f, 0xb6, 0xb0, 0xe8, 0x01, 0x00, 0x00, 0x89, 0x5d, 0xe0, 0x8b, 0x7d, 0x10, 0x83, 0xfe, 0x1f, +0x7f, 0x32, 0x89, 0xf3, 0x6b, 0xf6, 0x14, 0x01, 0xc6, 0x43, 0x89, 0x96, 0xd0, 0x02, 0x00, 0x00, +0x89, 0x8e, 0xd4, 0x02, 0x00, 0x00, 0x8b, 0x55, 0xe0, 0x8b, 0x4d, 0xe4, 0x89, 0x96, 0xd8, 0x02, +0x00, 0x00, 0x89, 0x8e, 0xdc, 0x02, 0x00, 0x00, 0x89, 0xbe, 0xe0, 0x02, 0x00, 0x00, 0x88, 0x98, +0xe8, 0x01, 0x00, 0x00, 0x4f, 0x75, 0x65, 0x8b, 0x5d, 0xe0, 0x8b, 0x75, 0xe4, 0x03, 0x5d, 0xe8, +0x13, 0x75, 0xec, 0x89, 0xd9, 0x89, 0xf3, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x81, 0xfb, 0xff, 0x03, +0x00, 0x00, 0x77, 0x13, 0x0f, 0xac, 0xd9, 0x0a, 0x89, 0xce, 0x81, 0xf9, 0xff, 0xff, 0x3f, 0x00, +0x76, 0x05, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x97, 0x00, +0x04, 0x00, 0x00, 0x39, 0xf2, 0x73, 0x25, 0x8d, 0x96, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x90, 0xe0, +0x01, 0x00, 0x00, 0x81, 0xfa, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0b, 0x66, 0x81, 0xee, 0x00, 0x04, +0x66, 0x89, 0x70, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x40, 0x02, 0x00, 0xfc, 0x83, 0xc4, 0x14, 0x5b, +0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xec, 0x5d, 0xc3, 0x55, 0x89, 0xe5, +0x8b, 0x55, 0x08, 0x66, 0xed, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xed, 0x5d, 0xc3, +0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x55, 0x0c, 0xee, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, +0x45, 0x08, 0x8b, 0x55, 0x0c, 0x66, 0xef, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, +0x55, 0x0c, 0xef, 0x5d, 0xc3, 0x55, 0x31, 0xc0, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0x3b, 0x45, 0x0c, +0x74, 0x09, 0x80, 0x3c, 0x02, 0x00, 0x74, 0x03, 0x40, 0xeb, 0xf2, 0x5d, 0xc3, 0x55, 0x31, 0xd2, +0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x4d, 0x0c, 0x3b, 0x55, 0x10, 0x74, 0x06, 0x88, 0x0c, 0x10, +0x42, 0xeb, 0xf5, 0x5d, 0xc3, 0x55, 0x31, 0xd2, 0x89, 0xe5, 0x53, 0x8b, 0x45, 0x08, 0x8b, 0x4d, +0x0c, 0x3b, 0x55, 0x10, 0x74, 0x09, 0x8a, 0x1c, 0x11, 0x88, 0x1c, 0x10, 0x42, 0xeb, 0xf2, 0x5b, +0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x3b, 0x4d, 0x10, 0x74, 0x17, 0x8b, 0x45, 0x08, 0x0f, +0xb6, 0x10, 0x8b, 0x45, 0x0c, 0x0f, 0xb6, 0x00, 0x38, 0xc2, 0x74, 0x04, 0x29, 0xd0, 0xeb, 0x05, +0x41, 0xeb, 0xe4, 0x31, 0xc0, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x8b, 0x45, 0x08, +0x68, 0x00, 0x01, 0x00, 0x00, 0x8b, 0x4d, 0x10, 0x8d, 0x98, 0x00, 0x08, 0x00, 0x00, 0x53, 0xe8, +0x71, 0xff, 0xff, 0xff, 0x01, 0xc3, 0x5e, 0x81, 0xf9, 0xfe, 0x00, 0x00, 0x00, 0x5f, 0x8d, 0x73, +0x01, 0xc6, 0x03, 0x20, 0x7e, 0x05, 0xb9, 0xff, 0x00, 0x00, 0x00, 0x51, 0xff, 0x75, 0x0c, 0xe8, +0x51, 0xff, 0xff, 0xff, 0x5a, 0x59, 0x50, 0xff, 0x75, 0x0c, 0x89, 0xc7, 0x56, 0xe8, 0x73, 0xff, +0xff, 0xff, 0x83, 0xc4, 0x0c, 0xc6, 0x44, 0x3b, 0x01, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, +0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x10, 0x8b, 0x55, 0x0c, 0x89, 0x45, 0x0c, 0x8b, 0x45, +0x08, 0x89, 0x55, 0x10, 0x8b, 0x40, 0x10, 0x89, 0x45, 0x08, 0x5d, 0xeb, 0x8a, 0x55, 0x89, 0xe5, +0x57, 0x56, 0x53, 0x8b, 0x5d, 0x08, 0x68, 0x00, 0x10, 0x00, 0x00, 0x6a, 0x00, 0xff, 0x73, 0x10, +0xe8, 0x18, 0xff, 0xff, 0xff, 0x8b, 0x43, 0x10, 0xc7, 0x40, 0x0e, 0x19, 0x01, 0x10, 0x00, 0xc7, +0x00, 0x00, 0x19, 0x00, 0x00, 0xc7, 0x40, 0x04, 0x00, 0x00, 0x00, 0x50, 0xc6, 0x80, 0xe8, 0x01, +0x00, 0x00, 0x00, 0x8d, 0xb8, 0x00, 0x08, 0x00, 0x00, 0x66, 0xc7, 0x40, 0x0a, 0x00, 0x00, 0xc7, +0x40, 0x20, 0x3f, 0xa3, 0x00, 0x08, 0x89, 0xb8, 0x28, 0x02, 0x00, 0x00, 0x8b, 0x43, 0x0c, 0x68, +0xff, 0x00, 0x00, 0x00, 0x8d, 0x48, 0x28, 0x51, 0xe8, 0xb8, 0xfe, 0xff, 0xff, 0x5a, 0x5e, 0x89, +0xc6, 0x50, 0x51, 0x57, 0xe8, 0xdc, 0xfe, 0xff, 0xff, 0x8b, 0x43, 0x10, 0x83, 0xc0, 0x40, 0xc6, +0x84, 0x30, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x6a, 0x40, 0x6a, 0x00, 0x50, 0xe8, 0xac, 0xfe, 0xff, +0xff, 0x83, 0xc4, 0x24, 0x8b, 0x43, 0x10, 0x83, 0xe8, 0x80, 0x6a, 0x20, 0x6a, 0x00, 0x50, 0xe8, +0x99, 0xfe, 0xff, 0xff, 0x8b, 0x53, 0x0c, 0x8b, 0x43, 0x10, 0x05, 0x02, 0x02, 0x00, 0x00, 0x8b, +0x4a, 0x14, 0x66, 0x8b, 0x52, 0x16, 0x66, 0x89, 0x48, 0xf6, 0x66, 0x89, 0x50, 0xfa, 0x66, 0xc7, +0x80, 0x9e, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xc7, 0x40, 0xde, 0x00, 0x00, 0x00, 0x00, 0x66, 0xc7, +0x80, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc7, 0x40, 0xf0, 0xff, 0xff, 0xc6, 0x40, 0xfd, +0x00, 0x6a, 0x04, 0x68, 0x25, 0x10, 0x01, 0x00, 0x50, 0xe8, 0x67, 0xfe, 0xff, 0xff, 0x8b, 0x43, +0x10, 0x66, 0xc7, 0x80, 0x10, 0x02, 0x00, 0x00, 0x50, 0x00, 0x83, 0xc4, 0x18, 0x8b, 0x4b, 0x0c, +0x66, 0xc7, 0x80, 0x06, 0x02, 0x00, 0x00, 0x01, 0x02, 0xc7, 0x80, 0x18, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc7, 0x80, 0x1c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x51, 0x24, +0x85, 0xd2, 0x74, 0x0f, 0x8b, 0x49, 0x20, 0x89, 0x90, 0x1c, 0x02, 0x00, 0x00, 0x89, 0x88, 0x18, +0x02, 0x00, 0x00, 0xc7, 0x43, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, +0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, 0x4c, 0xc7, 0x45, 0xc8, 0x00, 0x00, +0x02, 0x00, 0x8b, 0x45, 0x08, 0x89, 0x45, 0xb8, 0x8b, 0x45, 0x0c, 0x89, 0x45, 0xbc, 0x8b, 0x45, +0x10, 0x89, 0x45, 0xc0, 0x8b, 0x45, 0x14, 0x89, 0x45, 0xc4, 0x8d, 0x45, 0xb8, 0x50, 0xe8, 0x9a, +0xfe, 0xff, 0xff, 0x8b, 0x45, 0xb8, 0x59, 0x3d, 0x02, 0xb0, 0xad, 0x2b, 0x75, 0x09, 0xc7, 0x45, +0xcc, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x31, 0xf6, 0x3d, 0x07, 0xb0, 0x11, 0x0a, 0x75, 0x2c, +0x8b, 0x45, 0xbc, 0x8b, 0x10, 0xe8, 0x58, 0xfb, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75, +0x0e, 0xc7, 0x45, 0xd0, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x0d, 0x50, +0x68, 0x2a, 0x10, 0x01, 0x00, 0xe8, 0xae, 0xf9, 0xff, 0xff, 0x58, 0x5a, 0x31, 0xdb, 0x81, 0x7d, +0xb8, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x03, 0x8b, 0x5d, 0xbc, 0x8b, 0x45, 0xc0, 0x85, 0xc0, 0x74, +0x0a, 0x81, 0x38, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x02, 0x89, 0xc3, 0x85, 0xf6, 0x0f, 0x85, 0xce, +0x00, 0x00, 0x00, 0x85, 0xdb, 0x0f, 0x84, 0xc6, 0x00, 0x00, 0x00, 0x66, 0x83, 0x7b, 0x08, 0x00, +0x74, 0x0f, 0x8b, 0x53, 0x04, 0x89, 0xd8, 0xe8, 0xf6, 0xfa, 0xff, 0xff, 0xf7, 0xd0, 0x0f, 0xb7, +0xf0, 0x8b, 0x4b, 0x04, 0x8d, 0x43, 0x0c, 0x01, 0xd9, 0x31, 0xff, 0x89, 0x4d, 0xb4, 0x39, 0x45, +0xb4, 0x76, 0x1f, 0x8b, 0x08, 0x8b, 0x50, 0x04, 0x83, 0xc1, 0x03, 0x83, 0xc2, 0x03, 0x83, 0xe1, +0xfc, 0x83, 0xe2, 0xfc, 0x8d, 0x54, 0x11, 0x0c, 0x01, 0xd0, 0x39, 0x45, 0xb4, 0x72, 0x03, 0x47, +0xeb, 0xdc, 0x81, 0x3b, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x1b, 0x85, 0xf6, 0x75, 0x17, 0x0f, 0xb7, +0x43, 0x0a, 0x39, 0xf8, 0x75, 0x0f, 0xc7, 0x45, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x89, 0x5d, 0xc0, +0xe9, 0x95, 0x00, 0x00, 0x00, 0x50, 0x68, 0x4d, 0x10, 0x01, 0x00, 0xe8, 0x08, 0xf9, 0xff, 0xff, +0x56, 0x68, 0x67, 0x10, 0x01, 0x00, 0xe8, 0xfd, 0xf8, 0xff, 0xff, 0x57, 0x68, 0x79, 0x10, 0x01, +0x00, 0xe8, 0xf2, 0xf8, 0xff, 0xff, 0x53, 0x68, 0x8b, 0x10, 0x01, 0x00, 0xe8, 0xe7, 0xf8, 0xff, +0xff, 0x83, 0xc4, 0x20, 0xff, 0x73, 0x04, 0x68, 0x9d, 0x10, 0x01, 0x00, 0xe8, 0xd7, 0xf8, 0xff, +0xff, 0xff, 0x33, 0x68, 0xaf, 0x10, 0x01, 0x00, 0xe8, 0xcb, 0xf8, 0xff, 0xff, 0x0f, 0xb7, 0x43, +0x0a, 0x50, 0x68, 0xc1, 0x10, 0x01, 0x00, 0xe8, 0xbc, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x18, 0xeb, +0x04, 0x85, 0xf6, 0x75, 0x35, 0x51, 0x68, 0xd3, 0x10, 0x01, 0x00, 0xe8, 0xa8, 0xf8, 0xff, 0xff, +0xff, 0x75, 0xb8, 0x68, 0xee, 0x10, 0x01, 0x00, 0xe8, 0x9b, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xbc, +0x68, 0xf7, 0x10, 0x01, 0x00, 0xe8, 0x8e, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xc0, 0x68, 0x00, 0x11, +0x01, 0x00, 0xe8, 0x81, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x20, 0xc7, 0x45, 0xd8, 0x00, 0x00, 0x00, +0x00, 0xc7, 0x45, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xd4, 0x00, 0x0f, 0x84, 0xfc, 0x00, +0x00, 0x00, 0x8b, 0x7d, 0xc0, 0x8d, 0x57, 0x0c, 0x03, 0x7f, 0x04, 0x39, 0xd7, 0x76, 0x51, 0x8b, +0x32, 0x8b, 0x5a, 0x04, 0x89, 0x5d, 0xb4, 0x83, 0xc3, 0x03, 0x8d, 0x4e, 0x03, 0x83, 0xe3, 0xfc, +0x83, 0xe1, 0xfc, 0x8d, 0x42, 0x0c, 0x01, 0xcb, 0x01, 0xc3, 0x39, 0xdf, 0x72, 0x32, 0x83, 0x7a, +0x08, 0x01, 0x75, 0x28, 0x85, 0xf6, 0x75, 0x24, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xac, 0x52, 0x6a, +0x00, 0x6a, 0x00, 0x50, 0xe8, 0x29, 0xfc, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x89, 0xc6, 0x85, 0xc0, +0x8b, 0x55, 0xb0, 0x8b, 0x4d, 0xac, 0x0f, 0x84, 0x1d, 0x04, 0x00, 0x00, 0x89, 0xda, 0xeb, 0xab, +0x31, 0xd2, 0x31, 0xff, 0x31, 0xf6, 0x85, 0xd2, 0x0f, 0x95, 0xc3, 0xf7, 0xc6, 0x01, 0x00, 0x00, +0x00, 0x75, 0x34, 0x84, 0xdb, 0x74, 0x30, 0x31, 0xf6, 0x83, 0x7a, 0x04, 0x0a, 0x75, 0x28, 0x89, +0x55, 0xb4, 0x50, 0x6a, 0x0a, 0x68, 0x35, 0x11, 0x01, 0x00, 0x57, 0xe8, 0xe2, 0xfb, 0xff, 0xff, +0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0, 0x75, 0x0d, 0x8d, 0x45, 0xb8, 0xe8, 0x11, 0xfa, +0xff, 0xff, 0x8b, 0x55, 0xb4, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x0f, 0x84, 0xdb, 0x74, 0x0b, 0x31, +0xc0, 0x83, 0x7a, 0x04, 0x00, 0x0f, 0x94, 0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x25, 0x84, 0xdb, +0x74, 0x21, 0x83, 0x7a, 0x04, 0x01, 0x75, 0x1b, 0x50, 0x6a, 0x01, 0x68, 0x66, 0x10, 0x01, 0x00, +0x57, 0xe8, 0x9c, 0xfb, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0, 0x0f, 0x94, 0xc0, 0x0f, 0xb6, +0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x13, 0x84, 0xdb, 0x74, 0x0f, 0x57, 0x68, 0x0a, 0x11, 0x01, +0x00, 0xe8, 0x72, 0xf7, 0xff, 0xff, 0x5f, 0x58, 0xeb, 0x04, 0x85, 0xf6, 0x75, 0x13, 0x8d, 0x45, +0xb8, 0xe8, 0xad, 0xf9, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x07, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00, +0x00, 0x51, 0x68, 0x25, 0x11, 0x01, 0x00, 0xe8, 0x4c, 0xf7, 0xff, 0xff, 0x5b, 0x83, 0x7d, 0xdc, +0x00, 0x5e, 0x74, 0x0d, 0x50, 0x68, 0x34, 0x11, 0x01, 0x00, 0xe8, 0x39, 0xf7, 0xff, 0xff, 0x58, +0x5a, 0x83, 0x7d, 0xd8, 0x00, 0x74, 0x0d, 0x53, 0x68, 0x3f, 0x11, 0x01, 0x00, 0xe8, 0x26, 0xf7, +0xff, 0xff, 0x5e, 0x5f, 0x50, 0x68, 0x65, 0x10, 0x01, 0x00, 0xe8, 0x19, 0xf7, 0xff, 0xff, 0x5a, +0x83, 0x7d, 0xdc, 0x00, 0x59, 0x75, 0x31, 0x83, 0x7d, 0xd8, 0x00, 0x0f, 0x84, 0x16, 0x01, 0x00, +0x00, 0x50, 0x50, 0x6a, 0x20, 0x68, 0xc4, 0x55, 0x01, 0x00, 0xe8, 0xbb, 0xf4, 0xff, 0xff, 0xbb, +0xc0, 0x55, 0x01, 0x00, 0xa3, 0xc0, 0x55, 0x01, 0x00, 0x83, 0xc4, 0x10, 0xc7, 0x45, 0xb4, 0x00, +0x00, 0x00, 0x00, 0xe9, 0xaa, 0x00, 0x00, 0x00, 0x8b, 0x45, 0xe0, 0x8d, 0x58, 0x18, 0x8b, 0x48, +0x0c, 0x01, 0xd9, 0x89, 0x4d, 0xb4, 0x39, 0x5d, 0xb4, 0x76, 0xbc, 0x8b, 0x55, 0xb4, 0x8b, 0x43, +0x04, 0x29, 0xda, 0x39, 0xd0, 0x77, 0xb0, 0x83, 0x3b, 0x01, 0x75, 0x4f, 0x83, 0xe8, 0x08, 0xb9, +0x14, 0x00, 0x00, 0x00, 0x31, 0xd2, 0x8d, 0x73, 0x08, 0xf7, 0xf1, 0x89, 0x45, 0xb0, 0x31, 0xff, +0x39, 0x7d, 0xb0, 0x7e, 0x2f, 0x83, 0xff, 0x1f, 0x7f, 0x2a, 0x31, 0xc0, 0x8b, 0x16, 0x83, 0x7e, +0x10, 0x01, 0x0f, 0x95, 0xc0, 0x83, 0xec, 0x04, 0x40, 0x8b, 0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45, +0xc8, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14, 0xe8, 0x29, 0xf9, 0xff, 0xff, 0x83, +0xc4, 0x10, 0xeb, 0xcc, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5b, 0x04, 0xeb, 0x96, +0x8b, 0x43, 0x14, 0x8b, 0x53, 0x04, 0x8b, 0x4b, 0x08, 0x8b, 0x73, 0x0c, 0x8b, 0x7b, 0x10, 0x83, +0xf8, 0x01, 0x75, 0x07, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0xec, 0x04, 0x83, 0xc3, +0x14, 0x50, 0x8b, 0x45, 0xb0, 0x57, 0x56, 0xe8, 0xec, 0xf8, 0xff, 0xff, 0xff, 0x45, 0xb4, 0x83, +0xc4, 0x10, 0x8b, 0x45, 0xb4, 0x3b, 0x05, 0xc0, 0x55, 0x01, 0x00, 0x8b, 0x45, 0xc8, 0x89, 0x45, +0xb0, 0x7c, 0xbd, 0xe8, 0x3b, 0xf4, 0xff, 0xff, 0x8b, 0x7d, 0xb0, 0x89, 0x87, 0xe0, 0x01, 0x00, +0x00, 0x8b, 0x5d, 0xc8, 0xe8, 0x73, 0xf4, 0xff, 0xff, 0x66, 0x89, 0x43, 0x02, 0x8b, 0x45, 0xc8, +0x83, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x75, 0x07, 0x66, 0x83, 0x78, 0x02, 0x00, 0x74, 0x07, +0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xcc, 0x00, 0x0f, 0x84, 0xb9, 0x00, 0x00, +0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x55, 0xc8, 0x83, 0x7d, 0xe4, 0x00, 0x8b, 0x1e, 0x74, 0x4d, 0xf6, +0xc3, 0x01, 0x74, 0x48, 0x8b, 0x46, 0x08, 0x05, 0x00, 0x04, 0x00, 0x00, 0x3d, 0xff, 0xff, 0x3f, +0x00, 0x76, 0x05, 0xb8, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xba, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x8f, +0x00, 0x04, 0x00, 0x00, 0x39, 0xc1, 0x73, 0x24, 0x8d, 0x88, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x8a, +0xe0, 0x01, 0x00, 0x00, 0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0a, 0x66, 0x2d, 0x00, 0x04, +0x66, 0x89, 0x42, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x42, 0x02, 0x00, 0xfc, 0x80, 0xe3, 0x04, 0x74, +0x0f, 0x50, 0x6a, 0xff, 0xff, 0x76, 0x10, 0x52, 0xe8, 0xaa, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10, +0x83, 0x7d, 0xe4, 0x00, 0x0f, 0x84, 0xbd, 0x01, 0x00, 0x00, 0xf6, 0x06, 0x40, 0x0f, 0x84, 0xb4, +0x01, 0x00, 0x00, 0x8b, 0x5e, 0x30, 0x8b, 0x46, 0x2c, 0x01, 0xd8, 0x8b, 0x7d, 0xc8, 0x89, 0x45, +0xb4, 0x8b, 0x73, 0xfc, 0x39, 0x5d, 0xb4, 0x0f, 0x86, 0x9a, 0x01, 0x00, 0x00, 0x8b, 0x13, 0x8b, +0x4b, 0x04, 0x50, 0x89, 0xf8, 0xff, 0x73, 0x10, 0xff, 0x73, 0x0c, 0xff, 0x73, 0x08, 0x01, 0xf3, +0xe8, 0xe3, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xda, 0x83, 0x7d, 0xd0, 0x00, 0x0f, 0x84, +0xaa, 0x00, 0x00, 0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x46, 0x0c, 0x85, 0xc0, 0x74, 0x10, 0x52, 0x50, +0xff, 0x76, 0x08, 0xff, 0x75, 0xc8, 0xe8, 0x3c, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x46, +0x14, 0x8b, 0x5e, 0x10, 0x89, 0x45, 0xb4, 0x83, 0x7d, 0xb4, 0x00, 0x0f, 0x84, 0x46, 0x01, 0x00, +0x00, 0x83, 0x3b, 0x01, 0x75, 0x6b, 0x83, 0x7d, 0xe4, 0x00, 0x74, 0x65, 0x8b, 0x45, 0xc8, 0xb9, +0x14, 0x00, 0x00, 0x00, 0x89, 0x45, 0xb0, 0x8b, 0x43, 0x04, 0x83, 0xe8, 0x08, 0x31, 0xd2, 0xf7, +0xf1, 0x89, 0x45, 0xac, 0x8d, 0x73, 0x08, 0x31, 0xff, 0x39, 0x7d, 0xac, 0x7e, 0x3c, 0x83, 0xff, +0x1f, 0x7f, 0x37, 0x8b, 0x46, 0x10, 0x8d, 0x50, 0xff, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x83, 0xfa, +0x03, 0x77, 0x07, 0x0f, 0xb6, 0x82, 0x10, 0x10, 0x01, 0x00, 0x83, 0xec, 0x04, 0x8b, 0x16, 0x8b, +0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45, 0xb0, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14, +0xe8, 0x43, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xbf, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, +0x00, 0x8b, 0x43, 0x04, 0x01, 0xc3, 0x29, 0x45, 0xb4, 0xe9, 0x79, 0xff, 0xff, 0xff, 0x83, 0x7d, +0xd4, 0x00, 0x0f, 0x84, 0xbf, 0x00, 0x00, 0x00, 0x8b, 0x55, 0xc0, 0x8b, 0x7a, 0x04, 0x8d, 0x42, +0x0c, 0x01, 0xd7, 0x39, 0xc7, 0x0f, 0x86, 0xac, 0x00, 0x00, 0x00, 0x8b, 0x10, 0x8d, 0x48, 0x0c, +0x8d, 0x5a, 0x03, 0x83, 0xe3, 0xfc, 0x8d, 0x34, 0x19, 0x8b, 0x58, 0x04, 0x89, 0x75, 0xb4, 0x8d, +0x73, 0x03, 0x83, 0xe6, 0xfc, 0x03, 0x75, 0xb4, 0x89, 0x75, 0xb0, 0x39, 0xf7, 0x0f, 0x82, 0x84, +0x00, 0x00, 0x00, 0x8b, 0x35, 0x70, 0x14, 0x01, 0x00, 0x8b, 0x40, 0x08, 0x89, 0x75, 0xac, 0x39, +0x05, 0x78, 0x14, 0x01, 0x00, 0x8b, 0x35, 0x74, 0x14, 0x01, 0x00, 0x75, 0x27, 0x3b, 0x55, 0xac, +0x75, 0x22, 0x50, 0x52, 0x56, 0x51, 0xe8, 0x17, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0, +0x75, 0x12, 0x52, 0x8d, 0x45, 0xb8, 0xff, 0x75, 0xb4, 0x53, 0x50, 0xff, 0x15, 0x7c, 0x14, 0x01, +0x00, 0x83, 0xc4, 0x10, 0x8b, 0x45, 0xb0, 0xeb, 0x8a, 0x8d, 0x7c, 0x0a, 0x0c, 0x83, 0x7d, 0xb4, +0x07, 0x0f, 0x85, 0xdf, 0xfb, 0xff, 0xff, 0x89, 0x55, 0xb4, 0x50, 0x6a, 0x07, 0x68, 0x40, 0x11, +0x01, 0x00, 0x57, 0xe8, 0xda, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0, +0x0f, 0x85, 0xc0, 0xfb, 0xff, 0xff, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, +0x00, 0x00, 0xe9, 0xaf, 0xfb, 0xff, 0xff, 0xb0, 0x80, 0xe6, 0x70, 0x31, 0xc0, 0xe6, 0xf0, 0xe6, +0xf1, 0xb0, 0x11, 0xe6, 0x20, 0xe6, 0xa0, 0xb0, 0x20, 0xe6, 0x21, 0xb0, 0x28, 0xe6, 0xa1, 0xb0, +0x04, 0xe6, 0x21, 0xb0, 0x02, 0xe6, 0xa1, 0xb0, 0x01, 0xe6, 0x21, 0xe6, 0xa1, 0xb0, 0xff, 0xe6, +0xa1, 0xb0, 0xfb, 0xe6, 0x21, 0x8b, 0x45, 0xc8, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3, +0x01, 0x02, 0x03, 0x04, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, +0x43, 0x44, 0x45, 0x46, 0x00, 0x48, 0x64, 0x72, 0x53, 0x00, 0x42, 0x61, 0x64, 0x20, 0x75, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, +0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x21, 0x0a, 0x00, 0x42, 0x61, 0x64, +0x20, 0x45, 0x4c, 0x46, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x74, +0x61, 0x62, 0x6c, 0x65, 0x21, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, +0x75, 0x6d, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, +0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x68, 0x64, 0x72, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, +0x20, 0x20, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x62, +0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, +0x00, 0x20, 0x20, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x25, +0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x6c, +0x6f, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x21, 0x0a, 0x00, 0x74, 0x79, +0x70, 0x65, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x64, 0x61, 0x74, 0x61, 0x3d, 0x25, 0x78, 0x0a, 0x00, +0x70, 0x61, 0x72, 0x61, 0x6d, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, +0x6e, 0x20, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, +0x20, 0x25, 0x73, 0x0a, 0x00, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, +0x70, 0x65, 0x3a, 0x00, 0x20, 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x20, +0x50, 0x43, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01, 0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xe2, 0xf1, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5d, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x20, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xe5, 0xf1, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x45, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x51, 0xc3, 0x41, 0xc5, +0x0c, 0x04, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xdc, 0xf1, 0xff, 0xff, +0x8a, 0x01, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, +0x86, 0x04, 0x83, 0x05, 0x03, 0x7d, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, +0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x36, 0xf3, 0xff, 0xff, +0x47, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x42, 0x86, 0x03, +0x83, 0x04, 0x7d, 0xc3, 0x41, 0xc6, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, +0xb8, 0x00, 0x00, 0x00, 0x55, 0xf3, 0xff, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, +0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x70, 0xc3, 0x41, +0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, +0xa3, 0xf3, 0xff, 0xff, 0x65, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x47, 0x0d, +0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x56, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, +0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xdc, 0xf3, 0xff, 0xff, +0xcc, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, +0x86, 0x04, 0x83, 0x05, 0x02, 0xbf, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, +0x1c, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x7c, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x65, 0xf4, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x4f, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x38, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0xf4, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x49, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x11, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfd, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0xf5, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x20, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0xed, 0xf3, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x55, 0xc3, 0x41, 0xc5, +0x0c, 0x04, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0xe6, 0xf3, 0xff, 0xff, +0x25, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5f, 0xc5, 0x0c, +0x04, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xeb, 0xf3, 0xff, 0xff, +0x5b, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, +0x86, 0x04, 0x83, 0x05, 0x02, 0x51, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, +0x1c, 0x00, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x1a, 0xf4, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, +0x2c, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x15, 0xf4, 0xff, 0xff, 0x35, 0x01, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, +0x03, 0x2b, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00, +0x2c, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x1a, 0xf5, 0xff, 0xff, 0xae, 0x06, 0x00, 0x00, +0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, +0x03, 0xa1, 0x06, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x66, 0x10, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x08, 0x01, 0x00, +0xc0, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xa5, 0xa5, 0xa5, 0xa5, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, +0x8c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4f, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x41, +0x47, 0x45, 0x3d, 0x68, 0x65, 0x61, 0x64, 0x2e, 0x53, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, +0x65, 0x3d, 0x74, 0x74, 0x79, 0x53, 0x30, 0x20, 0x69, 0x70, 0x3d, 0x64, 0x68, 0x63, 0x70, 0x20, +0x72, 0x6f, 0x6f, 0x74, 0x3d, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x66, 0x73, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb index 2bcc8d7bd..330fa7c9a 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb @@ -17,21 +17,28 @@ SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \ " SRC_URI_append_class-native = " \ file://fix-makefile-to-find-libz.patch \ + file://convert.bin.c \ " CLEANBROKEN = "1" S = "${WORKDIR}/git/util/mkelfImage" -CFLAGS += "-fno-stack-protector" CACHED_CONFIGUREVARS += "\ HOST_CC='${BUILD_CC}' \ HOST_CFLAGS='${BUILD_CFLAGS}' \ HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \ + I386_CFLAGS='-fno-stack-protector' \ + IA64_CFLAGS='-fno-stack-protector' \ " +EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}" inherit autotools-brokensep +do_configure_prepend-class-native() { + cp ${WORKDIR}/convert.bin.c ${S}/linux-i386/ +} + do_install_append() { rmdir ${D}${datadir}/mkelfImage/elf32-i386 rmdir ${D}${datadir}/mkelfImage diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb index b9c6c6f32..a16147657 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb @@ -4,7 +4,6 @@ HOMEPAGE = "https://launchpad.net/mklibs" SECTION = "devel" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64" -DEPENDS = "python-native" SRC_URI = "http://snapshot.debian.org/archive/debian/20161123T152011Z/pool/main/m/mklibs/mklibs_${PV}.tar.xz \ file://ac_init_fix.patch\ @@ -20,6 +19,6 @@ SRC_URI[sha256sum] = "6f0cf24ade13fff76e943c003413d85c3e497c984c95c1ecea1c9731ca UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/m/mklibs/" -inherit autotools gettext native pythonnative +inherit autotools gettext native S = "${WORKDIR}/mklibs" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb index 7858819c3..50acdb1cc 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb @@ -4,11 +4,12 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d" SRCBRANCH ?= "master" -SRCREV = "2cb6695e8dec00d887bdd5309d1b57d836fcd214" +SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd" PV = "0.1" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}" +UPSTREAM_VERSION_UNKNOWN = "1" S = "${WORKDIR}/git" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb index 4fbc54f8f..48ba2ee07 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb @@ -5,7 +5,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" -inherit autotools pkgconfig +inherit autotools pkgconfig update-alternatives DEPENDS = "zlib lzo e2fsprogs util-linux" @@ -30,6 +30,11 @@ PACKAGECONFIG[xattr] = ",,acl," EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'" +ALTERNATIVE_${PN} = "flash_eraseall" +ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall" +# Use higher priority than busybox's flash_eraseall (created when built with CONFIG_FLASH_ERASEALL) +ALTERNATIVE_PRIORITY[flash_eraseall] = "100" + do_install () { oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} } diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch new file mode 100644 index 000000000..01455f101 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch @@ -0,0 +1,23 @@ +Disabled reading host configs. + +Upstream-Status: Inappropriate [native] + +Signed-off-by: Ed Bartosh + +--- mtools-4.0.18/config.c.orig 2017-06-13 12:27:38.644000000 +0300 ++++ mtools-4.0.18/config.c 2017-06-13 12:28:47.576000000 +0300 +@@ -701,14 +701,6 @@ + memcpy(devices, const_devices, + nr_const_devices*sizeof(struct device)); + +- (void) ((parse(CONF_FILE,1) | +- parse(LOCAL_CONF_FILE,1) | +- parse(SYS_CONF_FILE,1)) || +- (parse(OLD_CONF_FILE,1) | +- parse(OLD_LOCAL_CONF_FILE,1))); +- /* the old-name configuration files only get executed if none of the +- * new-name config files were used */ +- + homedir = get_homedir(); + if ( homedir ){ + strncpy(conf_file, homedir, MAXPATHLEN ); diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb index b0efc9ecf..dcd32ed94 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb @@ -33,13 +33,12 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \ file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \ " +SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch" inherit autotools texinfo EXTRA_OECONF = "--without-x" -LDFLAGS_append_libc-uclibc = " -liconv " - BBCLASSEXTEND = "native nativesdk" PACKAGECONFIG ??= "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb deleted file mode 100644 index 3280b8458..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "General-purpose x86 assembler" -SECTION = "devel" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe" - -SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 " - -SRC_URI[md5sum] = "d15843c3fb7db39af80571ee27ec6fad" -SRC_URI[sha256sum] = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324" - -inherit autotools-brokensep - -do_configure_prepend () { - if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then - mv ${S}/aclocal.m4 ${S}/acinclude.m4 - fi -} - -do_install() { - install -d ${D}${bindir} - install -d ${D}${mandir}/man1 - - oe_runmake 'INSTALLROOT=${D}' install -} - -BBCLASSEXTEND = "native" - -DEPENDS = "groff-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb new file mode 100644 index 000000000..bf18cd6d1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb @@ -0,0 +1,28 @@ +SUMMARY = "General-purpose x86 assembler" +SECTION = "devel" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe" + +SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 " + +SRC_URI[md5sum] = "1f7d4662040d24351df7d6719ed4f97a" +SRC_URI[sha256sum] = "08f97baf0a7f892128c6413cfa93b69dc5825fbbd06c70928aea028835d198fa" + +inherit autotools-brokensep + +do_configure_prepend () { + if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then + mv ${S}/aclocal.m4 ${S}/acinclude.m4 + fi +} + +do_install() { + install -d ${D}${bindir} + install -d ${D}${mandir}/man1 + + oe_runmake 'INSTALLROOT=${D}' install +} + +BBCLASSEXTEND = "native" + +DEPENDS = "groff-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb new file mode 100644 index 000000000..4d3b27230 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb @@ -0,0 +1,30 @@ +SUMMARY = "Ninja is a small build system with a focus on speed." +HOMEPAGE = "http://martine.github.com/ninja/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e" + +DEPENDS = "re2c-native ninja-native" + +SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b" + +SRC_URI = "git://github.com/martine/ninja.git;branch=release" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P.*)" + +S = "${WORKDIR}/git" + +do_configure[noexec] = "1" + +do_compile_class-native() { + ./configure.py --bootstrap +} + +do_compile() { + ./configure.py + ninja +} + +do_install() { + install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch new file mode 100644 index 000000000..c36ae2ffd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch @@ -0,0 +1,112 @@ +From d42b23f4fb5d6bd58e92e995fe5befc76efbae0c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 27 Apr 2017 15:47:58 +0300 +Subject: [PATCH] Switch all scripts to use Python 3.x + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + makePackage | 2 +- + opkg-compare-indexes | 2 +- + opkg-graph-deps | 2 +- + opkg-list-fields | 2 +- + opkg-make-index | 2 +- + opkg-show-deps | 2 +- + opkg-unbuild | 2 +- + opkg-update-index | 2 +- + opkg.py | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/makePackage b/makePackage +index 4bdfc56..02124dd 100755 +--- a/makePackage ++++ b/makePackage +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + + # The general algorithm this program follows goes like this: + # Run tar to extract control from control.tar.gz from the package. +diff --git a/opkg-compare-indexes b/opkg-compare-indexes +index b60d20a..80c1263 100755 +--- a/opkg-compare-indexes ++++ b/opkg-compare-indexes +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-graph-deps b/opkg-graph-deps +index 6653fd5..f1e376a 100755 +--- a/opkg-graph-deps ++++ b/opkg-graph-deps +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-list-fields b/opkg-list-fields +index c14a90f..24f7955 100755 +--- a/opkg-list-fields ++++ b/opkg-list-fields +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-make-index b/opkg-make-index +index 3f757f6..2988f9f 100755 +--- a/opkg-make-index ++++ b/opkg-make-index +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-show-deps b/opkg-show-deps +index 153f21e..4e18b4f 100755 +--- a/opkg-show-deps ++++ b/opkg-show-deps +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-unbuild b/opkg-unbuild +index 4f36bec..57642c9 100755 +--- a/opkg-unbuild ++++ b/opkg-unbuild +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + from __future__ import print_function + +diff --git a/opkg-update-index b/opkg-update-index +index 341c1c2..7bff8a1 100755 +--- a/opkg-update-index ++++ b/opkg-update-index +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + from __future__ import absolute_import + + import sys, os +diff --git a/opkg.py b/opkg.py +index 2ecac8a..7e64de4 100644 +--- a/opkg.py ++++ b/opkg.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # Copyright (C) 2001 Alexander S. Guy + # Andern Research Labs + # +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb new file mode 100644 index 000000000..646cc8ff9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb @@ -0,0 +1,62 @@ +SUMMARY = "Additional utilities for the opkg package manager" +SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system" +SECTION = "base" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35" +PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" + +SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ + file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ +" +SRC_URI_append_class-native = " file://tar_ignore_error.patch" + +SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff" +SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38" + +TARGET_CC_ARCH += "${LDFLAGS}" + +# For native builds we use the host Python +PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-subprocess python3-pickle python3-compression python3-textutils python3-stringold" +PYTHONRDEPS_class-native = "" + +PACKAGECONFIG = "python update-alternatives" +PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}" +PACKAGECONFIG[update-alternatives] = ",,," + +do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} install + if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then + rm -f "${D}${bindir}/update-alternatives" + fi + + if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm + fi +} + +do_install_append_class-target() { + if [ -e "${D}${bindir}/update-alternatives" ]; then + sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g' + fi +} + +# These are empty and will pull python3-dev into images where it wouldn't +# have been otherwise, so don't generate them. +PACKAGES_remove = "${PN}-dev ${PN}-staticdev" + +PACKAGES =+ "update-alternatives-opkg" +FILES_update-alternatives-opkg = "${bindir}/update-alternatives" +RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth" +RREPLACES_update-alternatives-opkg = "update-alternatives-cworth" +RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth" + +pkg_postrm_update-alternatives-opkg() { + rm -rf $D${nonarch_libdir}/opkg/alternatives + rmdir $D${nonarch_libdir}/opkg || true +} + +BBCLASSEXTEND = "native nativesdk" + +CLEANBROKEN = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb deleted file mode 100644 index 9deea0f5e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "Additional utilities for the opkg package manager" -SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system" -SECTION = "base" -HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083" -PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" - -SRCREV = "1a708fd73d10c2b7677dd4cc4e017746ebbb9166" -PV = "0.3.4+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/opkg-utils \ -" -SRC_URI_append_class-native = " file://tar_ignore_error.patch" - -S = "${WORKDIR}/git" - -TARGET_CC_ARCH += "${LDFLAGS}" - -PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold" -PYTHONRDEPS_class-native = "" - -PACKAGECONFIG = "python update-alternatives" -PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}" -PACKAGECONFIG[update-alternatives] = ",,," - -do_install() { - oe_runmake PREFIX=${prefix} DESTDIR=${D} install - if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then - rm -f "${D}${bindir}/update-alternatives" - fi -} - -do_install_append_class-target() { - if [ -e "${D}${bindir}/update-alternatives" ]; then - sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g' - fi -} - -PACKAGES =+ "update-alternatives-opkg" -FILES_update-alternatives-opkg = "${bindir}/update-alternatives" -RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth" -RREPLACES_update-alternatives-opkg = "update-alternatives-cworth" -RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth" - -pkg_postrm_update-alternatives-opkg() { - rm -rf $D${nonarch_libdir}/opkg/alternatives - rmdir $D${nonarch_libdir}/opkg || true -} - -BBCLASSEXTEND = "native nativesdk" - -CLEANBROKEN = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb index 682142a5d..0c2dbc9e3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb @@ -1,4 +1,5 @@ SUMMARY = "Architecture-dependent configuration for opkg" +HOMEPAGE = "http://code.google.com/p/opkg/" LICENSE = "MIT" PACKAGE_ARCH = "${MACHINE_ARCH}" PR = "r1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service index 8e74026ec..432c3ddc2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service +++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service @@ -8,7 +8,7 @@ Before=sysinit.target Type=oneshot EnvironmentFile=-@SYSCONFDIR@/default/postinst ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi" -ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service +ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable opkg-configure.service StandardOutput=syslog RemainAfterExit=No diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch deleted file mode 100644 index 6fc405b2f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch +++ /dev/null @@ -1,69 +0,0 @@ -Upstream-Status: Submitted -Signed-off-by: Ross Burton - -From 086d5083dfe0102368cb7c8ce89b0c06b64ca773 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Tue, 10 Jan 2017 15:24:59 +0000 -Subject: [PATCH 1/2] opkg_cmd: only look at conffile status if we're going to - output it - -The loop to compare the recorded conffile hash with their hash on disk is -outputted at level INFO but the loop was executed at level NOTICE and higher. - -This means that if a conffile had been deleted the status operation would -produce error messages for output it isn't displaying. - -Signed-off-by: Ross Burton ---- - libopkg/opkg_cmd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c -index ba57c6a..37416fd 100644 ---- a/libopkg/opkg_cmd.c -+++ b/libopkg/opkg_cmd.c -@@ -638,7 +638,7 @@ static int opkg_info_status_cmd(int argc, char **argv, int installed_only) - - pkg_formatted_info(stdout, pkg); - -- if (opkg_config->verbosity >= NOTICE) { -+ if (opkg_config->verbosity >= INFO) { - conffile_list_elt_t *iter; - for (iter = nv_pair_list_first(&pkg->conffiles); iter; - iter = nv_pair_list_next(&pkg->conffiles, iter)) { --- -2.8.1 - -From 225e30e0f9fa7cfeaa3f89e2713e5147ab371def Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Tue, 10 Jan 2017 15:28:47 +0000 -Subject: [PATCH 2/2] conffile: gracefully handle deleted conffiles in - conffile_has_been_modified - -Handle conffiles that don't exist gracefully so that instead of showing an error -message from file_md5sum_alloc() a notice that the file has been deleted is -shown instead. - -Signed-off-by: Ross Burton ---- - libopkg/conffile.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libopkg/conffile.c b/libopkg/conffile.c -index b2f2469..7b4b87b 100644 ---- a/libopkg/conffile.c -+++ b/libopkg/conffile.c -@@ -51,6 +51,11 @@ int conffile_has_been_modified(conffile_t * conffile) - } - - root_filename = root_filename_alloc(filename); -+ if (!file_exists(root_filename)) { -+ opkg_msg(INFO, "Conffile %s deleted\n", conffile->name); -+ free(root_filename); -+ return 1; -+ } - - md5sum = file_md5sum_alloc(root_filename); - --- -2.8.1 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb deleted file mode 100644 index a21fde1cf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "Open Package Manager" -SUMMARY_libopkg = "Open Package Manager library" -SECTION = "base" -HOMEPAGE = "http://code.google.com/p/opkg/" -BUGTRACKER = "http://code.google.com/p/opkg/issues/list" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0" - -DEPENDS = "libarchive" - -PE = "1" - -SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ - file://opkg-configure.service \ - file://opkg.conf \ - file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ - file://status-conffile.patch \ -" - -SRC_URI[md5sum] = "6c52a065499056a196e0b45a27e392de" -SRC_URI[sha256sum] = "750b900b53b62a9b280b601a196f02da81091eda2f3478c509512aa5a1ec93be" - -inherit autotools pkgconfig systemd - -SYSTEMD_SERVICE_${PN} = "opkg-configure.service" - -target_localstatedir := "${localstatedir}" -OPKGLIBDIR = "${target_localstatedir}/lib" - -PACKAGECONFIG ??= "libsolv" - -PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" -PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" -PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" -PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" -PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" - -EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" - -do_install_append () { - install -d ${D}${sysconfdir}/opkg - install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf - echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf - - # We need to create the lock directory - install -d ${D}${OPKGLIBDIR}/opkg - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@BINDIR@,${bindir},g' \ - -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ - ${D}${systemd_unitdir}/system/opkg-configure.service - fi -} - -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" -RREPLACES_${PN} = "opkg-nogpg opkg-collateral" -RCONFLICTS_${PN} = "opkg-collateral" -RPROVIDES_${PN} = "opkg-collateral" - -PACKAGES =+ "libopkg" - -FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" -FILES_${PN} += "${systemd_unitdir}/system/" - -BBCLASSEXTEND = "native nativesdk" - -CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb new file mode 100644 index 000000000..3e511b6bb --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb @@ -0,0 +1,75 @@ +SUMMARY = "Open Package Manager" +SUMMARY_libopkg = "Open Package Manager library" +SECTION = "base" +HOMEPAGE = "http://code.google.com/p/opkg/" +BUGTRACKER = "http://code.google.com/p/opkg/issues/list" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0" + +DEPENDS = "libarchive" + +PE = "1" + +SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ + file://opkg-configure.service \ + file://opkg.conf \ + file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ +" + +SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c" +SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32" + +inherit autotools pkgconfig systemd + +SYSTEMD_SERVICE_${PN} = "opkg-configure.service" + +target_localstatedir := "${localstatedir}" +OPKGLIBDIR = "${target_localstatedir}/lib" + +PACKAGECONFIG ??= "libsolv" + +PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" +PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" +PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" +PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" +PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" +PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" + +EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" + +do_install_append () { + install -d ${D}${sysconfdir}/opkg + install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf + echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf + + # We need to create the lock directory + install -d ${D}${OPKGLIBDIR}/opkg + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@BINDIR@,${bindir},g' \ + -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ + ${D}${systemd_unitdir}/system/opkg-configure.service + fi +} + +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" +RREPLACES_${PN} = "opkg-nogpg opkg-collateral" +RCONFLICTS_${PN} = "opkg-collateral" +RPROVIDES_${PN} = "opkg-collateral" + +PACKAGES =+ "libopkg" + +FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" +FILES_${PN} += "${systemd_unitdir}/system/" + +BBCLASSEXTEND = "native nativesdk" + +CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb deleted file mode 100644 index e47342f3f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Optimised Inner Loop Runtime Compiler" -HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html" -LICENSE = "BSD-2-Clause & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e" - -SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz" - -SRC_URI[md5sum] = "8e9bef677bae289d3324d81c337a4507" -SRC_URI[sha256sum] = "7d52fa80ef84988359c3434e1eea302d077a08987abdde6905678ebcad4fa649" - -inherit autotools pkgconfig gtk-doc - -BBCLASSEXTEND = "native nativesdk" - -PACKAGES =+ "orc-examples" -PACKAGES_DYNAMIC += "^liborc-.*" -FILES_orc-examples = "${libdir}/orc/*" -FILES_${PN} = "${bindir}/*" - -python populate_packages_prepend () { - libdir = d.expand('${libdir}') - do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True) -} - -do_compile_prepend_class-native () { - sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb new file mode 100644 index 000000000..303f991fd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb @@ -0,0 +1,27 @@ +SUMMARY = "Optimised Inner Loop Runtime Compiler" +HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html" +LICENSE = "BSD-2-Clause & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e" + +SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz" + +SRC_URI[md5sum] = "5837dc20dacb5b668935bbded10cbb61" +SRC_URI[sha256sum] = "51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93" + +inherit autotools pkgconfig gtk-doc + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES =+ "orc-examples" +PACKAGES_DYNAMIC += "^liborc-.*" +FILES_orc-examples = "${libdir}/orc/*" +FILES_${PN} = "${bindir}/*" + +python populate_packages_prepend () { + libdir = d.expand('${libdir}') + do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True) +} + +do_compile_prepend_class-native () { + sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch new file mode 100644 index 000000000..7f601afab --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch @@ -0,0 +1,21 @@ +Repect LIBTOOLFLAGS + +This add a knob that can be controlled from env to set generic options +for libtool + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Index: uuid-1.6.2/Makefile.in +=================================================================== +--- uuid-1.6.2.orig/Makefile.in ++++ uuid-1.6.2/Makefile.in +@@ -56,7 +56,7 @@ RM = rm -f + CP = cp + RMDIR = rmdir + SHTOOL = $(S)/shtool +-LIBTOOL = @LIBTOOL@ ++LIBTOOL = @LIBTOOL@ $(LIBTOOLFLAGS) + TRUE = true + POD2MAN = pod2man + PERL = @PERL@ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb index 85a1bcf5c..5d9ca790e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb @@ -27,6 +27,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/ file://uuid-nostrip.patch \ file://install-pc.patch \ file://ldflags.patch \ + file://libtool-tag.patch \ " SRC_URI[md5sum] = "5db0d43a9022a6ebbbc25337ae28942f" SRC_URI[sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0" @@ -37,6 +38,7 @@ inherit autotools update-alternatives EXTRA_OECONF = "--without-dce --without-cxx --without-perl --without-perl-compat --without-php --without-pgsql" EXTRA_OECONF = "--includedir=${includedir}/ossp" +EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" do_configure_prepend() { # This package has a completely custom aclocal.m4, which should be acinclude.m4. diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch index a273688b9..0b45c39bd 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch @@ -31,7 +31,7 @@ was good, the implementation wasn't correct and they've been rewritten here. RP 2017/3/7 -Upstream-Status: Pending +Upstream-Status: Accepted Index: patchelf-0.9/src/patchelf.cc =================================================================== diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch new file mode 100644 index 000000000..f64cbed5c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch @@ -0,0 +1,38 @@ +commit 1cc234fea5600190d872329aca60e2365cefc39e +Author: Ed Bartosh +Date: Fri Jul 21 12:33:53 2017 +0300 + +fix adjusting startPage + +startPage is adjusted unconditionally for all executables. +This results in incorrect addresses assigned to INTERP and LOAD +program headers, which breaks patched executable. + +Adjusting startPage variable only when startOffset > startPage +should fix this. + +This change is related to the issue NixOS#10 + +Signed-off-by: Ed Bartosh + +Github PR: https://github.com/NixOS/patchelf/pull/127 + +Upstream-Status: Submitted + +diff --git a/src/patchelf.cc b/src/patchelf.cc +index cbd36c0..e9d7ea5 100644 +--- a/src/patchelf.cc ++++ b/src/patchelf.cc +@@ -720,10 +720,8 @@ void ElfFile::rewriteSectionsLibrary() + since DYN executables tend to start at virtual address 0, so + rewriteSectionsExecutable() won't work because it doesn't have + any virtual address space to grow downwards into. */ +- if (isExecutable) { +- if (startOffset >= startPage) { +- debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage); +- } ++ if (isExecutable && startOffset > startPage) { ++ debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage); + startPage = startOffset; + } + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb index 01f0e6213..d70303963 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb @@ -3,6 +3,7 @@ SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \ file://handle-read-only-files.patch \ file://Increase-maxSize-to-64MB.patch \ file://avoidholes.patch \ + file://fix-adjusting-startPage.patch \ " LICENSE = "GPLv3" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb index 476fa6f07..9635a5e70 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb @@ -7,9 +7,7 @@ HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" -SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \ -" - +SRC_URI = "https://dev.gentoo.org/~vapier/dist/pax-utils-${PV}.tar.xz" SRC_URI[md5sum] = "a580468318f0ff42edf4a8cd314cc942" SRC_URI[sha256sum] = "7f4a7f8db6b4743adde7582fa48992ad01776796fcde030683732f56221337d9" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb deleted file mode 100644 index 432803c7b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Perl module to manipulate and access URI strings" -DESCRIPTION = "This package contains the URI.pm module with friends. \ -The module implements the URI class. URI objects can be used to access \ -and manipulate the various components that make up these strings." - -HOMEPAGE = "http://search.cpan.org/dist/URI/" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f" - -DEPENDS += "perl" - -SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/URI-${PV}.tar.gz" - -SRC_URI[md5sum] = "247c3da29a794f72730e01aa5a715daf" -SRC_URI[sha256sum] = "9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115" - -S = "${WORKDIR}/URI-${PV}" - -EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" - -inherit cpan - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb new file mode 100644 index 000000000..a399c10b5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb @@ -0,0 +1,30 @@ +SUMMARY = "Perl module to manipulate and access URI strings" +DESCRIPTION = "This package contains the URI.pm module with friends. \ +The module implements the URI class. URI objects can be used to access \ +and manipulate the various components that make up these strings." + +HOMEPAGE = "http://search.cpan.org/dist/URI/" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f" + +DEPENDS += "perl" + +SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz" + +SRC_URI[md5sum] = "cd56d81ed429efaa97e7f3ff08851b48" +SRC_URI[sha256sum] = "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32" + +S = "${WORKDIR}/URI-${PV}" + +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" + +inherit cpan + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb index d9bbf713a..cc3a660f7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb @@ -1,4 +1,5 @@ SUMMARY = "XML::Parser - A perl module for parsing XML documents" +HOMEPAGE = "https://libexpat.github.io/" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb index 2c01976ca..047842704 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb @@ -2,6 +2,7 @@ DESCRIPTION = "libxml-perl is a collection of smaller Perl modules, scripts, and documents for working with XML in Perl. libxml-perl software \ works in combination with XML::Parser, PerlSAX, XML::DOM, \ XML::Grove and others." +HOMEPAGE = "http://search.cpan.org/dist/libxml-perl/" SUMMARY = "Collection of Perl modules for working with XML" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb deleted file mode 100644 index 2243bb2c2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Perl module for reading and writing XML" -DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \ -on top of an underlying XML parsing module to maintain XML files \ -(especially configuration files). It is a blunt rewrite of XML::Simple \ -(by Grant McLean) to use the XML::LibXML parser for XML structures, \ -where the original uses plain Perl or SAX parsers." -HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fa1187fceda00eee10b62961407ea7be" -DEPENDS += "libxml-parser-perl" - -SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz" - -SRC_URI[md5sum] = "0914abddfce749453ed89b54029f2643" -SRC_URI[sha256sum] = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49" - -S = "${WORKDIR}/XML-Simple-${PV}" - -EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}" - -inherit cpan - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb new file mode 100644 index 000000000..0cf2eebda --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb @@ -0,0 +1,24 @@ +SUMMARY = "Perl module for reading and writing XML" +DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \ +on top of an underlying XML parsing module to maintain XML files \ +(especially configuration files). It is a blunt rewrite of XML::Simple \ +(by Grant McLean) to use the XML::LibXML parser for XML structures, \ +where the original uses plain Perl or SAX parsers." +HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=23477e18a0d04392cdf44ae70e49b495" +DEPENDS += "libxml-parser-perl" + +SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz" + +SRC_URI[md5sum] = "1cd2e8e3421160c42277523d5b2f4dd2" +SRC_URI[sha256sum] = "9a14819fd17c75fbb90adcec0446ceab356cab0ccaff870f2e1659205dc2424f" + +S = "${WORKDIR}/XML-Simple-${PV}" + +EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}" + +inherit cpan + +BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb index e01d11fbe..6c56a7d70 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb @@ -32,6 +32,7 @@ do_configure () { -Dcc="${CC}" \ -Dcflags="${CFLAGS}" \ -Dldflags="${LDFLAGS}" \ + -Dlddlflags="${LDFLAGS} -shared" \ -Dcf_by="Open Embedded" \ -Dprefix=${prefix} \ -Dvendorprefix=${prefix} \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch index 7391ac583..14a05d291 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch @@ -10,7 +10,7 @@ be removed when all supported distros comes with GCC>=4.9. [YOCTO #10338] -Upstream-status: Inappropriate [configuration] +Upstream-Status: Inappropriate [configuration] [1] http://errors.yoctoproject.org/Errors/Details/109589/ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff index a63b96831..c597701ca 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff @@ -13,6 +13,7 @@ explicitly tell CPAN not to touch those with INSTALLDIRS=site. Bug-Debian: http://bugs.debian.org/688842 Patch-Name: debian/cpan-missing-site-dirs.diff +Upstream-Status: Pending --- cpan/CPAN/lib/CPAN/FirstTime.pm | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff index 6b5295045..572f14951 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff @@ -9,6 +9,7 @@ explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC ordering, but not ours. Patch-Name: debian/cpan_definstalldirs.diff +Upstream-Status: Pending --- cpan/CPAN/lib/CPAN/FirstTime.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff index 280bf1170..0861650eb 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff @@ -8,6 +8,7 @@ Bug-Debian: http://bugs.debian.org/340047 Package dependencies ensure the correct library is linked at run-time. Patch-Name: debian/db_file_ver.diff +Upstream-Status: Pending --- cpan/DB_File/version.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff index 601ee4c30..c2ac4a3bd 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff @@ -15,6 +15,7 @@ warnings will still be useful, so modify them slightly to point to the separate packages instead. Patch-Name: debian/deprecate-with-apt.diff +Upstream-Status: Pending --- lib/deprecate.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff index fbea2ee22..4662ecdaa 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff @@ -6,6 +6,7 @@ Subject: Replace generic man(1) instructions with Debian-specific information. Indicate that the user needs to install the perl-doc package. Patch-Name: debian/doc_info.diff +Upstream-Status: Pending --- pod/perl.pod | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff index e074b20fd..b3bd58c1d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff @@ -11,6 +11,7 @@ Bug-Debian: http://bugs.debian.org/290336 issues with follow => 1 (see #603686 and [rt.cpan.org #64585]) Patch-Name: debian/enc2xs_inc.diff +Upstream-Status: Pending --- cpan/Encode/bin/enc2xs | 8 ++++---- t/porting/customized.t | 3 +++ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff index 3d09229ed..a965fbeee 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff @@ -11,7 +11,7 @@ processes embedding perl when upgrading to a newer version, compatible, but built on a different machine. Patch-Name: debian/errno_ver.diff - +Upstream-Status: Pending --- ext/Errno/Errno_pm.PL | 5 ----- 1 file changed, 5 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff index adb4bd991..e023038f0 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff @@ -7,6 +7,7 @@ The Debian packaging moves libperl.a a couple of levels up from the CORE directory to match other static libraries. Patch-Name: debian/extutils_set_libperl_path.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +- pp.c | 2 +- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff index ec461cfe5..bdf34d185 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff @@ -11,6 +11,7 @@ since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build" rule where the Makefile is created, but is for the clean/binary* targets. Patch-Name: debian/fakeroot.diff +Upstream-Status: Pending --- Makefile.SH | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff index d319e7518..082709140 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff @@ -16,6 +16,7 @@ Please see the attached patch for a quick fix of this issue. [Maintainer's note: html2text in Debian is not the same implementation as the html2text.pl which is expected, but should provide similar functionality]. +Upstream-Status: Pending --- cpan/CPAN/lib/CPAN/Distribution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff index 61a92712e..f3d92583e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff @@ -10,6 +10,7 @@ Compiling XS extensions without $Config{ccflags} can break the binary interface on some platforms. Patch-Name: fixes/document_makemaker_ccflags.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff index 525f962c1..d9b36f6d2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff @@ -47,6 +47,7 @@ Bug-Debian: http://bugs.debian.org/587650 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=77790 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=77790 Patch-Name: fixes/memoize_storable_nstore.diff +Upstream-Status: Pending --- cpan/Memoize/Memoize/Storable.pm | 2 +- cpan/Memoize/t/tie_storable.t | 24 ++++++++++++++++++++---- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff index 3c31972c6..afcf7fb01 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff @@ -7,6 +7,7 @@ Bug-Debian: http://bugs.debian.org/100195 Bug: http://rt.cpan.org/Public/Bug/Display.html?id=36038 Patch-Name: fixes/net_smtp_docs.diff +Upstream-Status: Pending --- cpan/libnet/lib/Net/SMTP.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff index b5564fdbc..9bdf41b47 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff @@ -12,6 +12,7 @@ Bug: https://rt.perl.org/Ticket/Display.html?id=125381 Bug-Debian: https://bugs.debian.org/788636 Origin: upstream, http://perl5.git.perl.org/perl.git/commit/89d84ff965 Patch-Name: fixes/perl-Cnn.diff +Upstream-Status: Pending --- t/run/switchC.t | 7 ++++++- util.c | 17 ++++++++--------- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff index 7c9ca867a..d23573f18 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff @@ -13,6 +13,7 @@ consistent. Thanks, Niko Tyni. Bug-Debian: http://bugs.debian.org/759405 Origin: upstream Patch-Name: fixes/pod_man_reproducible_date.diff +Upstream-Status: Pending --- cpan/podlators/lib/Pod/Man.pm | 69 +++++++++++++++++++++++++++++++----------- cpan/podlators/t/devise-date.t | 29 +++++++++++++----- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff index 7ebbf9c60..9de29b865 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff @@ -10,6 +10,7 @@ One may want to set this to an empty string. Handle that correctly. Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=e0e9fcb53e8fc954b2b1955385eea18c27f869af Bug-Debian: https://bugs.debian.org/780259 Patch-Name: fixes/podman-empty-date.diff +Upstream-Status: Pending --- cpan/podlators/lib/Pod/Man.pm | 2 +- cpan/podlators/t/devise-date.t | 6 +++++- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff index 1a6036116..d8858d8a6 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff @@ -14,6 +14,7 @@ standard input. (Debian Bug#777405) Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=d98872e46c93861b7aba14949e1258712087dc55 Bug-Debian: https://bugs.debian.org/777405 Patch-Name: fixes/podman-pipe.diff +Upstream-Status: Pending --- cpan/podlators/lib/Pod/Man.pm | 15 +++++++++++++++ cpan/podlators/scripts/pod2man.PL | 4 ++++ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff index 0cdfeffd1..b6ae409ac 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff @@ -12,6 +12,7 @@ entry. Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=52db93bf80e4a06f8497e4ebade0506b6ee0e70d Bug-Debian: https://bugs.debian.org/780259 Patch-Name: fixes/podman-utc-docs.diff +Upstream-Status: Pending --- cpan/podlators/lib/Pod/Man.pm | 6 +++++- cpan/podlators/scripts/pod2man.PL | 11 ++++++----- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff index fbd7b9db9..3fb7c20dd 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff @@ -14,6 +14,7 @@ The attached patch fixes this by using GMT (~UTC) dates instead. Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=913fbb2bd2ce071e20128629302ae2852554cad4 Bug-Debian: https://bugs.debian.org/780259 Patch-Name: fixes/podman-utc.diff +Upstream-Status: Pending --- cpan/podlators/lib/Pod/Man.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff index d1b498b52..c8663f535 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff @@ -7,6 +7,7 @@ This is needed to satisfy Debian policy regarding group-writable site directories. Patch-Name: fixes/respect_umask.diff +Upstream-Status: Pending --- cpan/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++++++--------- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 +++++++++--------- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff index a62c746e9..7e1fd697c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff @@ -4,6 +4,7 @@ Date: Tue, 8 Mar 2005 19:30:38 +1100 Subject: Debian policy doesn't install .packlist files for core or vendor. Patch-Name: debian/instmodsh_doc.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/bin/instmodsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff index d80f86c21..ff0b2871f 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff @@ -4,6 +4,7 @@ Date: Fri, 18 Mar 2005 22:22:25 +1100 Subject: Remove standard libs from LD_RUN_PATH as per Debian policy. Patch-Name: debian/ld_run_path.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff index 54ef9640e..d5347422d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff @@ -5,6 +5,7 @@ Subject: Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable. Patch-Name: debian/libnet_config_path.diff +Upstream-Status: Pending --- cpan/libnet/lib/Net/Config.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff index 76b805451..0cdc0d3e3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff @@ -6,6 +6,7 @@ Subject: Note that libperl-dev package is required for embedded linking Bug-Debian: http://bugs.debian.org/186778 Patch-Name: debian/libperl_embed_doc.diff +Upstream-Status: Pending --- lib/ExtUtils/Embed.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff index fd471ed7a..7cf1242c0 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff @@ -14,6 +14,7 @@ the test more robust by first clearing all the locale relevant variables. Bug: https://rt.perl.org/Ticket/Display.html?id=124310 Bug-Debian: https://bugs.debian.org/782068 Patch-Name: debian/locale-robustness.diff +Upstream-Status: Pending --- t/run/locale.t | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff index fa0f9daf9..5f0718089 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff @@ -11,6 +11,7 @@ the PASTHRU list fixes this. Bug-Debian: https://bugs.debian.org/758471 Patch-Name: debian/makemaker-pasthru.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff index b1b4cb9a6..d870b608c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff @@ -4,6 +4,7 @@ Date: Sat, 23 May 2015 21:15:06 +0200 Subject: Update t/porting/customized.dat for files patched in Debian Patch-Name: debian/makemaker_customized.diff +Upstream-Status: Pending --- t/porting/customized.dat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff index ae1590760..7e2248403 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff @@ -17,6 +17,7 @@ The rationale being that an admin (via site), or module packager version than is included in core. Patch-Name: debian/mod_paths.diff +Upstream-Status: Pending --- perl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff index b911fd276..7484bec41 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff @@ -4,6 +4,7 @@ Date: Tue, 8 Mar 2005 19:30:38 +1100 Subject: Don't install .packlist or perllocal.pod for perl or vendor Patch-Name: debian/no_packlist_perllocal.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 35 +++---------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff index 8656b027e..2d05ae548 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff @@ -10,6 +10,7 @@ The list of packaged patches is in patchlevel-debian.h, which is generated from the debian/patches/ directory when building the package. Patch-Name: debian/patchlevel.diff +Upstream-Status: Pending --- patchlevel.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch index 533952cac..6f1625bb1 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch @@ -10,6 +10,7 @@ Bug-Debian: http://bugs.debian.org/668490 Forwarded: not-needed Patch-Name: debian/perl5db-x-terminal-emulator.patch +Upstream-Status: Pending --- lib/perl5db.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff index 2c1eab970..5c7413b96 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff @@ -21,6 +21,7 @@ On Sat, Jan 10, 2009 at 12:37:18AM +1100, Brendan O'Dea wrote: Signed-off-by: Niko Tyni Patch-Name: debian/perlivp.diff +Upstream-Status: Pending --- utils/perlivp.PL | 1 + 1 file changed, 1 insertion(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff index 6270b8731..47075625c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff @@ -4,6 +4,7 @@ Date: Sat, 18 Apr 2015 17:39:32 +0300 Subject: Update porting/customized.dat for pod2man modifications Patch-Name: debian/pod2man-customized.diff +Upstream-Status: Pending --- t/porting/customized.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff index c41efbe3e..b681c3e89 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff @@ -9,6 +9,7 @@ PREFIX= to the "make install" command (used when packaging modules). Patch-Name: debian/prefix_changes.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 12 ++++++------ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 3 +-- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff index d153e0efc..a2ed52ab2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff @@ -10,7 +10,7 @@ We want to keep the dependencies on perl-base as small as possible, and some of the original list may be present on buildds (see Bug#128355). Patch-Name: debian/prune_libs.diff - +Upstream-Status: Pending --- Configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff index 8a3fc9912..5d9a7c4b4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff @@ -8,6 +8,7 @@ for instance because the repository only imported the Perl tarball, the regeneration check is broken because lib/.gitignore is missing. Patch-Name: debian/regen-skip.diff +Upstream-Status: Pending --- regen/lib_cleanup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff index ecfc0bc62..3b3745238 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff @@ -12,6 +12,7 @@ a new unrelated test case. Skip the test until the culprit is found. Patch-Name: debian/skip-kfreebsd-crash.diff +Upstream-Status: Pending --- t/op/threads.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff index 4c87104cc..279f4ab76 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff @@ -9,6 +9,7 @@ upstream. This complicates things needlessly for downstream packagers. Skip the tests altogether even if the .git directory exists. Patch-Name: debian/skip-upstream-git-tests.diff +Upstream-Status: Pending --- t/test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff index cb3145776..4964e480c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff @@ -14,6 +14,7 @@ Any real locale problem will show up after the system upgrade too, and the warning will be triggered normally again at that point. Patch-Name: debian/squelch-locale-warnings.diff +Upstream-Status: Pending --- locale.c | 5 ++++- pod/perllocale.pod | 8 ++++++++ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff index 53adc2f4d..ab373b333 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff @@ -6,6 +6,7 @@ Subject: Set umask approproately for site install directories Policy requires group writable site directories Patch-Name: debian/writable_site_dirs.diff +Upstream-Status: Pending --- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch index 6b05b877f..b85b50cea 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch @@ -9,6 +9,8 @@ Fixed: Can't locate ../../t/lib/dbmt_common.pl in @INC Signed-off-by: Robert Yang + +Upstream-Status: Pending --- ext/ODBM_File/t/odbm.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb index cf7a8e121..b55d2223e 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb @@ -124,30 +124,8 @@ do_configure() { cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS} done - # Fixups for uclibc - if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then - sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \ - -e "s,\(d_futimes=\)'define',\1'undef',g" \ - -e "s,\(d_finitel=\)'define',\1'undef',g" \ - -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \ - -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \ - -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \ - -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \ - -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \ - -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \ - -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \ - -e "s,\(d_sockatmark=\)'define',\1'undef',g" \ - -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \ - -e "s,\(d_eaccess=\)'define',\1'undef',g" \ - -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \ - -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \ - -e "s,\(d_stdiobase=\)'define',\1'undef',g" \ - -e "s,\(d_stdstdio=\)'define',\1'undef',g" \ - -e "s,-fstack-protector,-fno-stack-protector,g" \ - config.sh-${TARGET_ARCH}-${TARGET_OS} - fi # Fixups for musl - if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then + if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" -o "${TARGET_OS}" = "linux-muslx32" ]; then sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \ -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \ -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \ @@ -193,7 +171,7 @@ do_configure() { ;; esac # These are strewn all over the source tree - for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do + for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" --exclude="Glossary" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do echo Fixing: $foo sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo done @@ -245,6 +223,7 @@ PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess" perl_package_preprocess () { # Fix up installed configuration sed -i -e "s,${D},,g" \ + -e "s,${DEBUG_PREFIX_MAP},,g" \ -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ -e "s,-isystem${STAGING_INCDIR} ,,g" \ -e "s,${STAGING_LIBDIR},${libdir},g" \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch new file mode 100644 index 000000000..3805ad3eb --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch @@ -0,0 +1,224 @@ +From 4d7b4d7c8e9966c593f472355607204c6c80fecb Mon Sep 17 00:00:00 2001 +From: Dan Kegel +Date: Sun, 4 Jun 2017 19:19:55 -0700 +Subject: [PATCH] Minimal tweaks to compile with Visual C 2015 + +Upstream-Status: Backport + +Signed-off-by: Maxin B. John +--- + getopt_long.c | 2 ++ + libpkgconf/bsdstubs.c | 1 + + libpkgconf/libpkgconf.h | 2 +- + libpkgconf/path.c | 10 +++++----- + libpkgconf/pkg.c | 28 +++++++++++++++++++--------- + libpkgconf/stdinc.h | 9 +++++++-- + 6 files changed, 35 insertions(+), 17 deletions(-) + +diff --git a/getopt_long.c b/getopt_long.c +index afeb68d..5ce9bfd 100644 +--- a/getopt_long.c ++++ b/getopt_long.c +@@ -62,7 +62,9 @@ + #include + #include + #include ++#ifndef _WIN32 + #include ++#endif + + #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES + +diff --git a/libpkgconf/bsdstubs.c b/libpkgconf/bsdstubs.c +index 8f70ff3..2c000ac 100644 +--- a/libpkgconf/bsdstubs.c ++++ b/libpkgconf/bsdstubs.c +@@ -17,6 +17,7 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include + #include + #include + +diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h +index 404bf0c..551d85d 100644 +--- a/libpkgconf/libpkgconf.h ++++ b/libpkgconf/libpkgconf.h +@@ -310,7 +310,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t + /* path.c */ + void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter); + size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter); +-size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter); ++size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter); + bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist); + void pkgconf_path_free(pkgconf_list_t *dirlist); + bool pkgconf_path_relocate(char *buf, size_t buflen); +diff --git a/libpkgconf/path.c b/libpkgconf/path.c +index dddb3bf..59e003e 100644 +--- a/libpkgconf/path.c ++++ b/libpkgconf/path.c +@@ -20,7 +20,7 @@ + # include + #endif + +-#ifdef HAVE_SYS_STAT_H ++#if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32) + # include + # define PKGCONF_CACHE_INODES + #endif +@@ -156,12 +156,12 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter) + /* + * !doc + * +- * .. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist) ++ * .. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist) + * + * Adds the paths specified in an environment variable to a path list. If the environment variable is not set, + * an optional default set of paths is added. + * +- * :param char* environ: The environment variable to look up. ++ * :param char* envvarname: The environment variable to look up. + * :param char* fallback: The fallback paths to use if the environment variable is not set. + * :param pkgconf_list_t* dirlist: The path list to add the path nodes to. + * :param bool filter: Whether to perform duplicate filtering. +@@ -169,11 +169,11 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter) + * :rtype: size_t + */ + size_t +-pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter) ++pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter) + { + const char *data; + +- data = getenv(environ); ++ data = getenv(envvarname); + if (data != NULL) + return pkgconf_path_split(data, dirlist, filter); + +diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c +index 7aebd61..5dacae3 100644 +--- a/libpkgconf/pkg.c ++++ b/libpkgconf/pkg.c +@@ -30,6 +30,8 @@ + # define PKG_CONFIG_REG_KEY "Software\\pkgconfig\\PKG_CONFIG_PATH" + # undef PKG_DEFAULT_PATH + # define PKG_DEFAULT_PATH "../lib/pkgconfig;../share/pkgconfig" ++#define strncasecmp _strnicmp ++#define strcasecmp _stricmp + #endif + + #define PKG_CONFIG_EXT ".pc" +@@ -134,21 +136,21 @@ static int pkgconf_pkg_parser_keyword_pair_cmp(const void *key, const void *ptr) + static void + pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value) + { +- char **dest = ((void *) pkg + offset); ++ char **dest = (char **)((char *) pkg + offset); + *dest = pkgconf_tuple_parse(client, &pkg->vars, value); + } + + static void + pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value) + { +- pkgconf_list_t *dest = ((void *) pkg + offset); ++ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset); + pkgconf_fragment_parse(client, dest, &pkg->vars, value); + } + + static void + pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value) + { +- pkgconf_list_t *dest = ((void *) pkg + offset); ++ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset); + pkgconf_dependency_parse(client, pkg, dest, value); + } + +@@ -238,7 +240,7 @@ pkgconf_pkg_validate(const pkgconf_client_t *client, const pkgconf_pkg_t *pkg) + + for (i = 0; i < PKGCONF_ARRAY_SIZE(pkgconf_pkg_validations); i++) + { +- char **p = ((void *) pkg + pkgconf_pkg_validations[i].offset); ++ char **p = (char **)((char *) pkg + pkgconf_pkg_validations[i].offset); + + if (*p != NULL) + continue; +@@ -587,7 +589,7 @@ pkgconf_scan_all(pkgconf_client_t *client, void *data, pkgconf_pkg_iteration_fun + + #ifdef _WIN32 + static pkgconf_pkg_t * +-pkgconf_pkg_find_in_registry_key(const pkgconf_client_t *client, HKEY hkey, const char *name) ++pkgconf_pkg_find_in_registry_key(pkgconf_client_t *client, HKEY hkey, const char *name) + { + pkgconf_pkg_t *pkg = NULL; + +@@ -1048,8 +1050,12 @@ typedef struct { + + static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_rules[] = { + [PKGCONF_CMP_ANY] = { +- .rulecmp = {}, +- .depcmp = {}, ++ .rulecmp = { ++ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none, ++ }, ++ .depcmp = { ++ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none, ++ }, + }, + [PKGCONF_CMP_LESS_THAN] = { + .rulecmp = { +@@ -1121,7 +1127,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_ + [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_eq, + [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_ne + }, +- .depcmp = {}, ++ .depcmp = { ++ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none, ++ }, + }, + [PKGCONF_CMP_NOT_EQUAL] = { + .rulecmp = { +@@ -1133,7 +1141,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_ + [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_ne, + [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_eq + }, +- .depcmp = {}, ++ .depcmp = { ++ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none, ++ }, + }, + }; + +diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h +index 58cc6c7..ac7e53c 100644 +--- a/libpkgconf/stdinc.h ++++ b/libpkgconf/stdinc.h +@@ -24,9 +24,7 @@ + #include + #include + #include +-#include + #include +-#include + #include + + #ifdef _WIN32 +@@ -34,8 +32,15 @@ + # include + # include + # define PATH_DEV_NULL "nul" ++# ifndef ssize_t ++# include ++# define ssize_t SSIZE_T ++# endif ++# include "win-dirent.h" + #else + # define PATH_DEV_NULL "/dev/null" ++# include ++# include + #endif + + #endif +-- +2.4.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch new file mode 100644 index 000000000..49ebe31e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch @@ -0,0 +1,48 @@ +From ea28c5b34457cf7676181b284e22ea5f79a30d85 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" +Date: Thu, 13 Jul 2017 14:47:31 +0300 +Subject: [PATCH] stdinc.h: fix build with mingw + +Fixes this build error with mingw: +... +| compilation terminated. +| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0, +| from ../pkgconf-1.3.7/libpkgconf/audit.c:16: +| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No +such file or directory +| # include + +Upstream-Status: Submitted + +Signed-off-by: Maxin B. John +--- + libpkgconf/stdinc.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h +index ac7e53c..d8efcf5 100644 +--- a/libpkgconf/stdinc.h ++++ b/libpkgconf/stdinc.h +@@ -33,10 +33,18 @@ + # include + # define PATH_DEV_NULL "nul" + # ifndef ssize_t ++# ifndef __MINGW32__ + # include ++# else ++# include ++# endif + # define ssize_t SSIZE_T + # endif +-# include "win-dirent.h" ++# ifndef __MINGW32__ ++# include "win-dirent.h" ++# else ++# include ++# endif + #else + # define PATH_DEV_NULL "/dev/null" + # include +-- +2.4.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in new file mode 100644 index 000000000..4fc9b0a4a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in @@ -0,0 +1,24 @@ +#! /bin/sh + +# Orignal pkg-config-native action when called as pkg-config-native +# NO Change here +if [ "pkg-config-native" = "`basename $0`" ] ; then + PKG_CONFIG_PATH="@PATH_NATIVE@" + PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" + unset PKG_CONFIG_SYSROOT_DIR +else + # in this case check if we are in the esdk + if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then + parentpid=`ps -o ppid= -p $$` + parentpid_info=`ps -wo comm= -o args= -p $parentpid` + + # check if we are being called from the kernel's make menuconfig + if ( echo $parentpid_info | grep -q check-lxdialog ) ; then + PKG_CONFIG_PATH="@PATH_NATIVE@" + PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" + unset PKG_CONFIG_SYSROOT_DIR + fi + fi +fi + +pkg-config.real "$@" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in new file mode 100644 index 000000000..9ed30a0d8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in @@ -0,0 +1,6 @@ +#! /bin/sh + +PKG_CONFIG_PATH="@PATH_NATIVE@" +unset PKG_CONFIG_SYSROOT_DIR + +pkg-config "$@" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper new file mode 100755 index 000000000..695f34956 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper @@ -0,0 +1,16 @@ +#!/bin/sh +# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues +# +# Copyright (C) 2015 Christopher Larson +# License: MIT (see COPYING.MIT at the root of the repository for terms) + +for arg; do + case "$arg" in + --variable|--variable=*) + # pkg-config doesn't sysroot-prefix user variables + unset PKG_CONFIG_SYSROOT_DIR + ;; + esac +done + +exec pkgconf "$@" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb new file mode 100644 index 000000000..5da0dd15b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb @@ -0,0 +1,73 @@ +SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks." +DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \ +flags for development frameworks. It is similar to pkg-config from \ +freedesktop.org, providing additional functionality while also maintaining \ +compatibility." +HOMEPAGE = "http://pkgconf.org" +BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues" +SECTION = "devel" +PROVIDES += "pkgconfig" +RPROVIDES_${PN} += "pkgconfig" +DEFAULT_PREFERENCE = "-1" + +# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or +# ISC, but has different wording, so needs its own name. +LICENSE = "pkgconf" +LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f" + +SRC_URI = "\ + https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \ + file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \ + file://0001-stdinc.h-fix-build-with-mingw.patch \ + file://pkg-config-wrapper \ + file://pkg-config-native.in \ + file://pkg-config-esdk.in \ +" +SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197" +SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339" + +inherit autotools update-alternatives + +EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'" + +do_install_append () { + # Install a wrapper which deals, as much as possible with pkgconf vs + # pkg-config compatibility issues. + install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config" +} + +do_install_append_class-native () { + # Install a pkg-config-native wrapper that will use the native sysroot instead + # of the MACHINE sysroot, for using pkg-config when building native tools. + sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ + < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native + install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native + sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ + -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ + < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk + install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk +} + +ALTERNATIVE_${PN} = "pkg-config" + +# When using the RPM generated automatic package dependencies, some packages +# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by +# specifying an appropriate provide. +RPROVIDES_${PN} += "pkgconfig(pkg-config)" + +# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev +FILES_${PN}-dev_remove = "${datadir}/aclocal" +FILES_${PN} += "${datadir}/aclocal" + +BBCLASSEXTEND += "native nativesdk" + +pkgconf_sstate_fixup_esdk () { + if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then + pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" + mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real + lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config + sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native + fi +} + +SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch deleted file mode 100644 index 14c8293a5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 946d36266d8a30f04fe34d3183bf4929141934d2 Mon Sep 17 00:00:00 2001 -From: coypu -Date: Wed, 2 Mar 2016 19:38:48 +0200 -Subject: [PATCH] gdate: Move warning pragma outside of function - -Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on -older versions of GCC, which don't allow pragma inside functions. - -https://bugzilla.gnome.org/761550 ---- -Upstream-Status: Backport -Signed-off-by: Khem Raj - - glib/glib/gdate.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c -index 1978cf7..20e6c4a 100644 ---- a/glib/glib/gdate.c -+++ b/glib/glib/gdate.c -@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d, - * - * Returns: number of characters written to the buffer, or 0 the buffer was too small - */ -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-nonliteral" -+ - gsize - g_date_strftime (gchar *s, - gsize slen, -@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s, - return retval; - #endif - } -+ -+#pragma GCC diagnostic pop --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in new file mode 100644 index 000000000..4fc9b0a4a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in @@ -0,0 +1,24 @@ +#! /bin/sh + +# Orignal pkg-config-native action when called as pkg-config-native +# NO Change here +if [ "pkg-config-native" = "`basename $0`" ] ; then + PKG_CONFIG_PATH="@PATH_NATIVE@" + PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" + unset PKG_CONFIG_SYSROOT_DIR +else + # in this case check if we are in the esdk + if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then + parentpid=`ps -o ppid= -p $$` + parentpid_info=`ps -wo comm= -o args= -p $parentpid` + + # check if we are being called from the kernel's make menuconfig + if ( echo $parentpid_info | grep -q check-lxdialog ) ; then + PKG_CONFIG_PATH="@PATH_NATIVE@" + PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" + unset PKG_CONFIG_SYSROOT_DIR + fi + fi +fi + +pkg-config.real "$@" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index dc44992c7..52ef2a977 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb @@ -8,13 +8,13 @@ SECTION = "console/utils" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV = "87152c05be88ca8be71a3a563f275b3686d32c28" -PV = "0.29.1+git${SRCPV}" +SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b" +PV = "0.29.2+git${SRCPV}" SRC_URI = "git://anongit.freedesktop.org/pkg-config \ + file://pkg-config-esdk.in \ file://pkg-config-native.in \ file://fix-glib-configure-libtool-usage.patch \ - file://0001-gdate-Move-warning-pragma-outside-of-function.patch \ file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ " @@ -55,4 +55,19 @@ do_install_append_class-native () { -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native + sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ + -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ + < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk + install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk } + +pkgconfig_sstate_fixup_esdk () { + if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then + pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" + mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real + lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config + sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native + fi +} + +SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb index 4529dbfcf..570ef36a3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb @@ -3,6 +3,7 @@ SECTION = "devel" # Would need transfig-native for documentation if it wasn't disabled DEPENDS = "elfutils binutils" SUMMARY = "An ELF prelinking utility" +HOMEPAGE = "http://git.yoctoproject.org/cgit.cgi/prelink-cross/about/" DESCRIPTION = "The prelink package contains a utility which modifies ELF shared libraries \ and executables, so that far fewer relocations need to be resolved at \ runtime and thus programs come up faster." @@ -31,6 +32,8 @@ SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \ file://prelink.cron.daily \ file://prelink.default \ file://macros.prelink" +UPSTREAM_CHECK_GITTAGREGEX = "upstream has no usable tags" +UPSTREAM_VERSION_UNKNOWN = "1" TARGET_OS_ORIG := "${TARGET_OS}" OVERRIDES_append = ":${TARGET_OS_ORIG}" @@ -150,13 +153,15 @@ do_install_append () { install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink } -# If we're using image-prelink, we want to skip this on the host side -# but still do it if the package is installed on the target... +# If we ae doing a cross install, we want to avoid prelinking. +# Prelinking during a cross install should be handled by the image-prelink +# bbclass. If the user desires this to run on the target at first boot +# they will need to create a custom boot script. pkg_postinst_prelink() { #!/bin/sh if [ "x$D" != "x" ]; then - ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)} + exit 0 fi prelink -a diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch new file mode 100644 index 000000000..42557b17a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch @@ -0,0 +1,292 @@ +From 9e407e0be01695e7b927f5820ade87ee9602c248 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 15 Sep 2017 17:00:14 +0300 +Subject: [PATCH] Use epoll API on Linux + +Also a couple of other modifications due to epoll having +a different approach to how the working set of fds is defined +and used: +1) open_client() returns an index into the array of clients +2) close_client() has a protection against being called twice +with the same client (which would mess up the active_clients +counter) + +Upstream-Status: Submitted [Seebs CC'd by email] +Signed-off-by: Alexander Kanavin + +--- + enums/exit_status.in | 3 + + pseudo_server.c | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 190 insertions(+), 2 deletions(-) + +diff --git a/enums/exit_status.in b/enums/exit_status.in +index 6be44d3..88f94cd 100644 +--- a/enums/exit_status.in ++++ b/enums/exit_status.in +@@ -18,3 +18,6 @@ listen_fd, "server loop had no valid listen fd" + pseudo_loaded, "server couldn't get out of pseudo environment" + pseudo_prefix, "couldn't get valid pseudo prefix" + pseudo_invocation, "invalid server command arguments" ++epoll_create, "epoll_create() failed" ++epoll_ctl, "epoll_ctl() failed" ++ +diff --git a/pseudo_server.c b/pseudo_server.c +index ff16efd..14d34de 100644 +--- a/pseudo_server.c ++++ b/pseudo_server.c +@@ -40,6 +40,12 @@ + #include "pseudo_client.h" + #include "pseudo_db.h" + ++// This has to come after pseudo includes, as that's where PSEUDO_PORT defines are ++#ifdef PSEUDO_PORT_LINUX ++#include ++#endif ++ ++ + static int listen_fd = -1; + + typedef struct { +@@ -59,6 +65,7 @@ static int active_clients = 0, highest_client = 0, max_clients = 0; + + #define LOOP_DELAY 2 + #define DEFAULT_PSEUDO_SERVER_TIMEOUT 30 ++#define EPOLL_MAX_EVENTS 10 + int pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT; + static int die_peacefully = 0; + static int die_forcefully = 0; +@@ -80,6 +87,9 @@ quit_now(int signal) { + static int messages = 0, responses = 0; + static struct timeval message_time = { .tv_sec = 0 }; + ++#ifdef PSEUDO_PORT_LINUX ++static void pseudo_server_loop_epoll(void); ++#endif + static void pseudo_server_loop(void); + + /* helper function to make a directory, just like mkdir -p. +@@ -369,12 +379,16 @@ pseudo_server_start(int daemonize) { + kill(ppid, SIGUSR1); + } + } ++#ifdef PSEUDO_PORT_LINUX ++ pseudo_server_loop_epoll(); ++#else + pseudo_server_loop(); ++#endif + return 0; + } + + /* mess with internal tables as needed */ +-static void ++static unsigned int + open_client(int fd) { + pseudo_client_t *new_clients; + int i; +@@ -390,7 +404,7 @@ open_client(int fd) { + ++active_clients; + if (i > highest_client) + highest_client = i; +- return; ++ return i; + } + } + +@@ -414,9 +428,11 @@ open_client(int fd) { + + max_clients += 16; + ++active_clients; ++ return max_clients - 16; + } else { + pseudo_diag("error allocating new client, fd %d\n", fd); + close(fd); ++ return 0; + } + } + +@@ -433,6 +449,10 @@ close_client(int client) { + client, highest_client); + return; + } ++ if (clients[client].fd == -1) { ++ pseudo_debug(PDBGF_SERVER, "client %d already closed\n", client); ++ return; ++ } + close(clients[client].fd); + clients[client].fd = -1; + free(clients[client].tag); +@@ -566,6 +586,171 @@ serve_client(int i) { + } + } + ++#ifdef PSEUDO_PORT_LINUX ++static void pseudo_server_loop_epoll(void) ++{ ++ struct sockaddr_un client; ++ socklen_t len; ++ int i; ++ int rc; ++ int fd; ++ int timeout; ++ struct epoll_event ev, events[EPOLL_MAX_EVENTS]; ++ int loop_timeout = pseudo_server_timeout; ++ ++ clients = malloc(16 * sizeof(*clients)); ++ ++ clients[0].fd = listen_fd; ++ clients[0].pid = getpid(); ++ ++ for (i = 1; i < 16; ++i) { ++ clients[i].fd = -1; ++ clients[i].pid = 0; ++ clients[i].tag = NULL; ++ clients[i].program = NULL; ++ } ++ ++ active_clients = 1; ++ max_clients = 16; ++ highest_client = 0; ++ ++ pseudo_debug(PDBGF_SERVER, "server loop started.\n"); ++ if (listen_fd < 0) { ++ pseudo_diag("got into loop with no valid listen fd.\n"); ++ exit(PSEUDO_EXIT_LISTEN_FD); ++ } ++ ++ timeout = LOOP_DELAY * 1000; ++ ++ int epollfd = epoll_create1(0); ++ if (epollfd == -1) { ++ pseudo_diag("epoll_create1() failed.\n"); ++ exit(PSEUDO_EXIT_EPOLL_CREATE); ++ } ++ ev.events = EPOLLIN; ++ ev.data.u64 = 0; ++ if (epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[0].fd, &ev) == -1) { ++ pseudo_diag("epoll_ctl() failed with listening socket.\n"); ++ exit(PSEUDO_EXIT_EPOLL_CTL); ++ } ++ ++ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server started (pid %d)", getpid()); ++ ++ for (;;) { ++ rc = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, timeout); ++ if (rc == 0 || (rc == -1 && errno == EINTR)) { ++ /* If there's no clients, start timing out. If there ++ * are active clients, never time out. ++ */ ++ if (active_clients == 1) { ++ loop_timeout -= LOOP_DELAY; ++ /* maybe flush database to disk */ ++ pdb_maybe_backup(); ++ if (loop_timeout <= 0) { ++ pseudo_debug(PDBGF_SERVER, "no more clients, got bored.\n"); ++ die_peacefully = 1; ++ } else { ++ /* display this if not exiting */ ++ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "%d messages handled in %.4f seconds, %d responses\n", ++ messages, ++ (double) message_time.tv_sec + ++ (double) message_time.tv_usec / 1000000.0, ++ responses); ++ } ++ } ++ } else if (rc > 0) { ++ loop_timeout = pseudo_server_timeout; ++ for (i = 0; i < rc; ++i) { ++ if (clients[events[i].data.u64].fd == listen_fd) { ++ if (!die_forcefully) { ++ len = sizeof(client); ++ if ((fd = accept(listen_fd, (struct sockaddr *) &client, &len)) != -1) { ++ /* Don't allow clients to end up on fd 2, because glibc's ++ * malloc debug uses that fd unconditionally. ++ */ ++ if (fd == 2) { ++ int newfd = fcntl(fd, F_DUPFD, 3); ++ close(fd); ++ fd = newfd; ++ } ++ pseudo_debug(PDBGF_SERVER, "new client fd %d\n", fd); ++ /* A new client implicitly cancels any ++ * previous shutdown request, or a ++ * shutdown for lack of clients. ++ */ ++ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT; ++ die_peacefully = 0; ++ ++ ev.events = EPOLLIN; ++ ev.data.u64 = open_client(fd); ++ if (ev.data.u64 != 0 && epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[ev.data.u64].fd, &ev) == -1) { ++ pseudo_diag("epoll_ctl() failed with accepted socket.\n"); ++ exit(PSEUDO_EXIT_EPOLL_CTL); ++ } ++ } else if (errno == EMFILE) { ++ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n"); ++ /* In theory there is a potential race here where if we close a client, ++ it may have sent us a fastop message which we don't act upon. ++ If we don't close a filehandle we'll loop indefinitely thought. ++ Only close one per loop iteration in the interests of caution */ ++ for (int j = 1; j <= highest_client; ++j) { ++ if (clients[j].fd != -1) { ++ close_client(j); ++ break; ++ } ++ } ++ } ++ } ++ } else { ++ struct timeval tv1, tv2; ++ int rc; ++ gettimeofday(&tv1, NULL); ++ rc = serve_client(events[i].data.u64); ++ gettimeofday(&tv2, NULL); ++ ++messages; ++ if (rc == 0) ++ ++responses; ++ message_time.tv_sec += (tv2.tv_sec - tv1.tv_sec); ++ message_time.tv_usec += (tv2.tv_usec - tv1.tv_usec); ++ if (message_time.tv_usec < 0) { ++ message_time.tv_usec += 1000000; ++ --message_time.tv_sec; ++ } else while (message_time.tv_usec > 1000000) { ++ message_time.tv_usec -= 1000000; ++ ++message_time.tv_sec; ++ } ++ } ++ if (die_forcefully) ++ break; ++ } ++ pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients); ++ } else { ++ pseudo_diag("epoll_wait failed: %s\n", strerror(errno)); ++ break; ++ } ++ if (die_peacefully || die_forcefully) { ++ pseudo_debug(PDBGF_SERVER, "quitting.\n"); ++ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "server %d exiting: handled %d messages in %.4f seconds\n", ++ getpid(), messages, ++ (double) message_time.tv_sec + ++ (double) message_time.tv_usec / 1000000.0); ++ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server %d exiting: handled %d messages in %.4f seconds", ++ getpid(), messages, ++ (double) message_time.tv_sec + ++ (double) message_time.tv_usec / 1000000.0); ++ /* and at this point, we'll start refusing connections */ ++ close(clients[0].fd); ++ /* This is a good place to insert a delay for ++ * debugging race conditions during startup. */ ++ /* usleep(300000); */ ++ exit(0); ++ } ++ } ++ ++} ++ ++#endif ++ + /* get clients, handle messages, shut down. + * This doesn't actually do any work, it just calls a ton of things which + * do work. +-- +2.14.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch new file mode 100644 index 000000000..904c2d04e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch @@ -0,0 +1,76 @@ +Ensure FASTOP messages get an ACK reply so that the client can be sure the server +recieved them. This means if connections are terminated, data isn't lost. + +RP 2017/9/22 + +Upstream-Status: Submitted + +Index: pseudo-1.8.2/pseudo_client.c +=================================================================== +--- pseudo-1.8.2.orig/pseudo_client.c ++++ pseudo-1.8.2/pseudo_client.c +@@ -1331,21 +1331,19 @@ pseudo_client_request(pseudo_msg_t *msg, + * indicating a successful send. + */ + pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "sent!\n"); +- if (msg->type != PSEUDO_MSG_FASTOP) { +- response = pseudo_msg_receive(connect_fd); +- if (!response) { +- pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n"); ++ response = pseudo_msg_receive(connect_fd); ++ if (!response) { ++ pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n"); ++ } else { ++ if (response->type != PSEUDO_MSG_ACK) { ++ pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type); ++ return 0; ++ } else if (msg->type != PSEUDO_MSG_FASTOP) { ++ pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type); ++ return response; + } else { +- if (response->type != PSEUDO_MSG_ACK) { +- pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type); +- return 0; +- } else { +- pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type); +- return response; +- } ++ return 0; + } +- } else { +- return 0; + } + } + pseudo_diag("pseudo: server connection persistently failed, aborting.\n"); +Index: pseudo-1.8.2/pseudo_server.c +=================================================================== +--- pseudo-1.8.2.orig/pseudo_server.c ++++ pseudo-1.8.2/pseudo_server.c +@@ -463,6 +463,11 @@ close_client(int client) { + --highest_client; + } + ++static pseudo_msg_t server_fastop_reply = { ++ .type = PSEUDO_MSG_ACK, ++ .op = OP_NONE, ++}; ++ + /* Actually process a request. + */ + static int +@@ -515,8 +520,14 @@ serve_client(int i) { + * pseudo_server_response. + */ + if (in->type != PSEUDO_MSG_SHUTDOWN) { +- if (in->type == PSEUDO_MSG_FASTOP) ++ if (in->type == PSEUDO_MSG_FASTOP) { + send_response = 0; ++ /* For fastops we reply now to say we got the data */ ++ if ((rc = pseudo_msg_send(clients[i].fd, &server_fastop_reply, 0, NULL)) != 0) { ++ pseudo_debug(PDBGF_SERVER, "failed to send fastop ack to client %d [%d]: %d (%s)\n", ++ i, (int) clients[i].pid, rc, strerror(errno)); ++ } ++ } + /* most messages don't need these, but xattr may */ + response_path = 0; + response_pathlen = -1; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch new file mode 100644 index 000000000..b085a4505 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch @@ -0,0 +1,59 @@ +Currently if we max out the maximum number of files, pseudo can deadlock, unable to +accept new connections yet unable to move forward and unblock the other processes +waiting either. + +Rather than hang, when this happens, close out inactive connections, allowing us +to accept the new ones. The disconnected clients will simply reconnect. There is +a small risk of data loss here sadly but its better than hanging. + +RP +2017/4/25 + +Upstream-Status: Submitted [Peter is aware of the issue] + +Index: pseudo-1.8.2/pseudo_server.c +=================================================================== +--- pseudo-1.8.2.orig/pseudo_server.c ++++ pseudo-1.8.2/pseudo_server.c +@@ -581,6 +581,7 @@ pseudo_server_loop(void) { + int rc; + int fd; + int loop_timeout = pseudo_server_timeout; ++ int hitmaxfiles; + + clients = malloc(16 * sizeof(*clients)); + +@@ -597,6 +598,7 @@ pseudo_server_loop(void) { + active_clients = 1; + max_clients = 16; + highest_client = 0; ++ hitmaxfiles = 0; + + pseudo_debug(PDBGF_SERVER, "server loop started.\n"); + if (listen_fd < 0) { +@@ -663,10 +665,15 @@ pseudo_server_loop(void) { + message_time.tv_usec -= 1000000; + ++message_time.tv_sec; + } ++ } else if (hitmaxfiles) { ++ /* Only close one per loop iteration in the interests of caution */ ++ close_client(i); ++ hitmaxfiles = 0; + } + if (die_forcefully) + break; + } ++ hitmaxfiles = 0; + if (!die_forcefully && + (FD_ISSET(clients[0].fd, &events) || + FD_ISSET(clients[0].fd, &reads))) { +@@ -688,6 +698,9 @@ pseudo_server_loop(void) { + */ + pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT; + die_peacefully = 0; ++ } else if (errno == EMFILE) { ++ hitmaxfiles = 1; ++ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n"); + } + } + pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients); diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb index b427b9ac3..73ef57231 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb @@ -7,6 +7,9 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz file://moreretries.patch \ file://efe0be279901006f939cd357ccee47b651c786da.patch \ file://b6b68db896f9963558334aff7fca61adde4ec10f.patch \ + file://fastopreply.patch \ + file://toomanyfiles.patch \ + file://0001-Use-epoll-API-on-Linux.patch \ " SRC_URI[md5sum] = "7d41e72188fbea1f696c399c1a435675" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch new file mode 100644 index 000000000..b9e585610 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch @@ -0,0 +1,45 @@ +From 4170b98e0d5864ef4db1c5704a6e9428c3be9fb8 Mon Sep 17 00:00:00 2001 +From: Iryna Shcherbina +Date: Thu, 24 Aug 2017 18:01:43 +0200 +Subject: [PATCH] BUG: fix infinite loop when creating np.pad on an empty array + +Upstream-Status: Backport [https://github.com/numpy/numpy/pull/9599/commits/6f9ea0abbd305d53f9017debab3a3a591fe0e249] +CVE: CVE-2017-12852 +Signed-off-by: Dengke Du +--- + numpy/lib/arraypad.py | 3 +++ + numpy/lib/tests/test_arraypad.py | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py +index 2dad99c..294a689 100644 +--- a/numpy/lib/arraypad.py ++++ b/numpy/lib/arraypad.py +@@ -1406,6 +1406,9 @@ def pad(array, pad_width, mode, **kwargs): + newmat = _append_min(newmat, pad_after, chunk_after, axis) + + elif mode == 'reflect': ++ if narray.size == 0: ++ raise ValueError("There aren't any elements to reflect in `array`") ++ + for axis, (pad_before, pad_after) in enumerate(pad_width): + # Recursive padding along any axis where `pad_amt` is too large + # for indexing tricks. We can only safely pad the original axis +diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py +index 056aa45..0f71d32 100644 +--- a/numpy/lib/tests/test_arraypad.py ++++ b/numpy/lib/tests/test_arraypad.py +@@ -1014,6 +1014,10 @@ class ValueError1(TestCase): + assert_raises(ValueError, pad, arr, ((-2, 3), (3, 2)), + **kwargs) + ++ def test_check_empty_array(self): ++ assert_raises(ValueError, pad, [], 4, mode='reflect') ++ assert_raises(ValueError, pad, np.ndarray(0), 4, mode='reflect') ++ + + class ValueError2(TestCase): + def test_check_negative_pad_amount(self): +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch index 5b134edf0..ffd6ced13 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch @@ -11,11 +11,11 @@ Signed-off-by: Alexander Kanavin numpy/distutils/system_info.py | 50 +++++------------------------------------- 1 file changed, 6 insertions(+), 44 deletions(-) -diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py -index 9dd48e2..80e197a 100644 ---- a/numpy/distutils/system_info.py -+++ b/numpy/distutils/system_info.py -@@ -204,51 +204,13 @@ if sys.platform == 'win32': +Index: numpy-1.13.1/numpy/distutils/system_info.py +=================================================================== +--- numpy-1.13.1.orig/numpy/distutils/system_info.py ++++ numpy-1.13.1/numpy/distutils/system_info.py +@@ -211,51 +211,13 @@ if sys.platform == 'win32': default_x11_lib_dirs = [] default_x11_include_dirs = [] else: @@ -29,7 +29,10 @@ index 9dd48e2..80e197a 100644 - '/opt/local/include', '/sw/include', - '/usr/include/suitesparse'] - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] -- ++ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) ++ default_include_dirs = ['/deaddir/include'] ++ default_src_dirs = ['.', '/deaddir/src'] + - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', - '/usr/lib'], platform_bits) - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include', @@ -50,7 +53,7 @@ index 9dd48e2..80e197a 100644 - # tests are run in debug mode Python 3. - tmp = open(os.devnull, 'w') - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, -- stderr=tmp) +- stderr=tmp) - except (OSError, DistutilsError): - # OSError if gcc is not installed, or SandboxViolation (DistutilsError - # subclass) if an old setuptools bug is triggered (see gh-3160). @@ -64,15 +67,8 @@ index 9dd48e2..80e197a 100644 - finally: - if tmp is not None: - tmp.close() -+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) -+ default_include_dirs = ['/deaddir/include'] -+ default_src_dirs = ['.', '/deaddir/src'] -+ + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) + default_x11_include_dirs = ['/deaddir/include'] if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) --- -2.6.2 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch deleted file mode 100644 index 08cb078fa..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 154b2c19f392817a936aea0190e276f8228cb489 Mon Sep 17 00:00:00 2001 -From: "Erik M. Bray" -Date: Mon, 12 Dec 2016 13:07:16 +0100 -Subject: [PATCH] BUG: xlocale.h is not available in newlib--all the defines - used here from xlocale.h are instead found in locale.h - -Added a feature check for xlocale.h, with fallback to locale.h if it is -missing. ---- - numpy/core/setup_common.py | 1 + - numpy/core/src/multiarray/numpyos.c | 8 +++++++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -Upstream-Status: Backport -RP 2017/9/6 - -diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py -index ba7521e3043..a1729e65656 100644 ---- a/numpy/core/setup_common.py -+++ b/numpy/core/setup_common.py -@@ -113,6 +113,7 @@ def check_api_version(apiversion, codegen_dir): - "xmmintrin.h", # SSE - "emmintrin.h", # SSE2 - "features.h", # for glibc version linux -+ "xlocale.h" # see GH#8367 - ] - - # optional gcc compiler builtins and their call arguments and optional a -diff --git a/numpy/core/src/multiarray/numpyos.c b/numpy/core/src/multiarray/numpyos.c -index 450ec40b6e0..84617ea78c3 100644 ---- a/numpy/core/src/multiarray/numpyos.c -+++ b/numpy/core/src/multiarray/numpyos.c -@@ -15,7 +15,13 @@ - - #ifdef HAVE_STRTOLD_L - #include --#include -+#ifdef HAVE_XLOCALE_H -+ /* -+ * the defines from xlocale.h are included in locale.h on some sytems; -+ * see gh-8367 -+ */ -+ #include -+#endif - #endif - - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb deleted file mode 100644 index 04c96d7b5..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb +++ /dev/null @@ -1,113 +0,0 @@ -SUMMARY = "A sophisticated Numeric Processing Package for Python" -SECTION = "devel/python" -LICENSE = "PSF" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0" - -SRCNAME = "numpy" - -SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ - file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ - file://remove-build-path-in-comments.patch \ - file://fix_shebang_f2py.patch \ - file://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \ - ${CONFIGFILESURI} " -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/" - -CONFIGFILESURI ?= "" - -CONFIGFILESURI_aarch64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_arm = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_armeb = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32el = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86 = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86-64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64el = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32el = " \ - file://config.h \ - file://_numpyconfig.h \ -" - -S = "${WORKDIR}/numpy-${PV}" - -inherit setuptools - -# Make the build fail and replace *config.h with proper one -# This is a ugly, ugly hack - Koen -do_compile_prepend_class-target() { - ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ - true - cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ -} - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" - -SRC_URI[md5sum] = "03bd7927c314c43780271bf1ab795ebc" -SRC_URI[sha256sum] = "04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69" - -# install what is needed for numpy.test() -RDEPENDS_${PN} = "python-unittest \ - python-difflib \ - python-pprint \ - python-pickle \ - python-shell \ - python-nose \ - python-doctest \ - python-datetime \ - python-distutils \ - python-misc \ - python-mmap \ - python-netclient \ - python-numbers \ - python-pydoc \ - python-pkgutil \ - python-email \ - python-subprocess \ - python-compression \ - python-ctypes \ - python-threading \ -" - -RDEPENDS_${PN}_class-native = "" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb new file mode 100644 index 000000000..13e8f4fa2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb @@ -0,0 +1,114 @@ +SUMMARY = "A sophisticated Numeric Processing Package for Python" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96" + +SRCNAME = "numpy" + +SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ + file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ + file://remove-build-path-in-comments.patch \ + file://fix_shebang_f2py.patch \ + file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \ + ${CONFIGFILESURI} " + +SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92" +SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93" + +UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" + +CONFIGFILESURI ?= "" + +CONFIGFILESURI_aarch64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_arm = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_armeb = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_mipsarcho32el = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_x86 = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_x86-64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarcho32eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_powerpc = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_powerpc64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn64eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn64el = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn32eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn32el = " \ + file://config.h \ + file://_numpyconfig.h \ +" + +S = "${WORKDIR}/numpy-${PV}" + +inherit setuptools + +# Make the build fail and replace *config.h with proper one +# This is a ugly, ugly hack - Koen +do_compile_prepend_class-target() { + ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ + true + cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ +} + +FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" + +# install what is needed for numpy.test() +RDEPENDS_${PN} = "python-unittest \ + python-difflib \ + python-pprint \ + python-pickle \ + python-shell \ + python-nose \ + python-doctest \ + python-datetime \ + python-distutils \ + python-misc \ + python-mmap \ + python-netclient \ + python-numbers \ + python-pydoc \ + python-pkgutil \ + python-email \ + python-subprocess \ + python-compression \ + python-ctypes \ + python-threading \ +" + +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb deleted file mode 100644 index 8f9665f92..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb +++ /dev/null @@ -1,114 +0,0 @@ -SUMMARY = "A sophisticated Numeric Processing Package for Python" -SECTION = "devel/python" -LICENSE = "PSF" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0" - -SRCNAME = "numpy" - -SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ - file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ - file://remove-build-path-in-comments.patch \ - file://fix_shebang_f2py.patch \ - file://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \ - ${CONFIGFILESURI} " -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/" - -CONFIGFILESURI ?= "" - -CONFIGFILESURI_aarch64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_arm = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_armeb = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32el = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86 = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86-64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64el = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32el = " \ - file://config.h \ - file://_numpyconfig.h \ -" - -S = "${WORKDIR}/numpy-${PV}" - -inherit setuptools3 - -# Make the build fail and replace *config.h with proper one -# This is a ugly, ugly hack - Koen -do_compile_prepend_class-target() { - ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \ - true - cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ -} - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" - -SRC_URI[md5sum] = "03bd7927c314c43780271bf1ab795ebc" -SRC_URI[sha256sum] = "04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69" - -# install what is needed for numpy.test() -RDEPENDS_${PN} = "python3-unittest \ - python3-difflib \ - python3-pprint \ - python3-pickle \ - python3-shell \ - python3-nose \ - python3-doctest \ - python3-datetime \ - python3-distutils \ - python3-misc \ - python3-mmap \ - python3-netclient \ - python3-numbers \ - python3-pydoc \ - python3-pkgutil \ - python3-email \ - python3-subprocess \ - python3-compression \ - python3-ctypes \ - python3-threading \ - python3-textutils \ -" - -RDEPENDS_${PN}_class-native = "" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb new file mode 100644 index 000000000..29874b884 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb @@ -0,0 +1,114 @@ +SUMMARY = "A sophisticated Numeric Processing Package for Python" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96" + +SRCNAME = "numpy" + +SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ + file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ + file://remove-build-path-in-comments.patch \ + file://fix_shebang_f2py.patch \ + file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \ + ${CONFIGFILESURI} " +SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92" +SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93" + +UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" + +CONFIGFILESURI ?= "" + +CONFIGFILESURI_aarch64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_arm = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_armeb = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_mipsarcho32el = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_x86 = " \ + file://config.h \ + file://numpyconfig.h \ +" +CONFIGFILESURI_x86-64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarcho32eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_powerpc = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_powerpc64 = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn64eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn64el = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn32eb = " \ + file://config.h \ + file://_numpyconfig.h \ +" +CONFIGFILESURI_mipsarchn32el = " \ + file://config.h \ + file://_numpyconfig.h \ +" + +S = "${WORKDIR}/numpy-${PV}" + +inherit setuptools3 + +# Make the build fail and replace *config.h with proper one +# This is a ugly, ugly hack - Koen +do_compile_prepend_class-target() { + ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \ + true + cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ +} + +FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" + +# install what is needed for numpy.test() +RDEPENDS_${PN} = "python3-unittest \ + python3-difflib \ + python3-pprint \ + python3-pickle \ + python3-shell \ + python3-nose \ + python3-doctest \ + python3-datetime \ + python3-distutils \ + python3-misc \ + python3-mmap \ + python3-netclient \ + python3-numbers \ + python3-pydoc \ + python3-pkgutil \ + python3-email \ + python3-subprocess \ + python3-compression \ + python3-ctypes \ + python3-threading \ + python3-textutils \ +" + +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc index 7ed254bbd..57d4834b3 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc @@ -281,7 +281,7 @@ RDEPENDS_${PN}-zlib="${PN}-core" FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so " SUMMARY_${PN}-modules="All Python modules" -RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib " +RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib " ALLOW_EMPTY_${PN}-modules = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc index 1e20f00c6..0260e87e7 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc @@ -1,6 +1,6 @@ # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. -# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer +# Generator: 'scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer @@ -34,7 +34,7 @@ FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pyca SUMMARY_${PN}-compression="Python high-level compression support" RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell" -FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so " +FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so ${libdir}/python3.5/bz2.py ${libdir}/python3.5/__pycache__/bz2.py ${libdir}/python3.5/lzma.py ${libdir}/python3.5/__pycache__/lzma.py ${libdir}/python3.5/_compression.py ${libdir}/python3.5/__pycache__/_compression.py " SUMMARY_${PN}-core="Python interpreter and core modules" RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math" @@ -66,7 +66,7 @@ FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/ SUMMARY_${PN}-dev="Python development package" RDEPENDS_${PN}-dev="${PN}-core" -FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python3.5/config/Makefile ${libdir}/python3.5/config/Makefile/__pycache__ " +FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python3.5/config*/Makefile ${libdir}/python3.5/config*/Makefile/__pycache__ " SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects" RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" @@ -241,7 +241,7 @@ RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* " SUMMARY_${PN}-tests="Python tests" -RDEPENDS_${PN}-tests="${PN}-core" +RDEPENDS_${PN}-tests="${PN}-core ${PN}-compression" FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ " SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support" @@ -277,7 +277,7 @@ RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pyd FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ " SUMMARY_${PN}-modules="All Python modules" -RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " +RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " ALLOW_EMPTY_${PN}-modules = "1" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb deleted file mode 100644 index d855e42a7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb +++ /dev/null @@ -1,5 +0,0 @@ -require python-async.inc - -inherit setuptools - -RDEPENDS_${PN} += "python-threading python-lang" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc index feddf275b..777608c1b 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183" SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz" -SRC_URI[md5sum] = "77f8339e68dedb6d7c4e26371a588ed9" -SRC_URI[sha256sum] = "e96f8e953cf9fee0a7599fc587667591328760b6341a0081ef311a942fc96204" +SRC_URI[md5sum] = "df94212b19d270a625b67b4c84ac9a41" +SRC_URI[sha256sum] = "5c00cbd256e2b1d039381d4f7d71fcb7ee5cc196ca10c101ff7191bd82ab5d9c" UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/" UPSTREAM_CHECK_REGEX = "/GitPython/(?P(\d+[\.\-_]*)+)" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb deleted file mode 100644 index e49dbea54..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb +++ /dev/null @@ -1,7 +0,0 @@ -require python-git.inc - -DEPENDS = "python-gitdb" - -inherit setuptools - -RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb deleted file mode 100644 index 177739579..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb +++ /dev/null @@ -1,7 +0,0 @@ -require python-gitdb.inc - -DEPENDS = "python-async python-smmap" - -inherit distutils - -RDEPENDS_${PN} += "python-smmap python-async python-mmap python-lang python-zlib python-io python-shell" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc index 10364db97..1c83af6a2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc @@ -1,12 +1,13 @@ SUMMARY = "Templating library for Python" +HOMEPAGE = "http://www.makotemplates.org/" SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863" SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz" -SRC_URI[md5sum] = "a28e22a339080316b2acc352b9ee631c" -SRC_URI[sha256sum] = "48559ebd872a8e77f92005884b3d88ffae552812cdf17db6768e5c3be5ebbe0d" +SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65" +SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae" UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/" UPSTREAM_CHECK_REGEX = "/Mako/(?P(\d+[\.\-_]*)+)" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb deleted file mode 100644 index 230044e1a..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb +++ /dev/null @@ -1,17 +0,0 @@ -require python-mako.inc - -inherit setuptools - -RDEPENDS_${PN} = "python-threading \ - python-netclient \ - python-html \ -" -RDEPENDS_${PN}_class-native = "" - -BBCLASSEXTEND = "native nativesdk" - -# The same utility is packaged in python3-mako, so it would conflict -do_install_append() { - rm -f ${D}${bindir}/mako-render - rmdir ${D}${bindir} -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc index 581a37ab1..b05aae0f1 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc @@ -1,10 +1,9 @@ # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. -# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer +# Generator: '../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer -RPROVIDES+="python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native " - +RPROVIDES += "python-modules-native python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc index 10be3e9bb..f1f732eb8 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc @@ -1,10 +1,10 @@ # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. -# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer +# Generator: '../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer -RPROVIDES+="python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native " +RPROVIDES += "python3-modules-native python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb index 3757f3a8b..9b3509caf 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb @@ -1,4 +1,5 @@ SUMMARY = "Extends Python unittest to make testing easier" +HOMEPAGE = "http://readthedocs.org/docs/nose/" DESCRIPTION = "nose extends the test loading and running features of unittest, \ making it easier to write, find and run tests." SECTION = "devel/python" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb deleted file mode 100644 index 1321797ef..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "A Pure Python Expect like Module for Python" -HOMEPAGE = "http://pexpect.readthedocs.org/" -SECTION = "devel/python" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b" - -SRCNAME = "pexpect" - -SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "3694410001a99dff83f0b500a1ca1c95" -SRC_URI[sha256sum] = "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92" - -UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect" - -S = "${WORKDIR}/pexpect-${PV}" - -inherit setuptools - -RDEPENDS_${PN} = "\ - python-core \ - python-io \ - python-terminal \ - python-resource \ - python-fcntl \ - python-ptyprocess \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb deleted file mode 100644 index eed24ad2e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Run a subprocess in a pseudo terminal" -HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/" -SECTION = "devel/python" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490" - -SRCNAME = "ptyprocess" - -SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1" -SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6" - -UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit setuptools - -RDEPENDS_${PN} = "\ - python-core \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc deleted file mode 100644 index d26318b6d..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Python bindings for libcurl" -HOMEPAGE = "http://pycurl.sourceforge.net/" -SECTION = "devel/python" -LICENSE = "LGPLv2.1+ | MIT" -LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=182;md5=a84a1caa65b89d4584b693d3680062fb \ - file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \ - file://COPYING-MIT;md5=b7e434aeb228ed731c00bcf177e79b19" - -DEPENDS = "curl ${PYTHON_PN}" -RDEPENDS_${PN} = "${PYTHON_PN}-core curl" -SRCNAME = "pycurl" - -SRC_URI = "\ - http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \ - file://no-static-link.patch \ -" - -SRC_URI[archive.md5sum] = "bca7bf47320082588db544ced2ba8717" -SRC_URI[archive.sha256sum] = "8a1e0eb55573388275a1d6c2534ca4cfca5d7fa772b99b505c08fa149b27aed0" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -BBCLASSEXTEND = "native" - -# Ensure the docstrings are generated as make clean will remove them -do_compile_prepend() { - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings -} - -do_install_append() { - rm -rf ${D}${datadir}/share -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch deleted file mode 100644 index 212779ca3..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Laurentiu Palcu -Signed-off-by: Maxin B. John ---- -diff -Naur pycurl-7.19.5.2-orig/setup.py pycurl-7.19.5.2/setup.py ---- pycurl-7.19.5.2-orig/setup.py 2015-11-02 15:42:24.000000000 +0200 -+++ pycurl-7.19.5.2/setup.py 2015-11-02 17:59:36.121527273 +0200 -@@ -154,7 +154,7 @@ - optbuf = '' - sslhintbuf = '' - errtext = '' -- for option in ["--libs", "--static-libs"]: -+ for option in ["--libs"]: - p = subprocess.Popen((CURL_CONFIG, option), - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb deleted file mode 100644 index eb70cea66..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb +++ /dev/null @@ -1,3 +0,0 @@ -require python-pycurl.inc - -inherit distutils diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc index 40f47d4bc..ca521a965 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc @@ -3,14 +3,14 @@ HOMEPAGE = "https://pypi.python.org/pypi/setuptools" SECTION = "devel/python" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://setup.py;beginline=146;endline=146;md5=3e8df024d6c1442d18e84acf8fbbc475" +LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158" SRCNAME = "setuptools" -SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" +SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip" -SRC_URI[md5sum] = "8b67868c3430e978833ebd0d1b766694" -SRC_URI[sha256sum] = "8303fb24306385f09bf8b0e5a385c1548e42e8efc08558d64049bc0d55ea012d" +SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac" +SRC_URI[sha256sum] = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5" UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb deleted file mode 100644 index 526474c7e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb +++ /dev/null @@ -1,38 +0,0 @@ -require python-setuptools.inc - -PROVIDES = "python-distribute" - -DEPENDS += "python" -DEPENDS_class-native += "python-native" - -inherit distutils - -DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" - -RDEPENDS_${PN} = "\ - python-stringold \ - python-email \ - python-shell \ - python-distutils \ - python-compression \ - python-pkgutil \ - python-plistlib \ - python-numbers \ - python-html \ - python-netserver \ - python-ctypes \ - python-subprocess \ - python-unittest \ - python-compile \ -" - -RDEPENDS_${PN}_class-native = "\ - python-distutils \ - python-compression \ -" - -RREPLACES_${PN} = "python-distribute" -RPROVIDES_${PN} = "python-distribute" -RCONFLICTS_${PN} = "python-distribute" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb new file mode 100644 index 000000000..0efacc137 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb @@ -0,0 +1,36 @@ +require python-setuptools.inc + +PROVIDES = "python-distribute" + +DEPENDS += "python" +DEPENDS_class-native += "python-native" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-stringold \ + python-email \ + python-shell \ + python-distutils \ + python-compression \ + python-pkgutil \ + python-plistlib \ + python-numbers \ + python-html \ + python-netserver \ + python-ctypes \ + python-subprocess \ + python-unittest \ + python-compile \ +" + +RDEPENDS_${PN}_class-native = "\ + python-distutils \ + python-compression \ +" + +RREPLACES_${PN} = "python-distribute" +RPROVIDES_${PN} = "python-distribute" +RCONFLICTS_${PN} = "python-distribute" + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb deleted file mode 100644 index 4350485f7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -inherit setuptools -require python-six.inc - -RDEPENDS_${PN} += "python-io" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb deleted file mode 100644 index c118dd8d6..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb +++ /dev/null @@ -1,5 +0,0 @@ -require python-smmap.inc - -inherit setuptools - -RDEPENDS_${PN} += "python-codecs python-mmap python-lang" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch index 50cc5911a..f5568d2d2 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch @@ -1,6 +1,6 @@ Rebased for python-2.7.9 Signed-off-by: Alejandro Hernandez - +Upstream-Status: Pending Index: Python-2.7.13/configure.ac =================================================================== --- Python-2.7.13.orig/configure.ac diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch new file mode 100644 index 000000000..44fcaacf3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch @@ -0,0 +1,82 @@ +From 71447f04979b267f8866573b67a4340b2719d799 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 4 Aug 2017 14:10:43 +0800 +Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module + +In the following commit: +... +commit e711cafab13efc9c1fe6c5cd75826401445eb585 +Author: Benjamin Peterson +Date: Wed Jun 11 16:44:04 2008 +0000 + + Merged revisions 64104,64117 via svnmerge from + svn+ssh://pythondev@svn.python.org/python/trunk +... +(see diff in setup.py) +It assigned libraries for multiprocessing module according +the host_platform, but not pass it to Extension. + +In glibc, the following commit caused two definition of +sem_getvalue are different. +https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524 +(see diff in nptl/sem_getvalue.c for detail) +`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1 +and `__old_sem_getvalue' is to compat the old version +sem_getvalue@GLIBC_2.0. + +To build python for embedded Linux systems: +http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html +If not explicitly link to library pthread (-lpthread), it will +load glibc's sem_getvalue randomly at runtime. + +Such as build python on linux x86_64 host and run the python +on linux x86_32 target. If not link library pthread, it caused +multiprocessing bounded semaphore could not work correctly. +... +>>> import multiprocessing +>>> pool_sema = multiprocessing.BoundedSemaphore(value=1) +>>> pool_sema.acquire() +True +>>> pool_sema.release() +Traceback (most recent call last): + File "", line 1, in +ValueError: semaphore or lock released too many times +... + +And the semaphore issue also caused multiprocessing.Queue().put() hung. + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999] + +Signed-off-by: Hongxu Jia +--- + setup.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 54054c2..9646bfc 100644 +--- a/setup.py ++++ b/setup.py +@@ -1586,8 +1586,10 @@ class PyBuildExt(build_ext): + elif host_platform.startswith('netbsd'): + macros = dict() + libraries = [] +- +- else: # Linux and other unices ++ elif host_platform.startswith(('linux')): ++ macros = dict() ++ libraries = ['pthread'] ++ else: # Other unices + macros = dict() + libraries = ['rt'] + +@@ -1610,6 +1612,7 @@ class PyBuildExt(build_ext): + if sysconfig.get_config_var('WITH_THREAD'): + exts.append ( Extension('_multiprocessing', multiprocessing_srcs, + define_macros=macros.items(), ++ libraries=libraries, + include_dirs=["Modules/_multiprocessing"])) + else: + missing.append('_multiprocessing') +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch new file mode 100644 index 000000000..12651798e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch @@ -0,0 +1,34 @@ +The compiled .pyc files contain time stamp corresponding to the compile time. +This prevents binary reproducibility. This patch allows to achieve binary +reproducibility by overriding the build time stamp by the value +exported via SOURCE_DATE_EPOCH. + +Patch by Bernhard M. Wiedemann + +Upstream-Status: Backport + +Signed-off-by: Juro Bystricky + +Fri Feb 24 17:08:25 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to allow reproducible builds of various + python packages like python-amqp + Upstream: https://github.com/python/cpython/pull/296 + + +@@ -0,0 +1,15 @@ +Index: Python-2.7.13/Lib/py_compile.py +=================================================================== +--- Python-2.7.13.orig/Lib/py_compile.py ++++ Python-2.7.13/Lib/py_compile.py +@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None + timestamp = long(os.fstat(f.fileno()).st_mtime) + except AttributeError: + timestamp = long(os.stat(file).st_mtime) ++ sde = os.environ.get('SOURCE_DATE_EPOCH') ++ if sde and timestamp > int(sde): ++ timestamp = int(sde) ++ os.utime(file, (timestamp, timestamp)) + codestring = f.read() + try: + codeobject = __builtin__.compile(codestring, dfile or file,'exec') diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch index 2c657861c..fb4a3bcf9 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch @@ -2,6 +2,7 @@ Python tries to use ncursesw from the host, if it is not found causes an error on configure, we should use ncursesw from sysroot instead +Upstream-Status: Pending Signed-off-by: Alejandro Hernandez diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb deleted file mode 100644 index e36388c6f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Text processing system for documentation" -HOMEPAGE = "http://docutils.sourceforge.net" -SECTION = "devel/python" -LICENSE = "PSF & BSD-2-Clause & GPLv3" -LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7a4646907ab9083c826280b19e103106" - -DEPENDS = "python3" - -SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz" -SRC_URI[md5sum] = "ea4a893c633c788be9b8078b6b305d53" -SRC_URI[sha256sum] = "718c0f5fb677be0f34b781e04241c4067cbd9327b66bdd8e763201130f5175be" - -S = "${WORKDIR}/docutils-${PV}" - -inherit distutils3 - -BBCLASSEXTEND = "native" - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb new file mode 100644 index 000000000..81a449d64 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb @@ -0,0 +1,18 @@ +SUMMARY = "Text processing system for documentation" +HOMEPAGE = "http://docutils.sourceforge.net" +SECTION = "devel/python" +LICENSE = "PSF & BSD-2-Clause & GPLv3" +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=35a23d42b615470583563132872c97d6" + +DEPENDS = "python3" + +SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz" +SRC_URI[md5sum] = "c53768d63db3873b7d452833553469de" +SRC_URI[sha256sum] = "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" + +S = "${WORKDIR}/docutils-${PV}" + +inherit distutils3 + +BBCLASSEXTEND = "native" + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb deleted file mode 100644 index 7a2d452a2..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb +++ /dev/null @@ -1,7 +0,0 @@ -require python-git.inc - -DEPENDS = "python3-gitdb" - -inherit setuptools3 - -RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb new file mode 100644 index 000000000..4ac2a0ec7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb @@ -0,0 +1,7 @@ +require python-git.inc + +DEPENDS = "python3-gitdb" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse git" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb deleted file mode 100644 index 2b50ffd08..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb +++ /dev/null @@ -1,11 +0,0 @@ -require python-mako.inc - -inherit setuptools3 - -RDEPENDS_${PN} = "python3-threading \ - python3-netclient \ - python3-html \ -" -RDEPENDS_${PN}_class-native = "" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb new file mode 100644 index 000000000..2b50ffd08 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb @@ -0,0 +1,11 @@ +require python-mako.inc + +inherit setuptools3 + +RDEPENDS_${PN} = "python3-threading \ + python3-netclient \ + python3-html \ +" +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb deleted file mode 100644 index 782e2cda9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb +++ /dev/null @@ -1,83 +0,0 @@ -require recipes-devtools/python/python.inc - -PR = "${INC_PR}.0" -PYTHON_MAJMIN = "3.5" -DISTRO_SRC_URI ?= "file://sitecustomize.py" -DISTRO_SRC_URI_linuxstdbase = "" -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ -file://12-distutils-prefix-is-inside-staging-area.patch \ -file://python-config.patch \ -file://000-cross-compile.patch \ -file://030-fixup-include-dirs.patch \ -file://070-dont-clean-ipkg-install.patch \ -file://080-distutils-dont_adjust_files.patch \ -file://130-readline-setup.patch \ -file://150-fix-setupterm.patch \ -file://python-3.3-multilib.patch \ -file://03-fix-tkinter-detection.patch \ -file://avoid_warning_about_tkinter.patch \ -file://shutil-follow-symlink-fix.patch \ -file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ -file://sysroot-include-headers.patch \ -file://unixccompiler.patch \ -${DISTRO_SRC_URI} \ -file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ -file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ -file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ -" - -SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e" -SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" - -# exclude pre-releases for both python 2.x and 3.x -UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" - -S = "${WORKDIR}/Python-${PV}" - -EXTRANATIVEPATH += "bzip2-native" -DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" - -inherit native - -require python-native-${PYTHON_MAJMIN}-manifest.inc - -# uninative may be used on pre glibc 2.25 systems which don't have getentropy -EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no" - -EXTRA_OEMAKE = '\ - LIBC="" \ - STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ - STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ -' - -# No ctypes option for python 3 -PYTHONLSBOPTS = "" - -do_configure_append() { - autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi - sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h -} - -do_install() { - install -d ${D}${libdir}/pkgconfig - oe_runmake 'DESTDIR=${D}' install - if [ -e ${WORKDIR}/sitecustomize.py ]; then - install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} - fi - install -d ${D}${bindir}/${PN} - install -m 0755 Parser/pgen ${D}${bindir}/${PN} - - # Make sure we use /usr/bin/env python - for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do - sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT - done - - # Tests are large and we don't need them in the native sysroot - rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf -} - -RPROVIDES += "python3-misc-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb new file mode 100644 index 000000000..8cd9c88a8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb @@ -0,0 +1,84 @@ +require recipes-devtools/python/python.inc + +PR = "${INC_PR}.0" +PYTHON_MAJMIN = "3.5" +DISTRO_SRC_URI ?= "file://sitecustomize.py" +DISTRO_SRC_URI_linuxstdbase = "" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ +file://12-distutils-prefix-is-inside-staging-area.patch \ +file://python-config.patch \ +file://0001-cross-compile-support.patch \ +file://030-fixup-include-dirs.patch \ +file://070-dont-clean-ipkg-install.patch \ +file://080-distutils-dont_adjust_files.patch \ +file://130-readline-setup.patch \ +file://150-fix-setupterm.patch \ +file://python-3.3-multilib.patch \ +file://03-fix-tkinter-detection.patch \ +file://avoid_warning_about_tkinter.patch \ +file://shutil-follow-symlink-fix.patch \ +file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ +file://sysroot-include-headers.patch \ +file://unixccompiler.patch \ +${DISTRO_SRC_URI} \ +file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ +file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ +file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ +file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \ +" + +SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" +SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e" + +# exclude pre-releases for both python 2.x and 3.x +UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" + +S = "${WORKDIR}/Python-${PV}" + +EXTRANATIVEPATH += "bzip2-native" +DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" + +inherit native + +require python-native-${PYTHON_MAJMIN}-manifest.inc + +# uninative may be used on pre glibc 2.25 systems which don't have getentropy +EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no" + +EXTRA_OEMAKE = '\ + LIBC="" \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ + STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ +' + +# No ctypes option for python 3 +PYTHONLSBOPTS = "" + +do_configure_append() { + autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi + sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h +} + +do_install() { + install -d ${D}${libdir}/pkgconfig + oe_runmake 'DESTDIR=${D}' install + if [ -e ${WORKDIR}/sitecustomize.py ]; then + install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} + fi + install -d ${D}${bindir}/${PN} + install -m 0755 Parser/pgen ${D}${bindir}/${PN} + + # Make sure we use /usr/bin/env python + for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT + done + + # Tests are large and we don't need them in the native sysroot + rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf +} + +RPROVIDES += "python3-misc-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb index 99bba4403..1e2ff74f5 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb @@ -17,6 +17,10 @@ S = "${WORKDIR}/nose-${PV}" inherit setuptools3 +do_install_append() { + mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3 +} + RDEPENDS_${PN}_class-target = "\ python3-unittest \ " diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb index 4456b9b1b..9b907a263 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb @@ -53,4 +53,4 @@ RDEPENDS_${PN} = "\ python3-xmlrpc \ " -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb index f9031b3bc..9258ba11c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb @@ -19,6 +19,8 @@ S = "${WORKDIR}/pycairo-${PV}" inherit distutils3 pkgconfig +CFLAGS += "-fPIC" + BBCLASSEXTEND = "native" do_configure() { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb deleted file mode 100644 index 5d11192ab..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycurl:" - -require python-pycurl.inc - -inherit distutils3 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch new file mode 100644 index 000000000..aaedb58fe --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch @@ -0,0 +1,33 @@ +From 206360744cedff20eae3c8fcfde9938fdae99592 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Thu, 6 Jul 2017 11:47:21 +0300 +Subject: [PATCH] configure.ac: Don't use gnome-common macros + +remove GNOME_COMPILE_WARNINGS() call: it's from gnome-common which +is deprecated. + +This patch can be removed when upgrading to 3.25.1: at that point +pygobject needs autoconf-archive instead. + +Upstream-Status: Inappropriate [Already handled upstream] +Signed-off-by: Jussi Kukkonen +--- + configure.ac | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1f15b3c..5cb170f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -221,8 +221,6 @@ AC_ARG_WITH(common, + with_common=yes) + AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes") + +-# compiler warnings, errors, required cflags, and code coverage support +-GNOME_COMPILE_WARNINGS([maximum], [-Wno-error=missing-prototypes]) + AC_MSG_CHECKING(for Gnome code coverage support) + m4_ifdef([GNOME_CODE_COVERAGE], + [AC_MSG_RESULT(yes) +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb deleted file mode 100644 index 143048d9e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Python GObject bindings" -SECTION = "devel/python" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" - -inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even - -DEPENDS += "gnome-common-native python3 glib-2.0" - -SRCNAME="pygobject" -SRC_URI = " \ - http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ - file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \ -" - -SRC_URI[md5sum] = "ed4117ed5d554d25fd7718807fbf819f" -SRC_URI[sha256sum] = "08b29cfb08efc80f7a8630a2734dec65a99c1b59f1e5771c671d2e4ed8a5cbe7" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - - -PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}" - -# python3-pycairo is checked on configuration -> DEPENDS -# we don't link against python3-pycairo -> RDEPENDS -PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo" - -RDEPENDS_${PN} += "python3-setuptools python3-importlib" - -BBCLASSEXTEND = "native" -PACKAGECONFIG_class-native = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb new file mode 100644 index 000000000..9d10af2e0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "Python GObject bindings" +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" + +inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even + +DEPENDS += "python3 glib-2.0" + +SRCNAME="pygobject" +SRC_URI = " \ + http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ + file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \ + file://0001-configure.ac-Don-t-use-gnome-common-macros.patch \ +" + +SRC_URI[md5sum] = "69a843311d0f0385dff376e11a2d83d2" +SRC_URI[sha256sum] = "a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + + +PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}" + +# python3-pycairo is checked on configuration -> DEPENDS +# we don't link against python3-pycairo -> RDEPENDS +PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo" + +RDEPENDS_${PN} += "python3-setuptools python3-importlib" + +BBCLASSEXTEND = "native" +PACKAGECONFIG_class-native = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb deleted file mode 100644 index 495f677cf..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "A Python module for working with OpenPGP messages" -HOMEPAGE = "https://launchpad.net/pygpgme" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3" - -SRC_URI = "https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz" -SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0" -SRC_URI[sha256sum] = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1" - -S = "${WORKDIR}/pygpgme-${PV}" - -inherit distutils3 - -DEPENDS = "gpgme python3" - -RDEPENDS_${PN} += "python3-core" - -BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb deleted file mode 100644 index 65af6f0da..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb +++ /dev/null @@ -1,37 +0,0 @@ -require python-setuptools.inc - -DEPENDS += "python3" -DEPENDS_class-native += "python3-native" - -inherit distutils3 - -DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" - -# The installer puts the wrong path in the setuptools.pth file. Correct it. -do_install_append() { - rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth - mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install - echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth -} - -RDEPENDS_${PN} = "\ - python3-distutils \ - python3-compression \ -" -RDEPENDS_${PN}_class-target = "\ - python3-ctypes \ - python3-distutils \ - python3-email \ - python3-importlib \ - python3-numbers \ - python3-compression \ - python3-shell \ - python3-subprocess \ - python3-textutils \ - python3-pkgutil \ - python3-threading \ - python3-misc \ - python3-unittest \ - python3-xml \ -" -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb new file mode 100644 index 000000000..a7bca9740 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb @@ -0,0 +1,33 @@ +require python-setuptools.inc + +DEPENDS += "python3" +DEPENDS_class-native += "python3-native" +DEPENDS_class-nativesdk += "nativesdk-python3" + +inherit setuptools3 + +do_install_append() { + mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install +} + +RDEPENDS_${PN}_class-native = "\ + python3-distutils \ + python3-compression \ +" +RDEPENDS_${PN} = "\ + python3-ctypes \ + python3-distutils \ + python3-email \ + python3-importlib \ + python3-numbers \ + python3-compression \ + python3-shell \ + python3-subprocess \ + python3-textutils \ + python3-pkgutil \ + python3-threading \ + python3-misc \ + python3-unittest \ + python3-xml \ +" +BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch deleted file mode 100644 index 2d822218f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch +++ /dev/null @@ -1,85 +0,0 @@ -We cross compile python. This patch uses tools from host/native -python instead of in-tree tools - --Khem - -Upstream-Status: Inappropriate[Configuration Specific] - ---- - Makefile.pre.in | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) - -Index: Python-3.5.2/Makefile.pre.in -=================================================================== ---- Python-3.5.2.orig/Makefile.pre.in -+++ Python-3.5.2/Makefile.pre.in -@@ -220,6 +220,7 @@ LIBOBJS= @LIBOBJS@ - - PYTHON= python$(EXE) - BUILDPYTHON= python$(BUILDEXE) -+HOSTPYTHON= $(BUILDPYTHON) - - cross_compiling=@cross_compiling@ - PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ -@@ -279,6 +280,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+HOSTPGEN= $(PGEN)$(EXE) - - PSRCS= \ - Parser/acceler.c \ -@@ -509,7 +511,7 @@ build_all_generate_profile: - - run_profile_task: - : # FIXME: can't run for a cross build -- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true -+ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true - - build_all_merge_profile: - $(LLVM_PROF_MERGER) -@@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) - @$(MKDIR_P) Include - # Avoid copying the file onto itself for an in-tree build - if test "$(cross_compiling)" != "yes"; then \ -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ - else \ - cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \ - mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \ -@@ -990,7 +992,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth - ###################################################################### - - TESTOPTS= $(EXTRATESTOPTS) --TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) -+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS) - TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py - TESTTIMEOUT= 3600 - -@@ -1481,7 +1483,7 @@ frameworkinstallstructure: $(LDLIBRARY) - fi; \ - done - $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers -- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist -+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist - $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current - $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) - $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers -@@ -1547,7 +1549,7 @@ config.status: $(srcdir)/configure - - # Run reindent on the library - reindent: -- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib -+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib - - # Rerun configure with the same options as it was run last time, - # provided the config.status script exists -@@ -1683,7 +1685,7 @@ funny: - - # Perform some verification checks on any modified files. - patchcheck: all -- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py -+ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py - - # Dependencies - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch index b7e0ac635..8ea3f03fe 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch @@ -1,4 +1,4 @@ -From 045c99b5f1eb6e4e0d8ad1ef9f0ba6574f738150 Mon Sep 17 00:00:00 2001 +From 04df959365e2b54d7503edf0e5534ff094284f2d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 23 Oct 2015 12:25:09 +0300 Subject: [PATCH] Do not use the shell version of python-config that was @@ -14,13 +14,13 @@ Signed-off-by: Alexander Kanavin 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index d7fc9a0..47e60bc 100644 +index 236f005..5c4337f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1270,12 +1270,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -1348,12 +1348,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} - sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config + LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config - # On Darwin, always use the python version of the script, the shell - # version doesn't use the compiler customizations that are provided - # in python (_osx_support.py). @@ -34,5 +34,5 @@ index d7fc9a0..47e60bc 100644 # Install the include files -- -2.1.4 +2.11.0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch new file mode 100644 index 000000000..d1c92e9ee --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch @@ -0,0 +1,66 @@ +From bcddbf40c7f1b80336268cdddacc17369fb0ccea Mon Sep 17 00:00:00 2001 +From: Libin Dang +Date: Tue, 11 Apr 2017 14:12:15 +0800 +Subject: [PATCH] Issue #21272: Use _sysconfigdata.py to initialize + distutils.sysconfig + +Backport upstream commit +https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159 + +Upstream-Status: Backport + +Signed-off-by: Li Zhou +--- + Lib/distutils/sysconfig.py | 35 ++++------------------------------- + 1 file changed, 4 insertions(+), 31 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 6d5cfd0..9925d24 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -424,38 +424,11 @@ _config_vars = None + + def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" +- g = {} +- # load the installed Makefile: +- try: +- filename = get_makefile_filename() +- parse_makefile(filename, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # load the installed pyconfig.h: +- try: +- filename = get_config_h_filename() +- with open(filename) as file: +- parse_config_h(file, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # On AIX, there are wrong paths to the linker scripts in the Makefile +- # -- these paths are relative to the Python source, but when installed +- # the scripts are in another directory. +- if python_build: +- g['LDSHARED'] = g['BLDSHARED'] +- ++ # _sysconfigdata is generated at build time, see the sysconfig module ++ from _sysconfigdata import build_time_vars + global _config_vars +- _config_vars = g ++ _config_vars = {} ++ _config_vars.update(build_time_vars) + + + def _init_nt(): +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch new file mode 100644 index 000000000..118d75ddc --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch @@ -0,0 +1,93 @@ +From 624c029abcc73c724020ccea9a2b4b5b5c00f2a6 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 31 Mar 2017 15:42:46 +0300 +Subject: [PATCH] cross-compile support + +We cross compile python. This patch uses tools from host/native +python instead of in-tree tools + +-Khem + +Upstream-Status: Inappropriate[Configuration Specific] +Signed-off-by: Alexander Kanavin +--- + Makefile.pre.in | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index a88b7d5..7cb8bb3 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -221,6 +221,7 @@ LIBOBJS= @LIBOBJS@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + PYTHON_FOR_GEN=@PYTHON_FOR_GEN@ + PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ +@@ -280,6 +281,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++HOSTPGEN= $(PGEN)$(EXE) + + PSRCS= \ + Parser/acceler.c \ +@@ -510,7 +512,7 @@ build_all_generate_profile: + + run_profile_task: + : # FIXME: can't run for a cross build +- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true ++ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true + + build_all_merge_profile: + $(LLVM_PROF_MERGER) +@@ -787,7 +789,7 @@ $(IO_OBJS): $(IO_H) + + $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) + @$(MKDIR_P) Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) + touch $(GRAMMAR_C) + +@@ -976,7 +978,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) + ###################################################################### + + TESTOPTS= $(EXTRATESTOPTS) +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) ++TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS) + TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py + TESTTIMEOUT= 3600 + +@@ -1468,7 +1470,7 @@ frameworkinstallstructure: $(LDLIBRARY) + fi; \ + done + $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers +- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist ++ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers +@@ -1534,7 +1536,7 @@ config.status: $(srcdir)/configure + + # Run reindent on the library + reindent: +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib ++ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + + # Rerun configure with the same options as it was run last time, + # provided the config.status script exists +@@ -1674,7 +1676,7 @@ funny: + + # Perform some verification checks on any modified files. + patchcheck: all +- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py ++ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + + # Dependencies + +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch new file mode 100644 index 000000000..7217c6ede --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch @@ -0,0 +1,56 @@ +From 62dcf34987b680e95873eb947b3f4d802199c667 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C5=81ukasz=20Langa?= +Date: Fri, 10 Feb 2017 00:14:55 -0800 +Subject: [PATCH] Fix #29519: weakref spewing exceptions during interp + finalization + +commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6 +from https://github.com/python/cpython + +Upstream-Status: Backport + +Signed-off-by: Lukasz Langa +--- + Lib/weakref.py | 4 ++-- + Misc/NEWS | 3 +++ + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/Lib/weakref.py b/Lib/weakref.py +index aaebd0c..787e33a 100644 +--- a/Lib/weakref.py ++++ b/Lib/weakref.py +@@ -106,7 +106,7 @@ class WeakValueDictionary(collections.MutableMapping): + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) +- def remove(wr, selfref=ref(self)): ++ def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref): + self = selfref() + if self is not None: + if self._iterating: +@@ -114,7 +114,7 @@ class WeakValueDictionary(collections.MutableMapping): + else: + # Atomic removal is necessary since this function + # can be called asynchronously by the GC +- _remove_dead_weakref(d, wr.key) ++ _atomic_removal(d, wr.key) + self._remove = remove + # A list of keys to be removed + self._pending_removals = [] +diff --git a/Misc/NEWS b/Misc/NEWS +index 41cfdba..6d89f52 100644 +--- a/Misc/NEWS ++++ b/Misc/NEWS +@@ -5719,6 +5719,9 @@ Core and Builtins + Library + ------- + ++- Issue #29519: Fix weakref spewing exceptions during interpreter shutdown ++ when used with a rare combination of multiprocessing and custom codecs. ++ + - Issue #20154: Deadlock in asyncio.StreamReader.readexactly(). + + - Issue #16113: Remove sha3 module again. +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch new file mode 100644 index 000000000..5c3af6b62 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch @@ -0,0 +1,82 @@ +From a784b70d47ba2104afbcfd805e2a66cdc2109ec5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 4 Aug 2017 11:16:14 +0800 +Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module + +In the following commit: +... +commit e711cafab13efc9c1fe6c5cd75826401445eb585 +Author: Benjamin Peterson +Date: Wed Jun 11 16:44:04 2008 +0000 + + Merged revisions 64104,64117 via svnmerge from + svn+ssh://pythondev@svn.python.org/python/trunk +... +(see diff in setup.py) +It assigned libraries for multiprocessing module according +the host_platform, but not pass it to Extension. + +In glibc, the following commit caused two definition of +sem_getvalue are different. +https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524 +(see diff in nptl/sem_getvalue.c for detail) +`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1 +and `__old_sem_getvalue' is to compat the old version +sem_getvalue@GLIBC_2.0. + +To build python for embedded Linux systems: +http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html +If not explicitly link to library pthread (-lpthread), it will +load glibc's sem_getvalue randomly at runtime. + +Such as build python on linux x86_64 host and run the python +on linux x86_32 target. If not link library pthread, it caused +multiprocessing bounded semaphore could not work correctly. +... +>>> import multiprocessing +>>> pool_sema = multiprocessing.BoundedSemaphore(value=1) +>>> pool_sema.acquire() +True +>>> pool_sema.release() +Traceback (most recent call last): + File "", line 1, in +ValueError: semaphore or lock released too many times +... + +And the semaphore issue also caused multiprocessing.Queue().put() hung. + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999] + +Signed-off-by: Hongxu Jia +--- + setup.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 4f0f522..d05707d 100644 +--- a/setup.py ++++ b/setup.py +@@ -1606,8 +1606,10 @@ class PyBuildExt(build_ext): + elif host_platform.startswith('netbsd'): + macros = dict() + libraries = [] +- +- else: # Linux and other unices ++ elif host_platform.startswith(('linux')): ++ macros = dict() ++ libraries = ['pthread'] ++ else: # Other unices + macros = dict() + libraries = ['rt'] + +@@ -1626,6 +1628,7 @@ class PyBuildExt(build_ext): + if sysconfig.get_config_var('WITH_THREAD'): + exts.append ( Extension('_multiprocessing', multiprocessing_srcs, + define_macros=list(macros.items()), ++ libraries=libraries, + include_dirs=["Modules/_multiprocessing"])) + else: + missing.append('_multiprocessing') +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch deleted file mode 100644 index ab1b7230e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch +++ /dev/null @@ -1,148 +0,0 @@ -From aab3e8c432b90508ac14755128f5a687be2fdf43 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Thu, 22 Sep 2016 16:39:49 +0800 -Subject: [PATCH] python3: fix CVE-2016-1000110 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which -indicates that the script is in CGI mode. - -Issue #27568 Reported and patch contributed by Rémi Rampin. [#27568] - -Backport patch from https://hg.python.org/cpython/rev/a0ac52ed8f79 - -Upstream-Status: Backport -CVE: CVE-2016-1000110 -Signed-off-by: Mingli Yu ---- - Doc/howto/urllib2.rst | 5 +++++ - Doc/library/urllib.request.rst | 17 ++++++++++++++++- - Lib/test/test_urllib.py | 14 +++++++++++++- - Lib/urllib/request.py | 6 ++++++ - Misc/NEWS | 4 ++++ - 5 files changed, 44 insertions(+), 2 deletions(-) - -diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst -index 24a4156..d2c7991 100644 ---- a/Doc/howto/urllib2.rst -+++ b/Doc/howto/urllib2.rst -@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: :: - through a proxy. However, this can be enabled by extending urllib.request as - shown in the recipe [#]_. - -+.. note:: -+ -+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see -+ the documentation on :func:`~urllib.request.getproxies`. -+ - - Sockets and Layers - ================== -diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst -index 1338906..1291aeb 100644 ---- a/Doc/library/urllib.request.rst -+++ b/Doc/library/urllib.request.rst -@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions: - If both lowercase and uppercase environment variables exist (and disagree), - lowercase is preferred. - -+ .. note:: -+ -+ If the environment variable ``REQUEST_METHOD`` is set, which usually -+ indicates your script is running in a CGI environment, the environment -+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is -+ because that variable can be injected by a client using the "Proxy:" HTTP -+ header. If you need to use an HTTP proxy in a CGI environment, either use -+ ``ProxyHandler`` explicitly, or make sure the variable name is in -+ lowercase (or at least the ``_proxy`` suffix). -+ - - The following classes are provided: - -@@ -280,6 +290,11 @@ The following classes are provided: - list of hostname suffixes, optionally with ``:port`` appended, for example - ``cern.ch,ncsa.uiuc.edu,some.host:8080``. - -+ .. note:: -+ -+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; -+ see the documentation on :func:`~urllib.request.getproxies`. -+ - - .. class:: HTTPPasswordMgr() - -@@ -1138,7 +1153,7 @@ the returned bytes object to string once it determines or guesses - the appropriate encoding. - - The following W3C document, https://www.w3.org/International/O-charset\ , lists --the various ways in which a (X)HTML or a XML document could have specified its -+the various ways in which an (X)HTML or an XML document could have specified its - encoding information. - - As the python.org website uses *utf-8* encoding as specified in its meta tag, we -diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py -index 5d05f8d..247598a 100644 ---- a/Lib/test/test_urllib.py -+++ b/Lib/test/test_urllib.py -@@ -1,4 +1,4 @@ --"""Regresssion tests for what was in Python 2's "urllib" module""" -+"""Regression tests for what was in Python 2's "urllib" module""" - - import urllib.parse - import urllib.request -@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase): - self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888')) - self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234')) - -+ def test_proxy_cgi_ignore(self): -+ try: -+ self.env.set('HTTP_PROXY', 'http://somewhere:3128') -+ proxies = urllib.request.getproxies_environment() -+ self.assertEqual('http://somewhere:3128', proxies['http']) -+ self.env.set('REQUEST_METHOD', 'GET') -+ proxies = urllib.request.getproxies_environment() -+ self.assertNotIn('http', proxies) -+ finally: -+ self.env.unset('REQUEST_METHOD') -+ self.env.unset('HTTP_PROXY') -+ - def test_proxy_bypass_environment_host_match(self): - bypass = urllib.request.proxy_bypass_environment - self.env.set('NO_PROXY', -diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py -index 1731fe3..3be327d 100644 ---- a/Lib/urllib/request.py -+++ b/Lib/urllib/request.py -@@ -2412,6 +2412,12 @@ def getproxies_environment(): - name = name.lower() - if value and name[-6:] == '_proxy': - proxies[name[:-6]] = value -+ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY -+ # (non-all-lowercase) as it may be set from the web server by a "Proxy:" -+ # header from the client -+ # If "proxy" is lowercase, it will still be used thanks to the next block -+ if 'REQUEST_METHOD' in os.environ: -+ proxies.pop('http', None) - for name, value in os.environ.items(): - if name[-6:] == '_proxy': - name = name.lower() -diff --git a/Misc/NEWS b/Misc/NEWS -index 4ad2551..2fcc95b 100644 ---- a/Misc/NEWS -+++ b/Misc/NEWS -@@ -329,6 +329,10 @@ Library - - Issue #26644: Raise ValueError rather than SystemError when a negative - length is passed to SSLSocket.recv() or read(). - -+- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the -+ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates -+ that the script is in CGI mode. -+ - - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes - instead of up to 1024. - --- -2.8.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch new file mode 100644 index 000000000..32ecab9fe --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch @@ -0,0 +1,97 @@ +The compiled .pyc files contain time stamp corresponding to the compile time. +This prevents binary reproducibility. This patch allows to achieve binary +reproducibility by overriding the build time stamp by the value +exported via SOURCE_DATE_EPOCH. + +Upstream-Status: Backport + +Signed-off-by: Juro Bystricky + + +From aeab488630fdb1b56a8d0b0c13fa88706b2afe9b Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Sat, 25 Feb 2017 06:42:28 +0100 +Subject: [PATCH] bpo-29708: support SOURCE_DATE_EPOCH env var in py_compile + +to allow for reproducible builds of python packages + +See https://reproducible-builds.org/ for why this is good +and https://reproducible-builds.org/specs/source-date-epoch/ +for the definition of this variable. + +Background: +In some distributions like openSUSE, binary rpms contain precompiled .pyc files. + +And packages like amqp or twisted dynamically generate .py files at build time +so those have the current time and that timestamp gets embedded +into the .pyc file header. +When we then adapt file timestamps in rpms to be constant, +the timestamp in the .pyc header will no more match +the .py timestamp in the filesystem. +The software will still work, but it will not use the .pyc file as it should. +--- + Doc/library/py_compile.rst | 4 ++++ + Lib/py_compile.py | 4 ++++ + Lib/test/test_py_compile.py | 19 +++++++++++++++++++ + 3 files changed, 27 insertions(+) + +diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst +index 0af8fb1..841f3e8 100644 +--- a/Doc/library/py_compile.rst ++++ b/Doc/library/py_compile.rst +@@ -53,6 +53,10 @@ byte-code cache files in the directory containing the source code. + :func:`compile` function. The default of ``-1`` selects the optimization + level of the current interpreter. + ++ If the SOURCE_DATE_EPOCH environment variable is set, the .py file mtime ++ and timestamp entry in .pyc file header, will be limited to this value. ++ See https://reproducible-builds.org/specs/source-date-epoch/ for more info. ++ + .. versionchanged:: 3.2 + Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous + default was *file* + ``'c'`` (``'o'`` if optimization was enabled). +diff --git a/Lib/py_compile.py b/Lib/py_compile.py +index 11c5b50..62dcdc7 100644 +--- a/Lib/py_compile.py ++++ b/Lib/py_compile.py +@@ -137,6 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1): + except FileExistsError: + pass + source_stats = loader.path_stats(file) ++ sde = os.environ.get('SOURCE_DATE_EPOCH') ++ if sde and source_stats['mtime'] > int(sde): ++ source_stats['mtime'] = int(sde) ++ os.utime(file, (source_stats['mtime'], source_stats['mtime'])) + bytecode = importlib._bootstrap_external._code_to_bytecode( + code, source_stats['mtime'], source_stats['size']) + mode = importlib._bootstrap_external._calc_mode(file) +diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py +index 4a6caa5..3d09963 100644 +--- a/Lib/test/test_py_compile.py ++++ b/Lib/test/test_py_compile.py +@@ -98,6 +98,25 @@ def test_bad_coding(self): + self.assertFalse(os.path.exists( + importlib.util.cache_from_source(bad_coding))) + ++ def test_source_date_epoch(self): ++ testtime = 123456789 ++ orig_sde = os.getenv("SOURCE_DATE_EPOCH") ++ os.environ["SOURCE_DATE_EPOCH"] = str(testtime) ++ py_compile.compile(self.source_path, self.pyc_path) ++ if orig_sde: ++ os.environ["SOURCE_DATE_EPOCH"] = orig_sde ++ else: ++ del os.environ["SOURCE_DATE_EPOCH"] ++ self.assertTrue(os.path.exists(self.pyc_path)) ++ self.assertFalse(os.path.exists(self.cache_path)) ++ statinfo = os.stat(self.source_path) ++ self.assertEqual(statinfo.st_mtime, testtime) ++ f = open(self.pyc_path, "rb") ++ f.read(4) ++ timebytes = f.read(4) # read timestamp from pyc header ++ f.close() ++ self.assertEqual(timebytes, (testtime).to_bytes(4, 'little')) ++ + @unittest.skipIf(sys.flags.optimize > 0, 'test does not work with -O') + def test_double_dot_no_clobber(self): + # http://bugs.python.org/issue22966 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch index 0d9152ccd..9b40e8ac9 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch @@ -1,21 +1,7 @@ -This patch updates random.c to match upstream python's code at revision -8125d9a8152b. This addresses various issues around problems with glibc 2.24 -and 2.25 such that python would fail to start with: - -[rpurdie@centos7 ~]$ /tmp/t2/sysroots/x86_64-pokysdk-linux/usr/bin/python3 -Fatal Python error: getentropy() failed -Aborted - -(taken from our buildtools-tarball also breaks eSDK) - -Upstream-Status: Backport - -# HG changeset patch -# User Victor Stinner -# Date 1483957133 -3600 -# Node ID 8125d9a8152b79e712cb09c7094b9129b9bcea86 -# Parent 337461574c90281630751b6095c4e1baf380cf7d -Issue #29157: Prefer getrandom() over getentropy() +From 035ba5da3e53e45c712b39fe1f6fb743e697c032 Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Mon, 9 Jan 2017 11:18:53 +0100 +Subject: [PATCH] Issue #29157: Prefer getrandom() over getentropy() Copy and then adapt Python/random.c from default branch. Difference between 3.5 and default branches: @@ -26,12 +12,17 @@ and default branches: * Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom() works in non-blocking mode on Python 3.5 -RP 2017/1/22 +Upstream-Status: Backport [https://github.com/python/cpython/commit/035ba5da3e53e45c712b39fe1f6fb743e697c032] +Signed-off-by: Alexander Kanavin + +--- + Python/random.c | 494 +++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 294 insertions(+), 200 deletions(-) -Index: Python-3.5.2/Python/random.c -=================================================================== ---- Python-3.5.2.orig/Python/random.c -+++ Python-3.5.2/Python/random.c +diff --git a/Python/random.c b/Python/random.c +index d203939..31f61d0 100644 +--- a/Python/random.c ++++ b/Python/random.c @@ -1,6 +1,9 @@ #include "Python.h" #ifdef MS_WINDOWS @@ -42,7 +33,7 @@ Index: Python-3.5.2/Python/random.c #else # include # ifdef HAVE_SYS_STAT_H -@@ -36,10 +39,9 @@ win32_urandom_init(int raise) +@@ -37,10 +40,9 @@ win32_urandom_init(int raise) return 0; error: @@ -55,7 +46,7 @@ Index: Python-3.5.2/Python/random.c return -1; } -@@ -52,8 +54,9 @@ win32_urandom(unsigned char *buffer, Py_ +@@ -53,8 +55,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) if (hCryptProv == 0) { @@ -66,7 +57,7 @@ Index: Python-3.5.2/Python/random.c } while (size > 0) -@@ -62,11 +65,9 @@ win32_urandom(unsigned char *buffer, Py_ +@@ -63,11 +66,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer)) { /* CryptGenRandom() failed */ @@ -80,7 +71,7 @@ Index: Python-3.5.2/Python/random.c return -1; } buffer += chunk; -@@ -75,55 +76,29 @@ win32_urandom(unsigned char *buffer, Py_ +@@ -76,58 +77,23 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) return 0; } @@ -129,13 +120,19 @@ Index: Python-3.5.2/Python/random.c #if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL) #define PY_GETRANDOM 1 +-/* Call getrandom() +/* Call getrandom() to get random bytes: + -+ - Return 1 on success + - Return 1 on success +- - Return 0 if getrandom() syscall is not available (failed with ENOSYS or +- EPERM) or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom +- not initialized yet) and raise=0. + - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM), + or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not + initialized yet). -+ - Raise an exception (if raise is non-zero) and return -1 on error: + - Raise an exception (if raise is non-zero) and return -1 on error: +- getrandom() failed with EINTR and the Python signal handler raised an +- exception, or getrandom() failed with a different error. */ + if getrandom() failed with EINTR, raise is non-zero and the Python signal + handler raised an exception, or if getrandom() failed with a different + error. @@ -144,26 +141,16 @@ Index: Python-3.5.2/Python/random.c static int py_getrandom(void *buffer, Py_ssize_t size, int raise) { -- /* Is getrandom() supported by the running kernel? -- * Need Linux kernel 3.17 or newer, or Solaris 11.3 or newer */ -+ /* Is getrandom() supported by the running kernel? Set to 0 if getrandom() -+ failed with ENOSYS or EPERM. Need Linux kernel 3.17 or newer, or Solaris -+ 11.3 or newer */ - static int getrandom_works = 1; - - /* getrandom() on Linux will block if called before the kernel has -@@ -132,84 +107,165 @@ py_getrandom(void *buffer, Py_ssize_t si +@@ -142,16 +108,19 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise) * see https://bugs.python.org/issue26839. To avoid this, use the * GRND_NONBLOCK flag. */ const int flags = GRND_NONBLOCK; -- int n; + char *dest; -+ long n; + long n; -- if (!getrandom_works) -+ if (!getrandom_works) { + if (!getrandom_works) { return 0; -+ } + } + dest = buffer; while (0 < size) { @@ -174,11 +161,8 @@ Index: Python-3.5.2/Python/random.c + requested. */ n = Py_MIN(size, 1024); #else -- n = size; -+ n = Py_MIN(size, LONG_MAX); - #endif - - errno = 0; + n = Py_MIN(size, LONG_MAX); +@@ -161,34 +130,35 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise) #ifdef HAVE_GETRANDOM if (raise) { Py_BEGIN_ALLOW_THREADS @@ -209,56 +193,45 @@ Index: Python-3.5.2/Python/random.c #endif if (n < 0) { -- if (errno == ENOSYS) { +- /* ENOSYS: getrandom() syscall not supported by the kernel (but +- * maybe supported by the host which built Python). EPERM: +- * getrandom() syscall blocked by SECCOMP or something else. */ + /* ENOSYS: the syscall is not supported by the kernel. + EPERM: the syscall is blocked by a security policy (ex: SECCOMP) + or something else. */ -+ if (errno == ENOSYS || errno == EPERM) { + if (errno == ENOSYS || errno == EPERM) { getrandom_works = 0; return 0; } + if (errno == EAGAIN) { -- /* If we failed with EAGAIN, the entropy pool was -- * uninitialized. In this case, we return failure to fall -- * back to reading from /dev/urandom. -- * -- * Note: In this case the data read will not be random so -- * should not be used for cryptographic purposes. Retaining -- * the existing semantics for practical purposes. */ -+ /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system -+ urandom is not initialiazed yet. In this case, fall back on -+ reading from /dev/urandom. -+ -+ Note: In this case the data read will not be random so -+ should not be used for cryptographic purposes. Retaining -+ the existing semantics for practical purposes. */ - getrandom_works = 0; - return 0; + /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system + urandom is not initialiazed yet. In this case, fall back on +@@ -202,169 +172,225 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise) } if (errno == EINTR) { - if (PyErr_CheckSignals()) { -- if (!raise) +- if (!raise) { - Py_FatalError("getrandom() interrupted by a signal"); -- return -1; + if (raise) { + if (PyErr_CheckSignals()) { + return -1; -+ } + } +- return -1; } + - /* retry getrandom() */ -+ + /* retry getrandom() if it was interrupted by a signal */ continue; } -- if (raise) -+ if (raise) { + if (raise) { PyErr_SetFromErrno(PyExc_OSError); -- else + } +- else { - Py_FatalError("getrandom() failed"); -+ } +- } return -1; } @@ -269,12 +242,19 @@ Index: Python-3.5.2/Python/random.c return 1; } -#endif -+ + +-static struct { +- int fd; +- dev_t st_dev; +- ino_t st_ino; +-} urandom_cache = { -1 }; +#elif defined(HAVE_GETENTROPY) +#define PY_GETENTROPY 1 -+ + +/* Fill buffer with size pseudo-random bytes generated by getentropy(): -+ + +-/* Read 'size' random bytes from py_getrandom(). Fall back on reading from +- /dev/urandom if getrandom() is not available. + - Return 1 on success + - Return 0 if getentropy() syscall is not available (failed with ENOSYS or + EPERM). @@ -282,25 +262,47 @@ Index: Python-3.5.2/Python/random.c + if getentropy() failed with EINTR, raise is non-zero and the Python signal + handler raised an exception, or if getentropy() failed with a different + error. -+ + +- Call Py_FatalError() on error. */ +-static void +-dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size) + getentropy() is retried if it failed with EINTR: interrupted by a signal. */ +static int +py_getentropy(char *buffer, Py_ssize_t size, int raise) -+{ + { +- int fd; +- Py_ssize_t n; + /* Is getentropy() supported by the running kernel? Set to 0 if + getentropy() failed with ENOSYS or EPERM. */ + static int getentropy_works = 1; -+ + +- assert (0 < size); +- +-#ifdef PY_GETRANDOM +- if (py_getrandom(buffer, size, 0) == 1) { +- return; + if (!getentropy_works) { + return 0; -+ } -+ + } +- /* getrandom() failed with ENOSYS or EPERM, +- fall back on reading /dev/urandom */ +-#endif + +- fd = _Py_open_noraise("/dev/urandom", O_RDONLY); +- if (fd < 0) { +- Py_FatalError("Failed to open /dev/urandom"); +- } + while (size > 0) { + /* getentropy() is limited to returning up to 256 bytes. Call it + multiple times if more bytes are requested. */ + Py_ssize_t len = Py_MIN(size, 256); + int res; -+ + +- while (0 < size) +- { +- do { +- n = read(fd, buffer, (size_t)size); +- } while (n < 0 && errno == EINTR); + if (raise) { + Py_BEGIN_ALLOW_THREADS + res = getentropy(buffer, len); @@ -309,7 +311,11 @@ Index: Python-3.5.2/Python/random.c + else { + res = getentropy(buffer, len); + } -+ + +- if (n <= 0) { +- /* read() failed or returned 0 bytes */ +- Py_FatalError("Failed to read bytes from /dev/urandom"); +- break; + if (res < 0) { + /* ENOSYS: the syscall is not supported by the running kernel. + EPERM: the syscall is blocked by a security policy (ex: SECCOMP) @@ -334,71 +340,44 @@ Index: Python-3.5.2/Python/random.c + PyErr_SetFromErrno(PyExc_OSError); + } + return -1; -+ } + } +- buffer += n; +- size -= n; + + buffer += len; + size -= len; -+ } + } +- close(fd); + return 1; -+} + } +#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */ -+ - static struct { - int fd; -@@ -217,127 +273,123 @@ static struct { - ino_t st_ino; - } urandom_cache = { -1 }; +-/* Read 'size' random bytes from py_getrandom(). Fall back on reading from +- /dev/urandom if getrandom() is not available. +- Return 0 on success. Raise an exception and return -1 on error. */ ++static struct { ++ int fd; ++ dev_t st_dev; ++ ino_t st_ino; ++} urandom_cache = { -1 }; ++ +/* Read random bytes from the /dev/urandom device: - --/* Read size bytes from /dev/urandom into buffer. -- Call Py_FatalError() on error. */ --static void --dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size) --{ -- int fd; -- Py_ssize_t n; ++ + - Return 0 on success + - Raise an exception (if raise is non-zero) and return -1 on error - -- assert (0 < size); ++ + Possible causes of errors: - --#ifdef PY_GETRANDOM -- if (py_getrandom(buffer, size, 0) == 1) -- return; -- /* getrandom() is not supported by the running kernel, fall back -- * on reading /dev/urandom */ --#endif ++ + - open() failed with ENOENT, ENXIO, ENODEV, EACCES: the /dev/urandom device + was not found. For example, it was removed manually or not exposed in a + chroot or container. + - open() failed with a different error + - fstat() failed + - read() failed or returned 0 - -- fd = _Py_open_noraise("/dev/urandom", O_RDONLY); -- if (fd < 0) -- Py_FatalError("Failed to open /dev/urandom"); ++ + read() is retried if it failed with EINTR: interrupted by a signal. - -- while (0 < size) -- { -- do { -- n = read(fd, buffer, (size_t)size); -- } while (n < 0 && errno == EINTR); -- if (n <= 0) -- { -- /* stop on error or if read(size) returned 0 */ -- Py_FatalError("Failed to read bytes from /dev/urandom"); -- break; -- } -- buffer += n; -- size -= (Py_ssize_t)n; -- } -- close(fd); --} ++ + The file descriptor of the device is kept open between calls to avoid using + many file descriptors when run in parallel from multiple threads: + see the issue #18756. @@ -406,9 +385,7 @@ Index: Python-3.5.2/Python/random.c + st_dev and st_ino fields of the file descriptor (from fstat()) are cached to + check if the file descriptor was replaced by a different file (which is + likely a bug in the application): see the issue #21207. - --/* Read size bytes from /dev/urandom into buffer. -- Return 0 on success, raise an exception and return -1 on error. */ ++ + If the file descriptor was closed or replaced, open a new file descriptor + but don't close the old file descriptor: it probably points to something + important for some third-party code. */ @@ -422,22 +399,24 @@ Index: Python-3.5.2/Python/random.c -#ifdef PY_GETRANDOM - int res; -#endif - +- - if (size <= 0) - return 0; -+ if (raise) { -+ struct _Py_stat_struct st; -#ifdef PY_GETRANDOM - res = py_getrandom(buffer, size, 1); -- if (res < 0) +- if (res < 0) { - return -1; -- if (res == 1) +- } +- if (res == 1) { - return 0; -- /* getrandom() is not supported by the running kernel, fall back -- * on reading /dev/urandom */ +- } +- /* getrandom() failed with ENOSYS or EPERM, +- fall back on reading /dev/urandom */ -#endif -- ++ if (raise) { ++ struct _Py_stat_struct st; + - if (urandom_cache.fd >= 0) { - /* Does the fd point to the same thing as before? (issue #21207) */ - if (_Py_fstat_noraise(urandom_cache.fd, &st) @@ -516,8 +495,9 @@ Index: Python-3.5.2/Python/random.c - do { - n = _Py_read(fd, buffer, (size_t)size); -- if (n == -1) +- if (n == -1) { - return -1; +- } - if (n == 0) { - PyErr_Format(PyExc_RuntimeError, - "Failed to read %zi bytes from /dev/urandom", @@ -566,7 +546,7 @@ Index: Python-3.5.2/Python/random.c return 0; } -@@ -349,8 +401,8 @@ dev_urandom_close(void) +@@ -376,8 +402,8 @@ dev_urandom_close(void) urandom_cache.fd = -1; } } @@ -576,7 +556,7 @@ Index: Python-3.5.2/Python/random.c /* Fill buffer with pseudo-random bytes generated by a linear congruent generator (LCG): -@@ -373,29 +425,98 @@ lcg_urandom(unsigned int x0, unsigned ch +@@ -400,31 +426,100 @@ lcg_urandom(unsigned int x0, unsigned char *buffer, size_t size) } } @@ -661,7 +641,7 @@ Index: Python-3.5.2/Python/random.c #else - return dev_urandom_python((char*)buffer, size); + res = py_getentropy(buffer, size, raise); - #endif ++#endif + if (res < 0) { + return -1; + } @@ -673,9 +653,9 @@ Index: Python-3.5.2/Python/random.c +#endif + + return dev_urandom(buffer, size, raise); -+#endif -+} -+ + #endif + } + +/* Fill buffer with size pseudo-random bytes from the operating system random + number generator (RNG). It is suitable for most cryptographic purposes + except long living private keys for asymmetric encryption. @@ -685,10 +665,12 @@ Index: Python-3.5.2/Python/random.c +_PyOS_URandom(void *buffer, Py_ssize_t size) +{ + return pyurandom(buffer, size, 1); - } - ++} ++ void -@@ -436,13 +557,14 @@ _PyRandom_Init(void) + _PyRandom_Init(void) + { +@@ -463,13 +558,14 @@ _PyRandom_Init(void) } } else { @@ -710,7 +692,7 @@ Index: Python-3.5.2/Python/random.c } } -@@ -454,8 +576,6 @@ _PyRandom_Fini(void) +@@ -481,8 +577,6 @@ _PyRandom_Fini(void) CryptReleaseContext(hCryptProv, 0); hCryptProv = 0; } diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb deleted file mode 100644 index 2ff7c9e27..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb +++ /dev/null @@ -1,224 +0,0 @@ -require recipes-devtools/python/python.inc - -DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz" -PR = "${INC_PR}.0" -PYTHON_MAJMIN = "3.5" -PYTHON_BINABI= "${PYTHON_MAJMIN}m" -DISTRO_SRC_URI ?= "file://sitecustomize.py" -DISTRO_SRC_URI_linuxstdbase = "" -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ -file://python-config.patch \ -file://000-cross-compile.patch \ -file://030-fixup-include-dirs.patch \ -file://070-dont-clean-ipkg-install.patch \ -file://080-distutils-dont_adjust_files.patch \ -file://130-readline-setup.patch \ -file://150-fix-setupterm.patch \ -file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ -file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \ -${DISTRO_SRC_URI} \ -" - -SRC_URI += "\ - file://03-fix-tkinter-detection.patch \ - file://avoid_warning_about_tkinter.patch \ - file://cgi_py.patch \ - file://host_include_contamination.patch \ - file://python-3.3-multilib.patch \ - file://shutil-follow-symlink-fix.patch \ - file://sysroot-include-headers.patch \ - file://unixccompiler.patch \ - file://avoid-ncursesw-include-path.patch \ - file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://python3-setup.py-no-host-headers-libs.patch \ - file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ - file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ - file://setup.py-find-libraries-in-staging-dirs.patch \ - file://configure.ac-fix-LIBPL.patch \ - file://python3-fix-CVE-2016-1000110.patch \ - file://upstream-random-fixes.patch \ - " -SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e" -SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" - -# exclude pre-releases for both python 2.x and 3.x -UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" - -S = "${WORKDIR}/Python-${PV}" - -inherit autotools multilib_header python3native pkgconfig - -CONFIGUREOPTS += " --with-system-ffi " - -CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \ - ac_cv_have_lchflags=no \ - ac_cv_have_long_long_format=yes \ - ac_cv_buggy_getaddrinfo=no \ - ac_cv_file__dev_ptmx=yes \ - ac_cv_file__dev_ptc=no \ -" - -TARGET_CC_ARCH += "-DNDEBUG -fno-inline" -SDK_CC_ARCH += "-DNDEBUG -fno-inline" -EXTRA_OEMAKE += "CROSS_COMPILE=yes" -EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip" - -export CROSS_COMPILE = "${TARGET_PREFIX}" -export _PYTHON_PROJECT_BASE = "${B}" -export _PYTHON_PROJECT_SRC = "${S}" -export CCSHARED = "-fPIC" - -# Fix cross compilation of different modules -export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux" - -# No ctypes option for python 3 -PYTHONLSBOPTS = "" - -do_configure_append() { - rm -f ${S}/Makefile.orig - autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi -} - -do_compile() { - # regenerate platform specific files, because they depend on system headers - cd ${S}/Lib/plat-linux* - include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - ${S}/Tools/scripts/h2py.py -i '(u_long)' \ - ${STAGING_INCDIR}/dlfcn.h \ - ${STAGING_INCDIR}/linux/cdrom.h \ - ${STAGING_INCDIR}/netinet/in.h \ - ${STAGING_INCDIR}/sys/types.h - sed -e 's,${STAGING_DIR_HOST},,g' -i *.py - cd - - - - # remove any bogus LD_LIBRARY_PATH - sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile - - if [ ! -f Makefile.orig ]; then - install -m 0644 Makefile Makefile.orig - fi - sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ - -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ - -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ - -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ - -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ - -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ - -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ - Makefile - # save copy of it now, because if we do it in do_install and - # then call do_install twice we get Makefile.orig == Makefile.sysroot - install -m 0644 Makefile Makefile.sysroot - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - OPT="${CFLAGS}" libpython3.so - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - OPT="${CFLAGS}" -} - -do_install() { - # make install needs the original Makefile, or otherwise the inclues would - # go to ${D}${STAGING...}/... - install -m 0644 Makefile.orig Makefile - - install -d ${D}${libdir}/pkgconfig - install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config - - # rerun the build once again with original makefile this time - # run install in a separate step to avoid compile/install race - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - DESTDIR=${D} LIBDIR=${libdir} - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - DESTDIR=${D} LIBDIR=${libdir} install - - # avoid conflict with 2to3 from Python 2 - rm -f ${D}/${bindir}/2to3 - - install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile - install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile - - if [ -e ${WORKDIR}/sitecustomize.py ]; then - install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} - fi - - oe_multilib_header python${PYTHON_BINABI}/pyconfig.h -} - -do_install_append_class-nativesdk () { - create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' -} - -SSTATE_SCAN_FILES += "Makefile" -PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" - -py_package_preprocess () { - # copy back the old Makefile to fix target package - install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile - install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile - # Remove references to buildmachine paths in target Makefile and _sysconfigdata - sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ - ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \ - ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \ - ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py -} - -require python-${PYTHON_MAJMIN}-manifest.inc - -# manual dependency additions -RPROVIDES_${PN}-core = "${PN}" -RRECOMMENDS_${PN}-core = "${PN}-readline" -RRECOMMENDS_${PN}-crypt = "openssl" -RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl" - -FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}" -FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" -FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" - -PACKAGES =+ "${PN}-pyvenv" -FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv" - -# package libpython3 -PACKAGES =+ "libpython3 libpython3-staticdev" -FILES_libpython3 = "${libdir}/libpython*.so.*" -FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a" -INSANE_SKIP_${PN}-dev += "dev-elf" - -# catch all the rest (unsorted) -PACKAGES += "${PN}-misc" -RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse" -RDEPENDS_${PN}-modules += "${PN}-misc" -FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" - -# catch manpage -PACKAGES += "${PN}-man" -FILES_${PN}-man = "${datadir}/man" - -BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb new file mode 100644 index 000000000..13df12fe5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb @@ -0,0 +1,227 @@ +require recipes-devtools/python/python.inc + +DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz" +PR = "${INC_PR}.0" +PYTHON_MAJMIN = "3.5" +PYTHON_BINABI= "${PYTHON_MAJMIN}m" +DISTRO_SRC_URI ?= "file://sitecustomize.py" +DISTRO_SRC_URI_linuxstdbase = "" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ +file://python-config.patch \ +file://0001-cross-compile-support.patch \ +file://030-fixup-include-dirs.patch \ +file://070-dont-clean-ipkg-install.patch \ +file://080-distutils-dont_adjust_files.patch \ +file://130-readline-setup.patch \ +file://150-fix-setupterm.patch \ +file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ +file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \ +file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \ +${DISTRO_SRC_URI} \ +" + +SRC_URI += "\ + file://03-fix-tkinter-detection.patch \ + file://avoid_warning_about_tkinter.patch \ + file://cgi_py.patch \ + file://host_include_contamination.patch \ + file://python-3.3-multilib.patch \ + file://shutil-follow-symlink-fix.patch \ + file://sysroot-include-headers.patch \ + file://unixccompiler.patch \ + file://avoid-ncursesw-include-path.patch \ + file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ + file://python3-setup.py-no-host-headers-libs.patch \ + file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ + file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ + file://setup.py-find-libraries-in-staging-dirs.patch \ + file://configure.ac-fix-LIBPL.patch \ + file://upstream-random-fixes.patch \ + file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \ + file://Fix-29519-weakref-spewing-exceptions-during-interp-f.patch \ + file://pass-missing-libraries-to-Extension-for-mul.patch \ + " +SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" +SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e" + +# exclude pre-releases for both python 2.x and 3.x +UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" + +S = "${WORKDIR}/Python-${PV}" + +inherit autotools multilib_header python3native pkgconfig + +CONFIGUREOPTS += " --with-system-ffi " + +CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \ + ac_cv_have_lchflags=no \ + ac_cv_have_long_long_format=yes \ + ac_cv_buggy_getaddrinfo=no \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=no \ +" + +TARGET_CC_ARCH += "-DNDEBUG -fno-inline" +SDK_CC_ARCH += "-DNDEBUG -fno-inline" +EXTRA_OEMAKE += "CROSS_COMPILE=yes" +EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip" + +export CROSS_COMPILE = "${TARGET_PREFIX}" +export _PYTHON_PROJECT_BASE = "${B}" +export _PYTHON_PROJECT_SRC = "${S}" +export CCSHARED = "-fPIC" + +# Fix cross compilation of different modules +export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux" + +# No ctypes option for python 3 +PYTHONLSBOPTS = "" + +do_configure_append() { + rm -f ${S}/Makefile.orig + autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +do_compile() { + # regenerate platform specific files, because they depend on system headers + cd ${S}/Lib/plat-linux* + include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + ${S}/Tools/scripts/h2py.py -i '(u_long)' \ + ${STAGING_INCDIR}/dlfcn.h \ + ${STAGING_INCDIR}/linux/cdrom.h \ + ${STAGING_INCDIR}/netinet/in.h \ + ${STAGING_INCDIR}/sys/types.h + sed -e 's,${STAGING_DIR_HOST},,g' -i *.py + cd - + + + # remove any bogus LD_LIBRARY_PATH + sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile + + if [ ! -f Makefile.orig ]; then + install -m 0644 Makefile Makefile.orig + fi + sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ + -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ + -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ + -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ + -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ + -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ + -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ + Makefile + # save copy of it now, because if we do it in do_install and + # then call do_install twice we get Makefile.orig == Makefile.sysroot + install -m 0644 Makefile Makefile.sysroot + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + OPT="${CFLAGS}" libpython3.so + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + OPT="${CFLAGS}" +} + +do_install() { + # make install needs the original Makefile, or otherwise the inclues would + # go to ${D}${STAGING...}/... + install -m 0644 Makefile.orig Makefile + + install -d ${D}${libdir}/pkgconfig + install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config + + # rerun the build once again with original makefile this time + # run install in a separate step to avoid compile/install race + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + DESTDIR=${D} LIBDIR=${libdir} + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + DESTDIR=${D} LIBDIR=${libdir} install + + # avoid conflict with 2to3 from Python 2 + rm -f ${D}/${bindir}/2to3 + + install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile + + if [ -e ${WORKDIR}/sitecustomize.py ]; then + install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} + fi + + oe_multilib_header python${PYTHON_BINABI}/pyconfig.h +} + +do_install_append_class-nativesdk () { + create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' +} + +SSTATE_SCAN_FILES += "Makefile" +PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" + +py_package_preprocess () { + # copy back the old Makefile to fix target package + install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile + # Remove references to buildmachine paths in target Makefile and _sysconfigdata + sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py +} + +require python-${PYTHON_MAJMIN}-manifest.inc + +# manual dependency additions +RPROVIDES_${PN}-modules = "${PN}" +RRECOMMENDS_${PN}-core = "${PN}-readline" +RRECOMMENDS_${PN}-crypt = "openssl" +RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl" + +FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}" +FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" +FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" + +PACKAGES =+ "${PN}-pyvenv" +FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv" + +# package libpython3 +PACKAGES =+ "libpython3 libpython3-staticdev" +FILES_libpython3 = "${libdir}/libpython*.so.*" +FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a" +INSANE_SKIP_${PN}-dev += "dev-elf" + +# catch all the rest (unsorted) +PACKAGES += "${PN}-misc" +RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse" +RDEPENDS_${PN}-modules += "${PN}-misc" +FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" + +# catch manpage +PACKAGES += "${PN}-man" +FILES_${PN}-man = "${datadir}/man" + +BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb index 4ef99523e..754c02909 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb @@ -1,5 +1,5 @@ require python.inc -DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib" +DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib" PR = "${INC_PR}" DISTRO_SRC_URI ?= "file://sitecustomize.py" @@ -27,6 +27,8 @@ SRC_URI += "\ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ file://Don-t-use-getentropy-on-Linux.patch \ + file://pass-missing-libraries-to-Extension-for-mul.patch \ + file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ " S = "${WORKDIR}/Python-${PV}" @@ -37,6 +39,9 @@ CONFIGUREOPTS += " --with-system-ffi " EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no" +PACKAGECONFIG ??= "bdb" +PACKAGECONFIG[bdb] = ",,db" + do_configure_append() { rm -f ${S}/Makefile.orig autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi @@ -116,6 +121,10 @@ do_install() { fi oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h + + if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then + rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb + fi } do_install_append_class-nativesdk () { @@ -152,7 +161,9 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*" PACKAGES += "${PN}-misc" FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" RDEPENDS_${PN}-modules += "${PN}-misc" -RDEPENDS_${PN}-ptest = "${PN}-modules" + +# ptest +RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests" #inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten inherit ptest @@ -162,10 +173,23 @@ do_install_ptest() { sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \ -e s:LIBDIR:${libdir}:g \ -i ${D}${PTEST_PATH}/run-ptest + + #Remove build host references + sed -i \ + -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + ${D}/${PTEST_PATH}/Makefile } # catch manpage PACKAGES += "${PN}-man" FILES_${PN}-man = "${datadir}/man" +# Nasty but if bdb isn't enabled the package won't be generated +RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}" + BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb index 27d53157d..d86b15517 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb @@ -20,6 +20,5 @@ do_install() { install tunctl ${D}${bindir}/ } -RM_WORK_EXCLUDE_ITEMS += "recipe-sysroot-native" DEPENDS += "qemu-native" addtask addto_recipe_sysroot after do_populate_sysroot before do_build diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc index 0e1411af6..2a1d14b31 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc @@ -26,7 +26,6 @@ EXTRA_OECONF = " \ --disable-strip \ --disable-werror \ --target-list=${@get_qemu_target_list(d)} \ - --with-system-pixman \ --extra-cflags='${CFLAGS}' \ " EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch new file mode 100644 index 000000000..f1dbaffea --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch @@ -0,0 +1,719 @@ +From 5e9dd9063f514447ea4f54046793f4f01c297ed4 Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Sat, 31 Dec 2016 11:23:32 -0500 +Subject: [PATCH 4/4] Add support for VM suspend/resume for TPM TIS + +Extend the TPM TIS code to support suspend/resume. In case a command +is being processed by the external TPM when suspending, wait for the command +to complete to catch the result. In case the bottom half did not run, +run the one function the bottom half is supposed to run. This then +makes the resume operation work. + +The passthrough backend does not support suspend/resume operation +and is therefore blocked from suspend/resume and migration. + +The CUSE TPM's supported capabilities are tested and if sufficient +capabilities are implemented, suspend/resume, snapshotting and +migration are supported by the CUSE TPM. + +Signed-off-by: Stefan Berger + +Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html] +Signed-off-by: Patrick Ohly +--- + hw/tpm/tpm_passthrough.c | 130 +++++++++++++++++++++++-- + hw/tpm/tpm_tis.c | 137 +++++++++++++++++++++++++- + hw/tpm/tpm_tis.h | 2 + + hw/tpm/tpm_util.c | 223 +++++++++++++++++++++++++++++++++++++++++++ + hw/tpm/tpm_util.h | 7 ++ + include/sysemu/tpm_backend.h | 12 +++ + 6 files changed, 503 insertions(+), 8 deletions(-) + +diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c +index 44739ebad2..bc8072d0bc 100644 +--- a/hw/tpm/tpm_passthrough.c ++++ b/hw/tpm/tpm_passthrough.c +@@ -34,6 +34,8 @@ + #include "tpm_tis.h" + #include "tpm_util.h" + #include "tpm_ioctl.h" ++#include "migration/migration.h" ++#include "qapi/error.h" + + #define DEBUG_TPM 0 + +@@ -49,6 +51,7 @@ + #define TYPE_TPM_CUSE "tpm-cuse" + + static const TPMDriverOps tpm_passthrough_driver; ++static const VMStateDescription vmstate_tpm_cuse; + + /* data structures */ + typedef struct TPMPassthruThreadParams { +@@ -79,6 +82,10 @@ struct TPMPassthruState { + QemuMutex state_lock; + QemuCond cmd_complete; /* singnaled once tpm_busy is false */ + bool tpm_busy; ++ ++ Error *migration_blocker; ++ ++ TPMBlobBuffers tpm_blobs; + }; + + typedef struct TPMPassthruState TPMPassthruState; +@@ -306,6 +313,10 @@ static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt) + strerror(errno)); + } + } ++ if (tpm_pt->migration_blocker) { ++ migrate_del_blocker(tpm_pt->migration_blocker); ++ error_free(tpm_pt->migration_blocker); ++ } + } + + /* +@@ -360,12 +371,14 @@ static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt) + /* + * Initialize the external CUSE TPM + */ +-static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt) ++static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt, ++ bool is_resume) + { + int rc = 0; +- ptm_init init = { +- .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE, +- }; ++ ptm_init init; ++ if (is_resume) { ++ init.u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE; ++ } + + if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) { + if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) { +@@ -394,7 +407,7 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb) + tpm_passthrough_worker_thread, + &tpm_pt->tpm_thread_params); + +- tpm_passthrough_cuse_init(tpm_pt); ++ tpm_passthrough_cuse_init(tpm_pt, false); + + return 0; + } +@@ -466,6 +479,32 @@ static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb, + return rc; + } + ++static int tpm_cuse_get_state_blobs(TPMBackend *tb, ++ bool decrypted_blobs, ++ TPMBlobBuffers *tpm_blobs) ++{ ++ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); ++ ++ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)); ++ ++ return tpm_util_cuse_get_state_blobs(tpm_pt->tpm_fd, decrypted_blobs, ++ tpm_blobs); ++} ++ ++static int tpm_cuse_set_state_blobs(TPMBackend *tb, ++ TPMBlobBuffers *tpm_blobs) ++{ ++ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); ++ ++ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)); ++ ++ if (tpm_util_cuse_set_state_blobs(tpm_pt->tpm_fd, tpm_blobs)) { ++ return 1; ++ } ++ ++ return tpm_passthrough_cuse_init(tpm_pt, true); ++} ++ + static bool tpm_passthrough_get_startup_error(TPMBackend *tb) + { + TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); +@@ -488,7 +527,7 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb) + { + TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); + +- /* TPM considered busy once TPM Request scheduled for processing */ ++ /* TPM considered busy once TPM request scheduled for processing */ + qemu_mutex_lock(&tpm_pt->state_lock); + tpm_pt->tpm_busy = true; + qemu_mutex_unlock(&tpm_pt->state_lock); +@@ -601,6 +640,25 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb) + return fd; + } + ++static void tpm_passthrough_block_migration(TPMPassthruState *tpm_pt) ++{ ++ ptm_cap caps; ++ ++ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) { ++ caps = PTM_CAP_GET_STATEBLOB | PTM_CAP_SET_STATEBLOB | ++ PTM_CAP_STOP; ++ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) { ++ error_setg(&tpm_pt->migration_blocker, ++ "Migration disabled: CUSE TPM lacks necessary capabilities"); ++ migrate_add_blocker(tpm_pt->migration_blocker); ++ } ++ } else { ++ error_setg(&tpm_pt->migration_blocker, ++ "Migration disabled: Passthrough TPM does not support migration"); ++ migrate_add_blocker(tpm_pt->migration_blocker); ++ } ++} ++ + static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) + { + TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); +@@ -642,7 +700,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) + goto err_close_tpmdev; + } + /* init TPM for probing */ +- if (tpm_passthrough_cuse_init(tpm_pt)) { ++ if (tpm_passthrough_cuse_init(tpm_pt, false)) { + goto err_close_tpmdev; + } + } +@@ -659,6 +717,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) + } + } + ++ tpm_passthrough_block_migration(tpm_pt); + + return 0; + +@@ -766,10 +825,13 @@ static void tpm_passthrough_inst_init(Object *obj) + + qemu_mutex_init(&tpm_pt->state_lock); + qemu_cond_init(&tpm_pt->cmd_complete); ++ ++ vmstate_register(NULL, -1, &vmstate_tpm_cuse, obj); + } + + static void tpm_passthrough_inst_finalize(Object *obj) + { ++ vmstate_unregister(NULL, &vmstate_tpm_cuse, obj); + } + + static void tpm_passthrough_class_init(ObjectClass *klass, void *data) +@@ -802,6 +864,60 @@ static const char *tpm_passthrough_cuse_create_desc(void) + return "CUSE TPM backend driver"; + } + ++static void tpm_cuse_pre_save(void *opaque) ++{ ++ TPMPassthruState *tpm_pt = opaque; ++ TPMBackend *tb = &tpm_pt->parent; ++ ++ qemu_mutex_lock(&tpm_pt->state_lock); ++ /* wait for TPM to finish processing */ ++ if (tpm_pt->tpm_busy) { ++ qemu_cond_wait(&tpm_pt->cmd_complete, &tpm_pt->state_lock); ++ } ++ qemu_mutex_unlock(&tpm_pt->state_lock); ++ ++ /* get the decrypted state blobs from the TPM */ ++ tpm_cuse_get_state_blobs(tb, TRUE, &tpm_pt->tpm_blobs); ++} ++ ++static int tpm_cuse_post_load(void *opaque, ++ int version_id __attribute__((unused))) ++{ ++ TPMPassthruState *tpm_pt = opaque; ++ TPMBackend *tb = &tpm_pt->parent; ++ ++ return tpm_cuse_set_state_blobs(tb, &tpm_pt->tpm_blobs); ++} ++ ++static const VMStateDescription vmstate_tpm_cuse = { ++ .name = "cuse-tpm", ++ .version_id = 1, ++ .minimum_version_id = 0, ++ .minimum_version_id_old = 0, ++ .pre_save = tpm_cuse_pre_save, ++ .post_load = tpm_cuse_post_load, ++ .fields = (VMStateField[]) { ++ VMSTATE_UINT32(tpm_blobs.permanent_flags, TPMPassthruState), ++ VMSTATE_UINT32(tpm_blobs.permanent.size, TPMPassthruState), ++ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.permanent.buffer, ++ TPMPassthruState, 1, NULL, ++ tpm_blobs.permanent.size), ++ ++ VMSTATE_UINT32(tpm_blobs.volatil_flags, TPMPassthruState), ++ VMSTATE_UINT32(tpm_blobs.volatil.size, TPMPassthruState), ++ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.volatil.buffer, ++ TPMPassthruState, 1, NULL, ++ tpm_blobs.volatil.size), ++ ++ VMSTATE_UINT32(tpm_blobs.savestate_flags, TPMPassthruState), ++ VMSTATE_UINT32(tpm_blobs.savestate.size, TPMPassthruState), ++ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.savestate.buffer, ++ TPMPassthruState, 1, NULL, ++ tpm_blobs.savestate.size), ++ VMSTATE_END_OF_LIST() ++ } ++}; ++ + static const TPMDriverOps tpm_cuse_driver = { + .type = TPM_TYPE_CUSE_TPM, + .opts = tpm_passthrough_cmdline_opts, +diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c +index 14d9e83ea2..9b660cf737 100644 +--- a/hw/tpm/tpm_tis.c ++++ b/hw/tpm/tpm_tis.c +@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque) + TPMTISEmuState *tis = &s->s.tis; + uint8_t locty = s->locty_number; + ++ tis->bh_scheduled = false; ++ + qemu_mutex_lock(&s->state_lock); + + tpm_tis_sts_set(&tis->loc[locty], +@@ -415,6 +417,8 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty, + qemu_mutex_unlock(&s->state_lock); + + qemu_bh_schedule(tis->bh); ++ ++ tis->bh_scheduled = true; + } + + /* +@@ -1030,9 +1034,140 @@ static void tpm_tis_reset(DeviceState *dev) + tpm_tis_do_startup_tpm(s); + } + ++ ++/* persistent state handling */ ++ ++static void tpm_tis_pre_save(void *opaque) ++{ ++ TPMState *s = opaque; ++ TPMTISEmuState *tis = &s->s.tis; ++ uint8_t locty = tis->active_locty; ++ ++ DPRINTF("tpm_tis: suspend: locty = %d : r_offset = %d, w_offset = %d\n", ++ locty, tis->loc[0].r_offset, tis->loc[0].w_offset); ++#ifdef DEBUG_TIS ++ tpm_tis_dump_state(opaque, 0); ++#endif ++ ++ qemu_mutex_lock(&s->state_lock); ++ ++ /* wait for outstanding request to complete */ ++ if (TPM_TIS_IS_VALID_LOCTY(locty) && ++ tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) { ++ /* ++ * If we get here when the bh is scheduled but did not run, ++ * we won't get notified... ++ */ ++ if (!tis->bh_scheduled) { ++ /* backend thread to notify us */ ++ qemu_cond_wait(&s->cmd_complete, &s->state_lock); ++ } ++ if (tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) { ++ /* bottom half did not run - run its function */ ++ qemu_mutex_unlock(&s->state_lock); ++ tpm_tis_receive_bh(opaque); ++ qemu_mutex_lock(&s->state_lock); ++ } ++ } ++ ++ qemu_mutex_unlock(&s->state_lock); ++ ++ /* copy current active read or write buffer into the buffer ++ written to disk */ ++ if (TPM_TIS_IS_VALID_LOCTY(locty)) { ++ switch (tis->loc[locty].state) { ++ case TPM_TIS_STATE_RECEPTION: ++ memcpy(tis->buf, ++ tis->loc[locty].w_buffer.buffer, ++ MIN(sizeof(tis->buf), ++ tis->loc[locty].w_buffer.size)); ++ tis->offset = tis->loc[locty].w_offset; ++ break; ++ case TPM_TIS_STATE_COMPLETION: ++ memcpy(tis->buf, ++ tis->loc[locty].r_buffer.buffer, ++ MIN(sizeof(tis->buf), ++ tis->loc[locty].r_buffer.size)); ++ tis->offset = tis->loc[locty].r_offset; ++ break; ++ default: ++ /* leak nothing */ ++ memset(tis->buf, 0x0, sizeof(tis->buf)); ++ break; ++ } ++ } ++} ++ ++static int tpm_tis_post_load(void *opaque, ++ int version_id __attribute__((unused))) ++{ ++ TPMState *s = opaque; ++ TPMTISEmuState *tis = &s->s.tis; ++ ++ uint8_t locty = tis->active_locty; ++ ++ if (TPM_TIS_IS_VALID_LOCTY(locty)) { ++ switch (tis->loc[locty].state) { ++ case TPM_TIS_STATE_RECEPTION: ++ memcpy(tis->loc[locty].w_buffer.buffer, ++ tis->buf, ++ MIN(sizeof(tis->buf), ++ tis->loc[locty].w_buffer.size)); ++ tis->loc[locty].w_offset = tis->offset; ++ break; ++ case TPM_TIS_STATE_COMPLETION: ++ memcpy(tis->loc[locty].r_buffer.buffer, ++ tis->buf, ++ MIN(sizeof(tis->buf), ++ tis->loc[locty].r_buffer.size)); ++ tis->loc[locty].r_offset = tis->offset; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ DPRINTF("tpm_tis: resume : locty = %d : r_offset = %d, w_offset = %d\n", ++ locty, tis->loc[0].r_offset, tis->loc[0].w_offset); ++ ++ return 0; ++} ++ ++static const VMStateDescription vmstate_locty = { ++ .name = "loc", ++ .version_id = 1, ++ .minimum_version_id = 0, ++ .minimum_version_id_old = 0, ++ .fields = (VMStateField[]) { ++ VMSTATE_UINT32(state, TPMLocality), ++ VMSTATE_UINT32(inte, TPMLocality), ++ VMSTATE_UINT32(ints, TPMLocality), ++ VMSTATE_UINT8(access, TPMLocality), ++ VMSTATE_UINT32(sts, TPMLocality), ++ VMSTATE_UINT32(iface_id, TPMLocality), ++ VMSTATE_END_OF_LIST(), ++ } ++}; ++ + static const VMStateDescription vmstate_tpm_tis = { + .name = "tpm", +- .unmigratable = 1, ++ .version_id = 1, ++ .minimum_version_id = 0, ++ .minimum_version_id_old = 0, ++ .pre_save = tpm_tis_pre_save, ++ .post_load = tpm_tis_post_load, ++ .fields = (VMStateField[]) { ++ VMSTATE_UINT32(s.tis.offset, TPMState), ++ VMSTATE_BUFFER(s.tis.buf, TPMState), ++ VMSTATE_UINT8(s.tis.active_locty, TPMState), ++ VMSTATE_UINT8(s.tis.aborting_locty, TPMState), ++ VMSTATE_UINT8(s.tis.next_locty, TPMState), ++ ++ VMSTATE_STRUCT_ARRAY(s.tis.loc, TPMState, TPM_TIS_NUM_LOCALITIES, 1, ++ vmstate_locty, TPMLocality), ++ ++ VMSTATE_END_OF_LIST() ++ } + }; + + static Property tpm_tis_properties[] = { +diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h +index a1df41fa21..b7fc0ea1a9 100644 +--- a/hw/tpm/tpm_tis.h ++++ b/hw/tpm/tpm_tis.h +@@ -54,6 +54,8 @@ typedef struct TPMLocality { + + typedef struct TPMTISEmuState { + QEMUBH *bh; ++ bool bh_scheduled; /* bh scheduled but did not run yet */ ++ + uint32_t offset; + uint8_t buf[TPM_TIS_BUFFER_MAX]; + +diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c +index 7b35429725..b6ff74d946 100644 +--- a/hw/tpm/tpm_util.c ++++ b/hw/tpm/tpm_util.c +@@ -22,6 +22,17 @@ + #include "qemu/osdep.h" + #include "tpm_util.h" + #include "tpm_int.h" ++#include "tpm_ioctl.h" ++#include "qemu/error-report.h" ++ ++#define DEBUG_TPM 0 ++ ++#define DPRINTF(fmt, ...) do { \ ++ if (DEBUG_TPM) { \ ++ fprintf(stderr, fmt, ## __VA_ARGS__); \ ++ } \ ++} while (0) ++ + + /* + * A basic test of a TPM device. We expect a well formatted response header +@@ -125,3 +136,215 @@ int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version) + + return 1; + } ++ ++static void tpm_sized_buffer_reset(TPMSizedBuffer *tsb) ++{ ++ g_free(tsb->buffer); ++ tsb->buffer = NULL; ++ tsb->size = 0; ++} ++ ++/* ++ * Transfer a TPM state blob from the TPM into a provided buffer. ++ * ++ * @fd: file descriptor to talk to the CUSE TPM ++ * @type: the type of blob to transfer ++ * @decrypted_blob: whether we request to receive decrypted blobs ++ * @tsb: the TPMSizeBuffer to fill with the blob ++ * @flags: the flags to return to the caller ++ */ ++static int tpm_util_cuse_get_state_blob(int fd, ++ uint8_t type, ++ bool decrypted_blob, ++ TPMSizedBuffer *tsb, ++ uint32_t *flags) ++{ ++ ptm_getstate pgs; ++ uint16_t offset = 0; ++ ptm_res res; ++ ssize_t n; ++ size_t to_read; ++ ++ tpm_sized_buffer_reset(tsb); ++ ++ pgs.u.req.state_flags = (decrypted_blob) ? PTM_STATE_FLAG_DECRYPTED : 0; ++ pgs.u.req.type = type; ++ pgs.u.req.offset = offset; ++ ++ if (ioctl(fd, PTM_GET_STATEBLOB, &pgs) < 0) { ++ error_report("CUSE TPM PTM_GET_STATEBLOB ioctl failed: %s", ++ strerror(errno)); ++ goto err_exit; ++ } ++ res = pgs.u.resp.tpm_result; ++ if (res != 0 && (res & 0x800) == 0) { ++ error_report("Getting the stateblob (type %d) failed with a TPM " ++ "error 0x%x", type, res); ++ goto err_exit; ++ } ++ ++ *flags = pgs.u.resp.state_flags; ++ ++ tsb->buffer = g_malloc(pgs.u.resp.totlength); ++ memcpy(tsb->buffer, pgs.u.resp.data, pgs.u.resp.length); ++ tsb->size = pgs.u.resp.length; ++ ++ /* if there are bytes left to get use read() interface */ ++ while (tsb->size < pgs.u.resp.totlength) { ++ to_read = pgs.u.resp.totlength - tsb->size; ++ if (unlikely(to_read > SSIZE_MAX)) { ++ to_read = SSIZE_MAX; ++ } ++ ++ n = read(fd, &tsb->buffer[tsb->size], to_read); ++ if (n != to_read) { ++ error_report("Could not read stateblob (type %d) : %s", ++ type, strerror(errno)); ++ goto err_exit; ++ } ++ tsb->size += to_read; ++ } ++ ++ DPRINTF("tpm_util: got state blob type %d, %d bytes, flags 0x%08x, " ++ "decrypted=%d\n", type, tsb->size, *flags, decrypted_blob); ++ ++ return 0; ++ ++err_exit: ++ return 1; ++} ++ ++int tpm_util_cuse_get_state_blobs(int tpm_fd, ++ bool decrypted_blobs, ++ TPMBlobBuffers *tpm_blobs) ++{ ++ if (tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT, ++ decrypted_blobs, ++ &tpm_blobs->permanent, ++ &tpm_blobs->permanent_flags) || ++ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE, ++ decrypted_blobs, ++ &tpm_blobs->volatil, ++ &tpm_blobs->volatil_flags) || ++ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE, ++ decrypted_blobs, ++ &tpm_blobs->savestate, ++ &tpm_blobs->savestate_flags)) { ++ goto err_exit; ++ } ++ ++ return 0; ++ ++ err_exit: ++ tpm_sized_buffer_reset(&tpm_blobs->volatil); ++ tpm_sized_buffer_reset(&tpm_blobs->permanent); ++ tpm_sized_buffer_reset(&tpm_blobs->savestate); ++ ++ return 1; ++} ++ ++static int tpm_util_cuse_do_set_stateblob_ioctl(int fd, ++ uint32_t flags, ++ uint32_t type, ++ uint32_t length) ++{ ++ ptm_setstate pss; ++ ++ pss.u.req.state_flags = flags; ++ pss.u.req.type = type; ++ pss.u.req.length = length; ++ ++ if (ioctl(fd, PTM_SET_STATEBLOB, &pss) < 0) { ++ error_report("CUSE TPM PTM_SET_STATEBLOB ioctl failed: %s", ++ strerror(errno)); ++ return 1; ++ } ++ ++ if (pss.u.resp.tpm_result != 0) { ++ error_report("Setting the stateblob (type %d) failed with a TPM " ++ "error 0x%x", type, pss.u.resp.tpm_result); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ ++/* ++ * Transfer a TPM state blob to the CUSE TPM. ++ * ++ * @fd: file descriptor to talk to the CUSE TPM ++ * @type: the type of TPM state blob to transfer ++ * @tsb: TPMSizeBuffer containing the TPM state blob ++ * @flags: Flags describing the (encryption) state of the TPM state blob ++ */ ++static int tpm_util_cuse_set_state_blob(int fd, ++ uint32_t type, ++ TPMSizedBuffer *tsb, ++ uint32_t flags) ++{ ++ uint32_t offset = 0; ++ ssize_t n; ++ size_t to_write; ++ ++ /* initiate the transfer to the CUSE TPM */ ++ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) { ++ return 1; ++ } ++ ++ /* use the write() interface for transferring the state blob */ ++ while (offset < tsb->size) { ++ to_write = tsb->size - offset; ++ if (unlikely(to_write > SSIZE_MAX)) { ++ to_write = SSIZE_MAX; ++ } ++ ++ n = write(fd, &tsb->buffer[offset], to_write); ++ if (n != to_write) { ++ error_report("Writing the stateblob (type %d) failed: %s", ++ type, strerror(errno)); ++ goto err_exit; ++ } ++ offset += to_write; ++ } ++ ++ /* inidicate that the transfer is finished */ ++ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) { ++ goto err_exit; ++ } ++ ++ DPRINTF("tpm_util: set the state blob type %d, %d bytes, flags 0x%08x\n", ++ type, tsb->size, flags); ++ ++ return 0; ++ ++err_exit: ++ return 1; ++} ++ ++int tpm_util_cuse_set_state_blobs(int tpm_fd, ++ TPMBlobBuffers *tpm_blobs) ++{ ++ ptm_res res; ++ ++ if (ioctl(tpm_fd, PTM_STOP, &res) < 0) { ++ error_report("tpm_passthrough: Could not stop " ++ "the CUSE TPM: %s (%i)", ++ strerror(errno), errno); ++ return 1; ++ } ++ ++ if (tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT, ++ &tpm_blobs->permanent, ++ tpm_blobs->permanent_flags) || ++ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE, ++ &tpm_blobs->volatil, ++ tpm_blobs->volatil_flags) || ++ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE, ++ &tpm_blobs->savestate, ++ tpm_blobs->savestate_flags)) { ++ return 1; ++ } ++ ++ return 0; ++} +diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h +index df76245e6e..c24071d812 100644 +--- a/hw/tpm/tpm_util.h ++++ b/hw/tpm/tpm_util.h +@@ -26,4 +26,11 @@ + + int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version); + ++int tpm_util_cuse_get_state_blobs(int tpm_fd, ++ bool decrypted_blobs, ++ TPMBlobBuffers *tpm_blobs); ++ ++int tpm_util_cuse_set_state_blobs(int tpm_fd, ++ TPMBlobBuffers *tpm_blobs); ++ + #endif /* TPM_TPM_UTIL_H */ +diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h +index b58f52d39f..3403821b9d 100644 +--- a/include/sysemu/tpm_backend.h ++++ b/include/sysemu/tpm_backend.h +@@ -62,6 +62,18 @@ typedef struct TPMSizedBuffer { + uint8_t *buffer; + } TPMSizedBuffer; + ++/* blobs from the TPM; part of VM state when migrating */ ++typedef struct TPMBlobBuffers { ++ uint32_t permanent_flags; ++ TPMSizedBuffer permanent; ++ ++ uint32_t volatil_flags; ++ TPMSizedBuffer volatil; ++ ++ uint32_t savestate_flags; ++ TPMSizedBuffer savestate; ++} TPMBlobBuffers; ++ + struct TPMDriverOps { + enum TpmType type; + const QemuOptDesc *opts; +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch deleted file mode 100644 index b8a783d4e..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch +++ /dev/null @@ -1,719 +0,0 @@ -From 5e9dd9063f514447ea4f54046793f4f01c297ed4 Mon Sep 17 00:00:00 2001 -From: Stefan Berger -Date: Sat, 31 Dec 2016 11:23:32 -0500 -Subject: [PATCH 4/4] Add support for VM suspend/resume for TPM TIS - -Extend the TPM TIS code to support suspend/resume. In case a command -is being processed by the external TPM when suspending, wait for the command -to complete to catch the result. In case the bottom half did not run, -run the one function the bottom half is supposed to run. This then -makes the resume operation work. - -The passthrough backend does not support suspend/resume operation -and is therefore blocked from suspend/resume and migration. - -The CUSE TPM's supported capabilities are tested and if sufficient -capabilities are implemented, suspend/resume, snapshotting and -migration are supported by the CUSE TPM. - -Signed-off-by: Stefan Berger - -Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html] -Signed-off-by: Patrick Ohly ---- - hw/tpm/tpm_passthrough.c | 130 +++++++++++++++++++++++-- - hw/tpm/tpm_tis.c | 137 +++++++++++++++++++++++++- - hw/tpm/tpm_tis.h | 2 + - hw/tpm/tpm_util.c | 223 +++++++++++++++++++++++++++++++++++++++++++ - hw/tpm/tpm_util.h | 7 ++ - include/sysemu/tpm_backend.h | 12 +++ - 6 files changed, 503 insertions(+), 8 deletions(-) - -diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c -index 44739ebad2..bc8072d0bc 100644 ---- a/hw/tpm/tpm_passthrough.c -+++ b/hw/tpm/tpm_passthrough.c -@@ -34,6 +34,8 @@ - #include "tpm_tis.h" - #include "tpm_util.h" - #include "tpm_ioctl.h" -+#include "migration/migration.h" -+#include "qapi/error.h" - - #define DEBUG_TPM 0 - -@@ -49,6 +51,7 @@ - #define TYPE_TPM_CUSE "tpm-cuse" - - static const TPMDriverOps tpm_passthrough_driver; -+static const VMStateDescription vmstate_tpm_cuse; - - /* data structures */ - typedef struct TPMPassthruThreadParams { -@@ -79,6 +82,10 @@ struct TPMPassthruState { - QemuMutex state_lock; - QemuCond cmd_complete; /* singnaled once tpm_busy is false */ - bool tpm_busy; -+ -+ Error *migration_blocker; -+ -+ TPMBlobBuffers tpm_blobs; - }; - - typedef struct TPMPassthruState TPMPassthruState; -@@ -306,6 +313,10 @@ static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt) - strerror(errno)); - } - } -+ if (tpm_pt->migration_blocker) { -+ migrate_del_blocker(tpm_pt->migration_blocker); -+ error_free(tpm_pt->migration_blocker); -+ } - } - - /* -@@ -360,12 +371,14 @@ static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt) - /* - * Initialize the external CUSE TPM - */ --static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt) -+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt, -+ bool is_resume) - { - int rc = 0; -- ptm_init init = { -- .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE, -- }; -+ ptm_init init; -+ if (is_resume) { -+ init.u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE; -+ } - - if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) { - if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) { -@@ -394,7 +407,7 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb) - tpm_passthrough_worker_thread, - &tpm_pt->tpm_thread_params); - -- tpm_passthrough_cuse_init(tpm_pt); -+ tpm_passthrough_cuse_init(tpm_pt, false); - - return 0; - } -@@ -466,6 +479,32 @@ static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb, - return rc; - } - -+static int tpm_cuse_get_state_blobs(TPMBackend *tb, -+ bool decrypted_blobs, -+ TPMBlobBuffers *tpm_blobs) -+{ -+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); -+ -+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)); -+ -+ return tpm_util_cuse_get_state_blobs(tpm_pt->tpm_fd, decrypted_blobs, -+ tpm_blobs); -+} -+ -+static int tpm_cuse_set_state_blobs(TPMBackend *tb, -+ TPMBlobBuffers *tpm_blobs) -+{ -+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); -+ -+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)); -+ -+ if (tpm_util_cuse_set_state_blobs(tpm_pt->tpm_fd, tpm_blobs)) { -+ return 1; -+ } -+ -+ return tpm_passthrough_cuse_init(tpm_pt, true); -+} -+ - static bool tpm_passthrough_get_startup_error(TPMBackend *tb) - { - TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); -@@ -488,7 +527,7 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb) - { - TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); - -- /* TPM considered busy once TPM Request scheduled for processing */ -+ /* TPM considered busy once TPM request scheduled for processing */ - qemu_mutex_lock(&tpm_pt->state_lock); - tpm_pt->tpm_busy = true; - qemu_mutex_unlock(&tpm_pt->state_lock); -@@ -601,6 +640,25 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb) - return fd; - } - -+static void tpm_passthrough_block_migration(TPMPassthruState *tpm_pt) -+{ -+ ptm_cap caps; -+ -+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) { -+ caps = PTM_CAP_GET_STATEBLOB | PTM_CAP_SET_STATEBLOB | -+ PTM_CAP_STOP; -+ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) { -+ error_setg(&tpm_pt->migration_blocker, -+ "Migration disabled: CUSE TPM lacks necessary capabilities"); -+ migrate_add_blocker(tpm_pt->migration_blocker); -+ } -+ } else { -+ error_setg(&tpm_pt->migration_blocker, -+ "Migration disabled: Passthrough TPM does not support migration"); -+ migrate_add_blocker(tpm_pt->migration_blocker); -+ } -+} -+ - static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) - { - TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb); -@@ -642,7 +700,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) - goto err_close_tpmdev; - } - /* init TPM for probing */ -- if (tpm_passthrough_cuse_init(tpm_pt)) { -+ if (tpm_passthrough_cuse_init(tpm_pt, false)) { - goto err_close_tpmdev; - } - } -@@ -659,6 +717,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) - } - } - -+ tpm_passthrough_block_migration(tpm_pt); - - return 0; - -@@ -766,10 +825,13 @@ static void tpm_passthrough_inst_init(Object *obj) - - qemu_mutex_init(&tpm_pt->state_lock); - qemu_cond_init(&tpm_pt->cmd_complete); -+ -+ vmstate_register(NULL, -1, &vmstate_tpm_cuse, obj); - } - - static void tpm_passthrough_inst_finalize(Object *obj) - { -+ vmstate_unregister(NULL, &vmstate_tpm_cuse, obj); - } - - static void tpm_passthrough_class_init(ObjectClass *klass, void *data) -@@ -802,6 +864,60 @@ static const char *tpm_passthrough_cuse_create_desc(void) - return "CUSE TPM backend driver"; - } - -+static void tpm_cuse_pre_save(void *opaque) -+{ -+ TPMPassthruState *tpm_pt = opaque; -+ TPMBackend *tb = &tpm_pt->parent; -+ -+ qemu_mutex_lock(&tpm_pt->state_lock); -+ /* wait for TPM to finish processing */ -+ if (tpm_pt->tpm_busy) { -+ qemu_cond_wait(&tpm_pt->cmd_complete, &tpm_pt->state_lock); -+ } -+ qemu_mutex_unlock(&tpm_pt->state_lock); -+ -+ /* get the decrypted state blobs from the TPM */ -+ tpm_cuse_get_state_blobs(tb, TRUE, &tpm_pt->tpm_blobs); -+} -+ -+static int tpm_cuse_post_load(void *opaque, -+ int version_id __attribute__((unused))) -+{ -+ TPMPassthruState *tpm_pt = opaque; -+ TPMBackend *tb = &tpm_pt->parent; -+ -+ return tpm_cuse_set_state_blobs(tb, &tpm_pt->tpm_blobs); -+} -+ -+static const VMStateDescription vmstate_tpm_cuse = { -+ .name = "cuse-tpm", -+ .version_id = 1, -+ .minimum_version_id = 0, -+ .minimum_version_id_old = 0, -+ .pre_save = tpm_cuse_pre_save, -+ .post_load = tpm_cuse_post_load, -+ .fields = (VMStateField[]) { -+ VMSTATE_UINT32(tpm_blobs.permanent_flags, TPMPassthruState), -+ VMSTATE_UINT32(tpm_blobs.permanent.size, TPMPassthruState), -+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.permanent.buffer, -+ TPMPassthruState, 1, NULL, 0, -+ tpm_blobs.permanent.size), -+ -+ VMSTATE_UINT32(tpm_blobs.volatil_flags, TPMPassthruState), -+ VMSTATE_UINT32(tpm_blobs.volatil.size, TPMPassthruState), -+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.volatil.buffer, -+ TPMPassthruState, 1, NULL, 0, -+ tpm_blobs.volatil.size), -+ -+ VMSTATE_UINT32(tpm_blobs.savestate_flags, TPMPassthruState), -+ VMSTATE_UINT32(tpm_blobs.savestate.size, TPMPassthruState), -+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.savestate.buffer, -+ TPMPassthruState, 1, NULL, 0, -+ tpm_blobs.savestate.size), -+ VMSTATE_END_OF_LIST() -+ } -+}; -+ - static const TPMDriverOps tpm_cuse_driver = { - .type = TPM_TYPE_CUSE_TPM, - .opts = tpm_passthrough_cmdline_opts, -diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c -index 14d9e83ea2..9b660cf737 100644 ---- a/hw/tpm/tpm_tis.c -+++ b/hw/tpm/tpm_tis.c -@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque) - TPMTISEmuState *tis = &s->s.tis; - uint8_t locty = s->locty_number; - -+ tis->bh_scheduled = false; -+ - qemu_mutex_lock(&s->state_lock); - - tpm_tis_sts_set(&tis->loc[locty], -@@ -415,6 +417,8 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty, - qemu_mutex_unlock(&s->state_lock); - - qemu_bh_schedule(tis->bh); -+ -+ tis->bh_scheduled = true; - } - - /* -@@ -1030,9 +1034,140 @@ static void tpm_tis_reset(DeviceState *dev) - tpm_tis_do_startup_tpm(s); - } - -+ -+/* persistent state handling */ -+ -+static void tpm_tis_pre_save(void *opaque) -+{ -+ TPMState *s = opaque; -+ TPMTISEmuState *tis = &s->s.tis; -+ uint8_t locty = tis->active_locty; -+ -+ DPRINTF("tpm_tis: suspend: locty = %d : r_offset = %d, w_offset = %d\n", -+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset); -+#ifdef DEBUG_TIS -+ tpm_tis_dump_state(opaque, 0); -+#endif -+ -+ qemu_mutex_lock(&s->state_lock); -+ -+ /* wait for outstanding request to complete */ -+ if (TPM_TIS_IS_VALID_LOCTY(locty) && -+ tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) { -+ /* -+ * If we get here when the bh is scheduled but did not run, -+ * we won't get notified... -+ */ -+ if (!tis->bh_scheduled) { -+ /* backend thread to notify us */ -+ qemu_cond_wait(&s->cmd_complete, &s->state_lock); -+ } -+ if (tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) { -+ /* bottom half did not run - run its function */ -+ qemu_mutex_unlock(&s->state_lock); -+ tpm_tis_receive_bh(opaque); -+ qemu_mutex_lock(&s->state_lock); -+ } -+ } -+ -+ qemu_mutex_unlock(&s->state_lock); -+ -+ /* copy current active read or write buffer into the buffer -+ written to disk */ -+ if (TPM_TIS_IS_VALID_LOCTY(locty)) { -+ switch (tis->loc[locty].state) { -+ case TPM_TIS_STATE_RECEPTION: -+ memcpy(tis->buf, -+ tis->loc[locty].w_buffer.buffer, -+ MIN(sizeof(tis->buf), -+ tis->loc[locty].w_buffer.size)); -+ tis->offset = tis->loc[locty].w_offset; -+ break; -+ case TPM_TIS_STATE_COMPLETION: -+ memcpy(tis->buf, -+ tis->loc[locty].r_buffer.buffer, -+ MIN(sizeof(tis->buf), -+ tis->loc[locty].r_buffer.size)); -+ tis->offset = tis->loc[locty].r_offset; -+ break; -+ default: -+ /* leak nothing */ -+ memset(tis->buf, 0x0, sizeof(tis->buf)); -+ break; -+ } -+ } -+} -+ -+static int tpm_tis_post_load(void *opaque, -+ int version_id __attribute__((unused))) -+{ -+ TPMState *s = opaque; -+ TPMTISEmuState *tis = &s->s.tis; -+ -+ uint8_t locty = tis->active_locty; -+ -+ if (TPM_TIS_IS_VALID_LOCTY(locty)) { -+ switch (tis->loc[locty].state) { -+ case TPM_TIS_STATE_RECEPTION: -+ memcpy(tis->loc[locty].w_buffer.buffer, -+ tis->buf, -+ MIN(sizeof(tis->buf), -+ tis->loc[locty].w_buffer.size)); -+ tis->loc[locty].w_offset = tis->offset; -+ break; -+ case TPM_TIS_STATE_COMPLETION: -+ memcpy(tis->loc[locty].r_buffer.buffer, -+ tis->buf, -+ MIN(sizeof(tis->buf), -+ tis->loc[locty].r_buffer.size)); -+ tis->loc[locty].r_offset = tis->offset; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ DPRINTF("tpm_tis: resume : locty = %d : r_offset = %d, w_offset = %d\n", -+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset); -+ -+ return 0; -+} -+ -+static const VMStateDescription vmstate_locty = { -+ .name = "loc", -+ .version_id = 1, -+ .minimum_version_id = 0, -+ .minimum_version_id_old = 0, -+ .fields = (VMStateField[]) { -+ VMSTATE_UINT32(state, TPMLocality), -+ VMSTATE_UINT32(inte, TPMLocality), -+ VMSTATE_UINT32(ints, TPMLocality), -+ VMSTATE_UINT8(access, TPMLocality), -+ VMSTATE_UINT32(sts, TPMLocality), -+ VMSTATE_UINT32(iface_id, TPMLocality), -+ VMSTATE_END_OF_LIST(), -+ } -+}; -+ - static const VMStateDescription vmstate_tpm_tis = { - .name = "tpm", -- .unmigratable = 1, -+ .version_id = 1, -+ .minimum_version_id = 0, -+ .minimum_version_id_old = 0, -+ .pre_save = tpm_tis_pre_save, -+ .post_load = tpm_tis_post_load, -+ .fields = (VMStateField[]) { -+ VMSTATE_UINT32(s.tis.offset, TPMState), -+ VMSTATE_BUFFER(s.tis.buf, TPMState), -+ VMSTATE_UINT8(s.tis.active_locty, TPMState), -+ VMSTATE_UINT8(s.tis.aborting_locty, TPMState), -+ VMSTATE_UINT8(s.tis.next_locty, TPMState), -+ -+ VMSTATE_STRUCT_ARRAY(s.tis.loc, TPMState, TPM_TIS_NUM_LOCALITIES, 1, -+ vmstate_locty, TPMLocality), -+ -+ VMSTATE_END_OF_LIST() -+ } - }; - - static Property tpm_tis_properties[] = { -diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h -index a1df41fa21..b7fc0ea1a9 100644 ---- a/hw/tpm/tpm_tis.h -+++ b/hw/tpm/tpm_tis.h -@@ -54,6 +54,8 @@ typedef struct TPMLocality { - - typedef struct TPMTISEmuState { - QEMUBH *bh; -+ bool bh_scheduled; /* bh scheduled but did not run yet */ -+ - uint32_t offset; - uint8_t buf[TPM_TIS_BUFFER_MAX]; - -diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c -index 7b35429725..b6ff74d946 100644 ---- a/hw/tpm/tpm_util.c -+++ b/hw/tpm/tpm_util.c -@@ -22,6 +22,17 @@ - #include "qemu/osdep.h" - #include "tpm_util.h" - #include "tpm_int.h" -+#include "tpm_ioctl.h" -+#include "qemu/error-report.h" -+ -+#define DEBUG_TPM 0 -+ -+#define DPRINTF(fmt, ...) do { \ -+ if (DEBUG_TPM) { \ -+ fprintf(stderr, fmt, ## __VA_ARGS__); \ -+ } \ -+} while (0) -+ - - /* - * A basic test of a TPM device. We expect a well formatted response header -@@ -125,3 +136,215 @@ int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version) - - return 1; - } -+ -+static void tpm_sized_buffer_reset(TPMSizedBuffer *tsb) -+{ -+ g_free(tsb->buffer); -+ tsb->buffer = NULL; -+ tsb->size = 0; -+} -+ -+/* -+ * Transfer a TPM state blob from the TPM into a provided buffer. -+ * -+ * @fd: file descriptor to talk to the CUSE TPM -+ * @type: the type of blob to transfer -+ * @decrypted_blob: whether we request to receive decrypted blobs -+ * @tsb: the TPMSizeBuffer to fill with the blob -+ * @flags: the flags to return to the caller -+ */ -+static int tpm_util_cuse_get_state_blob(int fd, -+ uint8_t type, -+ bool decrypted_blob, -+ TPMSizedBuffer *tsb, -+ uint32_t *flags) -+{ -+ ptm_getstate pgs; -+ uint16_t offset = 0; -+ ptm_res res; -+ ssize_t n; -+ size_t to_read; -+ -+ tpm_sized_buffer_reset(tsb); -+ -+ pgs.u.req.state_flags = (decrypted_blob) ? PTM_STATE_FLAG_DECRYPTED : 0; -+ pgs.u.req.type = type; -+ pgs.u.req.offset = offset; -+ -+ if (ioctl(fd, PTM_GET_STATEBLOB, &pgs) < 0) { -+ error_report("CUSE TPM PTM_GET_STATEBLOB ioctl failed: %s", -+ strerror(errno)); -+ goto err_exit; -+ } -+ res = pgs.u.resp.tpm_result; -+ if (res != 0 && (res & 0x800) == 0) { -+ error_report("Getting the stateblob (type %d) failed with a TPM " -+ "error 0x%x", type, res); -+ goto err_exit; -+ } -+ -+ *flags = pgs.u.resp.state_flags; -+ -+ tsb->buffer = g_malloc(pgs.u.resp.totlength); -+ memcpy(tsb->buffer, pgs.u.resp.data, pgs.u.resp.length); -+ tsb->size = pgs.u.resp.length; -+ -+ /* if there are bytes left to get use read() interface */ -+ while (tsb->size < pgs.u.resp.totlength) { -+ to_read = pgs.u.resp.totlength - tsb->size; -+ if (unlikely(to_read > SSIZE_MAX)) { -+ to_read = SSIZE_MAX; -+ } -+ -+ n = read(fd, &tsb->buffer[tsb->size], to_read); -+ if (n != to_read) { -+ error_report("Could not read stateblob (type %d) : %s", -+ type, strerror(errno)); -+ goto err_exit; -+ } -+ tsb->size += to_read; -+ } -+ -+ DPRINTF("tpm_util: got state blob type %d, %d bytes, flags 0x%08x, " -+ "decrypted=%d\n", type, tsb->size, *flags, decrypted_blob); -+ -+ return 0; -+ -+err_exit: -+ return 1; -+} -+ -+int tpm_util_cuse_get_state_blobs(int tpm_fd, -+ bool decrypted_blobs, -+ TPMBlobBuffers *tpm_blobs) -+{ -+ if (tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT, -+ decrypted_blobs, -+ &tpm_blobs->permanent, -+ &tpm_blobs->permanent_flags) || -+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE, -+ decrypted_blobs, -+ &tpm_blobs->volatil, -+ &tpm_blobs->volatil_flags) || -+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE, -+ decrypted_blobs, -+ &tpm_blobs->savestate, -+ &tpm_blobs->savestate_flags)) { -+ goto err_exit; -+ } -+ -+ return 0; -+ -+ err_exit: -+ tpm_sized_buffer_reset(&tpm_blobs->volatil); -+ tpm_sized_buffer_reset(&tpm_blobs->permanent); -+ tpm_sized_buffer_reset(&tpm_blobs->savestate); -+ -+ return 1; -+} -+ -+static int tpm_util_cuse_do_set_stateblob_ioctl(int fd, -+ uint32_t flags, -+ uint32_t type, -+ uint32_t length) -+{ -+ ptm_setstate pss; -+ -+ pss.u.req.state_flags = flags; -+ pss.u.req.type = type; -+ pss.u.req.length = length; -+ -+ if (ioctl(fd, PTM_SET_STATEBLOB, &pss) < 0) { -+ error_report("CUSE TPM PTM_SET_STATEBLOB ioctl failed: %s", -+ strerror(errno)); -+ return 1; -+ } -+ -+ if (pss.u.resp.tpm_result != 0) { -+ error_report("Setting the stateblob (type %d) failed with a TPM " -+ "error 0x%x", type, pss.u.resp.tpm_result); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+ -+/* -+ * Transfer a TPM state blob to the CUSE TPM. -+ * -+ * @fd: file descriptor to talk to the CUSE TPM -+ * @type: the type of TPM state blob to transfer -+ * @tsb: TPMSizeBuffer containing the TPM state blob -+ * @flags: Flags describing the (encryption) state of the TPM state blob -+ */ -+static int tpm_util_cuse_set_state_blob(int fd, -+ uint32_t type, -+ TPMSizedBuffer *tsb, -+ uint32_t flags) -+{ -+ uint32_t offset = 0; -+ ssize_t n; -+ size_t to_write; -+ -+ /* initiate the transfer to the CUSE TPM */ -+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) { -+ return 1; -+ } -+ -+ /* use the write() interface for transferring the state blob */ -+ while (offset < tsb->size) { -+ to_write = tsb->size - offset; -+ if (unlikely(to_write > SSIZE_MAX)) { -+ to_write = SSIZE_MAX; -+ } -+ -+ n = write(fd, &tsb->buffer[offset], to_write); -+ if (n != to_write) { -+ error_report("Writing the stateblob (type %d) failed: %s", -+ type, strerror(errno)); -+ goto err_exit; -+ } -+ offset += to_write; -+ } -+ -+ /* inidicate that the transfer is finished */ -+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) { -+ goto err_exit; -+ } -+ -+ DPRINTF("tpm_util: set the state blob type %d, %d bytes, flags 0x%08x\n", -+ type, tsb->size, flags); -+ -+ return 0; -+ -+err_exit: -+ return 1; -+} -+ -+int tpm_util_cuse_set_state_blobs(int tpm_fd, -+ TPMBlobBuffers *tpm_blobs) -+{ -+ ptm_res res; -+ -+ if (ioctl(tpm_fd, PTM_STOP, &res) < 0) { -+ error_report("tpm_passthrough: Could not stop " -+ "the CUSE TPM: %s (%i)", -+ strerror(errno), errno); -+ return 1; -+ } -+ -+ if (tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT, -+ &tpm_blobs->permanent, -+ tpm_blobs->permanent_flags) || -+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE, -+ &tpm_blobs->volatil, -+ tpm_blobs->volatil_flags) || -+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE, -+ &tpm_blobs->savestate, -+ tpm_blobs->savestate_flags)) { -+ return 1; -+ } -+ -+ return 0; -+} -diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h -index df76245e6e..c24071d812 100644 ---- a/hw/tpm/tpm_util.h -+++ b/hw/tpm/tpm_util.h -@@ -26,4 +26,11 @@ - - int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version); - -+int tpm_util_cuse_get_state_blobs(int tpm_fd, -+ bool decrypted_blobs, -+ TPMBlobBuffers *tpm_blobs); -+ -+int tpm_util_cuse_set_state_blobs(int tpm_fd, -+ TPMBlobBuffers *tpm_blobs); -+ - #endif /* TPM_TPM_UTIL_H */ -diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h -index b58f52d39f..3403821b9d 100644 ---- a/include/sysemu/tpm_backend.h -+++ b/include/sysemu/tpm_backend.h -@@ -62,6 +62,18 @@ typedef struct TPMSizedBuffer { - uint8_t *buffer; - } TPMSizedBuffer; - -+/* blobs from the TPM; part of VM state when migrating */ -+typedef struct TPMBlobBuffers { -+ uint32_t permanent_flags; -+ TPMSizedBuffer permanent; -+ -+ uint32_t volatil_flags; -+ TPMSizedBuffer volatil; -+ -+ uint32_t savestate_flags; -+ TPMSizedBuffer savestate; -+} TPMBlobBuffers; -+ - struct TPMDriverOps { - enum TpmType type; - const QemuOptDesc *opts; --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch deleted file mode 100644 index d947e8cba..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch +++ /dev/null @@ -1,282 +0,0 @@ -From 04b33e21866412689f18b7ad6daf0a54d8f959a7 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 28 Jun 2017 13:44:52 -0700 -Subject: [PATCH] Replace 'struct ucontext' with 'ucontext_t' type - -glibc used to have: - - typedef struct ucontext { ... } ucontext_t; - -glibc now has: - - typedef struct ucontext_t { ... } ucontext_t; - -(See https://sourceware.org/bugzilla/show_bug.cgi?id=21457 - for detail and rationale for the glibc change) - -However, QEMU used "struct ucontext" in declarations. This is a -private name and compatibility cannot be guaranteed. Switch to -only using the standardized type name. - -Signed-off-by: Khem Raj -Message-id: 20170628204452.41230-1-raj.khem@gmail.com -Cc: Kamil Rytarowski -Cc: Riku Voipio -Cc: Laurent Vivier -Cc: Paolo Bonzini -Reviewed-by: Eric Blake -[PMM: Rewrote commit message, based mostly on the one from - Nathaniel McCallum] -Signed-off-by: Peter Maydell - -Upstream-Status: Backport -RP 2017/9/6 ---- - linux-user/host/aarch64/hostdep.h | 2 +- - linux-user/host/arm/hostdep.h | 2 +- - linux-user/host/i386/hostdep.h | 2 +- - linux-user/host/ppc64/hostdep.h | 2 +- - linux-user/host/s390x/hostdep.h | 2 +- - linux-user/host/x86_64/hostdep.h | 2 +- - linux-user/signal.c | 10 +++++----- - tests/tcg/test-i386.c | 4 ++-- - user-exec.c | 18 +++++++++--------- - 9 files changed, 22 insertions(+), 22 deletions(-) - -diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h -index 64f75ce..a8d41a2 100644 ---- a/linux-user/host/aarch64/hostdep.h -+++ b/linux-user/host/aarch64/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - __u64 *pcreg = &uc->uc_mcontext.pc; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h -index 5c1ae60..9276fe6 100644 ---- a/linux-user/host/arm/hostdep.h -+++ b/linux-user/host/arm/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - unsigned long *pcreg = &uc->uc_mcontext.arm_pc; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h -index d834bd8..073be74 100644 ---- a/linux-user/host/i386/hostdep.h -+++ b/linux-user/host/i386/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - greg_t *pcreg = &uc->uc_mcontext.gregs[REG_EIP]; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h -index 0b0f5f7..98979ad 100644 ---- a/linux-user/host/ppc64/hostdep.h -+++ b/linux-user/host/ppc64/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - unsigned long *pcreg = &uc->uc_mcontext.gp_regs[PT_NIP]; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h -index 6f9da9c..4f0171f 100644 ---- a/linux-user/host/s390x/hostdep.h -+++ b/linux-user/host/s390x/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - unsigned long *pcreg = &uc->uc_mcontext.psw.addr; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/host/x86_64/hostdep.h b/linux-user/host/x86_64/hostdep.h -index 3b42596..a4fefb5 100644 ---- a/linux-user/host/x86_64/hostdep.h -+++ b/linux-user/host/x86_64/hostdep.h -@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP]; - - if (*pcreg > (uintptr_t)safe_syscall_start -diff --git a/linux-user/signal.c b/linux-user/signal.c -index d68bd26..cc0c3fc 100644 ---- a/linux-user/signal.c -+++ b/linux-user/signal.c -@@ -3346,7 +3346,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, - * - * a0 = signal number - * a1 = pointer to siginfo_t -- * a2 = pointer to struct ucontext -+ * a2 = pointer to ucontext_t - * - * $25 and PC point to the signal handler, $29 points to the - * struct sigframe. -@@ -3764,7 +3764,7 @@ struct target_signal_frame { - - struct rt_signal_frame { - siginfo_t info; -- struct ucontext uc; -+ ucontext_t uc; - uint32_t tramp[2]; - }; - -@@ -3980,7 +3980,7 @@ struct rt_signal_frame { - siginfo_t *pinfo; - void *puc; - siginfo_t info; -- struct ucontext uc; -+ ucontext_t uc; - uint16_t retcode[4]; /* Trampoline code. */ - }; - -@@ -4515,7 +4515,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, - tswap_siginfo(&frame->info, info); - } - -- /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/ -+ /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/ - __put_user(0, &frame->uc.tuc_flags); - __put_user(0, &frame->uc.tuc_link); - __put_user(target_sigaltstack_used.ss_sp, -@@ -5007,7 +5007,7 @@ enum { - - struct target_ucontext { - target_ulong tuc_flags; -- target_ulong tuc_link; /* struct ucontext __user * */ -+ target_ulong tuc_link; /* ucontext_t __user * */ - struct target_sigaltstack tuc_stack; - #if !defined(TARGET_PPC64) - int32_t tuc_pad[7]; -diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c -index 0f7b943..9599204 100644 ---- a/tests/tcg/test-i386.c -+++ b/tests/tcg/test-i386.c -@@ -1720,7 +1720,7 @@ int tab[2]; - - void sig_handler(int sig, siginfo_t *info, void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - - printf("si_signo=%d si_errno=%d si_code=%d", - info->si_signo, info->si_errno, info->si_code); -@@ -1912,7 +1912,7 @@ void test_exceptions(void) - /* specific precise single step test */ - void sig_trap_handler(int sig, siginfo_t *info, void *puc) - { -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - printf("EIP=" FMTLX "\n", (long)uc->uc_mcontext.gregs[REG_EIP]); - } - -diff --git a/user-exec.c b/user-exec.c -index a8f95fa..2a975ea 100644 ---- a/user-exec.c -+++ b/user-exec.c -@@ -167,7 +167,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - #elif defined(__OpenBSD__) - struct sigcontext *uc = puc; - #else -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - #endif - unsigned long pc; - int trapno; -@@ -222,7 +222,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - #elif defined(__OpenBSD__) - struct sigcontext *uc = puc; - #else -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - #endif - - pc = PC_sig(uc); -@@ -289,7 +289,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - ucontext_t *uc = puc; - #else -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - #endif - unsigned long pc; - int is_write; -@@ -316,7 +316,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - void *puc) - { - siginfo_t *info = pinfo; -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - uint32_t *pc = uc->uc_mcontext.sc_pc; - uint32_t insn = *pc; - int is_write = 0; -@@ -414,7 +414,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - #if defined(__NetBSD__) - ucontext_t *uc = puc; - #else -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - #endif - unsigned long pc; - int is_write; -@@ -441,7 +441,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - int cpu_signal_handler(int host_signum, void *pinfo, void *puc) - { - siginfo_t *info = pinfo; -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - uintptr_t pc = uc->uc_mcontext.pc; - uint32_t insn = *(uint32_t *)pc; - bool is_write; -@@ -474,7 +474,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) - int cpu_signal_handler(int host_signum, void *pinfo, void *puc) - { - siginfo_t *info = pinfo; -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - unsigned long ip; - int is_write = 0; - -@@ -505,7 +505,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - void *puc) - { - siginfo_t *info = pinfo; -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - unsigned long pc; - uint16_t *pinsn; - int is_write = 0; -@@ -558,7 +558,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - void *puc) - { - siginfo_t *info = pinfo; -- struct ucontext *uc = puc; -+ ucontext_t *uc = puc; - greg_t pc = uc->uc_mcontext.pc; - int is_write; - --- -1.8.3.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch deleted file mode 100644 index e0f7a1a3f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7139ccbc907441337b4b59cde2c5b5a54cb5b2cc Mon Sep 17 00:00:00 2001 -From: Sona Sarmadi - -virtio-gpu: fix information leak in capset get dispatch - -In virgl_cmd_get_capset function, it uses g_malloc to allocate -a response struct to the guest. As the 'resp'struct hasn't been full -initialized it will lead the 'resp->padding' field to the guest. -Use g_malloc0 to avoid this. - -Signed-off-by: Li Qiang -Reviewed-by: Marc-André Lureau -Message-id: 58188cae.4a6ec20a.3d2d1.aff2@mx.google.com - -[Sona: backported from master to v2.8.0 and resolved conflict] - -Reference to upstream patch: -http://git.qemu-project.org/?p=qemu.git;a=commit;h=85d9d044471f93c48c5c396f7e217b4ef12f69f8 - -CVE: CVE-2016-9908 -Upstream-Status: Backport - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Sona Sarmadi ---- - hw/display/virtio-gpu-3d.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c -index 23f39de..d98b140 100644 ---- a/hw/display/virtio-gpu-3d.c -+++ b/hw/display/virtio-gpu-3d.c -@@ -371,7 +371,7 @@ static void virgl_cmd_get_capset(VirtIOGPU *g, - - virgl_renderer_get_cap_set(gc.capset_id, &max_ver, - &max_size); -- resp = g_malloc(sizeof(*resp) + max_size); -+ resp = g_malloc0(sizeof(*resp) + max_size); - - resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET; - virgl_renderer_fill_caps(gc.capset_id, --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch deleted file mode 100644 index c009ffd96..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch +++ /dev/null @@ -1,45 +0,0 @@ -From b8e23926c568f2e963af39028b71c472e3023793 Mon Sep 17 00:00:00 2001 -From: Li Qiang -Date: Mon, 28 Nov 2016 21:29:25 -0500 -Subject: [PATCH] virtio-gpu: call cleanup mapping function in resource destroy - -If the guest destroy the resource before detach banking, the 'iov' -and 'addrs' field in resource is not freed thus leading memory -leak issue. This patch avoid this. - -CVE: CVE-2016-9912 -Upstream-Status: Backport - -Signed-off-by: Li Qiang -Reviewed-by: Marc-André Lureau -Message-id: 1480386565-10077-1-git-send-email-liq3ea@gmail.com -Signed-off-by: Gerd Hoffmann -Signed-off-by: Sona Sarmadi ---- - hw/display/virtio-gpu.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c -index ed2b6d3..6a26258 100644 ---- a/hw/display/virtio-gpu.c -+++ b/hw/display/virtio-gpu.c -@@ -28,6 +28,8 @@ - static struct virtio_gpu_simple_resource* - virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id); - -+static void virtio_gpu_cleanup_mapping(struct virtio_gpu_simple_resource *res); -+ - #ifdef CONFIG_VIRGL - #include - #define VIRGL(_g, _virgl, _simple, ...) \ -@@ -364,6 +366,7 @@ static void virtio_gpu_resource_destroy(VirtIOGPU *g, - struct virtio_gpu_simple_resource *res) - { - pixman_image_unref(res->image); -+ virtio_gpu_cleanup_mapping(res); - QTAILQ_REMOVE(&g->reslist, res, next); - g->hostmem -= res->hostmem; - g_free(res); --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch new file mode 100644 index 000000000..ce0b1ee3e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch @@ -0,0 +1,504 @@ +From 3d90c6254863693a6b13d918d2b8682e08bbc681 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Mon, 28 Aug 2017 14:29:06 +0200 +Subject: [PATCH] vga: stop passing pointers to vga_draw_line* functions + +Instead pass around the address (aka offset into vga memory). +Add vga_read_* helper functions which apply vbe_size_mask to +the address, to make sure the address stays within the valid +range, similar to the cirrus blitter fixes (commits ffaf857778 +and 026aeffcb4). + +Impact: DoS for privileged guest users. qemu crashes with +a segfault, when hitting the guard page after vga memory +allocation, while reading vga memory for display updates. + +Fixes: CVE-2017-13672 +Cc: P J P +Reported-by: David Buchanan +Signed-off-by: Gerd Hoffmann +Message-id: 20170828122906.18993-1-kraxel@redhat.com + +Upstream-Status: Backport +[https://git.qemu.org/?p=qemu.git;a=commit;h=3d90c6254863693a6b13d918d2b8682e08bbc681] + +CVE: CVE-2017-13672 + +Signed-off-by: Yi Zhao +--- + hw/display/vga-helpers.h | 202 ++++++++++++++++++++++++++--------------------- + hw/display/vga.c | 5 +- + hw/display/vga_int.h | 1 + + 3 files changed, 114 insertions(+), 94 deletions(-) + +diff --git a/hw/display/vga-helpers.h b/hw/display/vga-helpers.h +index 94f6de2..5a752b3 100644 +--- a/hw/display/vga-helpers.h ++++ b/hw/display/vga-helpers.h +@@ -95,20 +95,46 @@ static void vga_draw_glyph9(uint8_t *d, int linesize, + } while (--h); + } + ++static inline uint8_t vga_read_byte(VGACommonState *vga, uint32_t addr) ++{ ++ return vga->vram_ptr[addr & vga->vbe_size_mask]; ++} ++ ++static inline uint16_t vga_read_word_le(VGACommonState *vga, uint32_t addr) ++{ ++ uint32_t offset = addr & vga->vbe_size_mask & ~1; ++ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset); ++ return lduw_le_p(ptr); ++} ++ ++static inline uint16_t vga_read_word_be(VGACommonState *vga, uint32_t addr) ++{ ++ uint32_t offset = addr & vga->vbe_size_mask & ~1; ++ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset); ++ return lduw_be_p(ptr); ++} ++ ++static inline uint32_t vga_read_dword_le(VGACommonState *vga, uint32_t addr) ++{ ++ uint32_t offset = addr & vga->vbe_size_mask & ~3; ++ uint32_t *ptr = (uint32_t *)(vga->vram_ptr + offset); ++ return ldl_le_p(ptr); ++} ++ + /* + * 4 color mode + */ +-static void vga_draw_line2(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line2(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t plane_mask, *palette, data, v; + int x; + +- palette = s1->last_palette; +- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; ++ palette = vga->last_palette; ++ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; + width >>= 3; + for(x = 0; x < width; x++) { +- data = ((uint32_t *)s)[0]; ++ data = vga_read_dword_le(vga, addr); + data &= plane_mask; + v = expand2[GET_PLANE(data, 0)]; + v |= expand2[GET_PLANE(data, 2)] << 2; +@@ -124,7 +150,7 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d, + ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf]; + ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf]; + d += 32; +- s += 4; ++ addr += 4; + } + } + +@@ -134,17 +160,17 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d, + /* + * 4 color mode, dup2 horizontal + */ +-static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line2d2(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t plane_mask, *palette, data, v; + int x; + +- palette = s1->last_palette; +- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; ++ palette = vga->last_palette; ++ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; + width >>= 3; + for(x = 0; x < width; x++) { +- data = ((uint32_t *)s)[0]; ++ data = vga_read_dword_le(vga, addr); + data &= plane_mask; + v = expand2[GET_PLANE(data, 0)]; + v |= expand2[GET_PLANE(data, 2)] << 2; +@@ -160,24 +186,24 @@ static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d, + PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]); + PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]); + d += 64; +- s += 4; ++ addr += 4; + } + } + + /* + * 16 color mode + */ +-static void vga_draw_line4(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line4(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t plane_mask, data, v, *palette; + int x; + +- palette = s1->last_palette; +- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; ++ palette = vga->last_palette; ++ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; + width >>= 3; + for(x = 0; x < width; x++) { +- data = ((uint32_t *)s)[0]; ++ data = vga_read_dword_le(vga, addr); + data &= plane_mask; + v = expand4[GET_PLANE(data, 0)]; + v |= expand4[GET_PLANE(data, 1)] << 1; +@@ -192,24 +218,24 @@ static void vga_draw_line4(VGACommonState *s1, uint8_t *d, + ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf]; + ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf]; + d += 32; +- s += 4; ++ addr += 4; + } + } + + /* + * 16 color mode, dup2 horizontal + */ +-static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line4d2(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t plane_mask, data, v, *palette; + int x; + +- palette = s1->last_palette; +- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; ++ palette = vga->last_palette; ++ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; + width >>= 3; + for(x = 0; x < width; x++) { +- data = ((uint32_t *)s)[0]; ++ data = vga_read_dword_le(vga, addr); + data &= plane_mask; + v = expand4[GET_PLANE(data, 0)]; + v |= expand4[GET_PLANE(data, 1)] << 1; +@@ -224,7 +250,7 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d, + PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]); + PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]); + d += 64; +- s += 4; ++ addr += 4; + } + } + +@@ -233,21 +259,21 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d, + * + * XXX: add plane_mask support (never used in standard VGA modes) + */ +-static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line8d2(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t *palette; + int x; + +- palette = s1->last_palette; ++ palette = vga->last_palette; + width >>= 3; + for(x = 0; x < width; x++) { +- PUT_PIXEL2(d, 0, palette[s[0]]); +- PUT_PIXEL2(d, 1, palette[s[1]]); +- PUT_PIXEL2(d, 2, palette[s[2]]); +- PUT_PIXEL2(d, 3, palette[s[3]]); ++ PUT_PIXEL2(d, 0, palette[vga_read_byte(vga, addr + 0)]); ++ PUT_PIXEL2(d, 1, palette[vga_read_byte(vga, addr + 1)]); ++ PUT_PIXEL2(d, 2, palette[vga_read_byte(vga, addr + 2)]); ++ PUT_PIXEL2(d, 3, palette[vga_read_byte(vga, addr + 3)]); + d += 32; +- s += 4; ++ addr += 4; + } + } + +@@ -256,63 +282,63 @@ static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d, + * + * XXX: add plane_mask support (never used in standard VGA modes) + */ +-static void vga_draw_line8(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line8(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + uint32_t *palette; + int x; + +- palette = s1->last_palette; ++ palette = vga->last_palette; + width >>= 3; + for(x = 0; x < width; x++) { +- ((uint32_t *)d)[0] = palette[s[0]]; +- ((uint32_t *)d)[1] = palette[s[1]]; +- ((uint32_t *)d)[2] = palette[s[2]]; +- ((uint32_t *)d)[3] = palette[s[3]]; +- ((uint32_t *)d)[4] = palette[s[4]]; +- ((uint32_t *)d)[5] = palette[s[5]]; +- ((uint32_t *)d)[6] = palette[s[6]]; +- ((uint32_t *)d)[7] = palette[s[7]]; ++ ((uint32_t *)d)[0] = palette[vga_read_byte(vga, addr + 0)]; ++ ((uint32_t *)d)[1] = palette[vga_read_byte(vga, addr + 1)]; ++ ((uint32_t *)d)[2] = palette[vga_read_byte(vga, addr + 2)]; ++ ((uint32_t *)d)[3] = palette[vga_read_byte(vga, addr + 3)]; ++ ((uint32_t *)d)[4] = palette[vga_read_byte(vga, addr + 4)]; ++ ((uint32_t *)d)[5] = palette[vga_read_byte(vga, addr + 5)]; ++ ((uint32_t *)d)[6] = palette[vga_read_byte(vga, addr + 6)]; ++ ((uint32_t *)d)[7] = palette[vga_read_byte(vga, addr + 7)]; + d += 32; +- s += 8; ++ addr += 8; + } + } + + /* + * 15 bit color + */ +-static void vga_draw_line15_le(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line15_le(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t v, r, g, b; + + w = width; + do { +- v = lduw_le_p((void *)s); ++ v = vga_read_word_le(vga, addr); + r = (v >> 7) & 0xf8; + g = (v >> 2) & 0xf8; + b = (v << 3) & 0xf8; + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 2; ++ addr += 2; + d += 4; + } while (--w != 0); + } + +-static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line15_be(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t v, r, g, b; + + w = width; + do { +- v = lduw_be_p((void *)s); ++ v = vga_read_word_be(vga, addr); + r = (v >> 7) & 0xf8; + g = (v >> 2) & 0xf8; + b = (v << 3) & 0xf8; + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 2; ++ addr += 2; + d += 4; + } while (--w != 0); + } +@@ -320,38 +346,38 @@ static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d, + /* + * 16 bit color + */ +-static void vga_draw_line16_le(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line16_le(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t v, r, g, b; + + w = width; + do { +- v = lduw_le_p((void *)s); ++ v = vga_read_word_le(vga, addr); + r = (v >> 8) & 0xf8; + g = (v >> 3) & 0xfc; + b = (v << 3) & 0xf8; + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 2; ++ addr += 2; + d += 4; + } while (--w != 0); + } + +-static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line16_be(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t v, r, g, b; + + w = width; + do { +- v = lduw_be_p((void *)s); ++ v = vga_read_word_be(vga, addr); + r = (v >> 8) & 0xf8; + g = (v >> 3) & 0xfc; + b = (v << 3) & 0xf8; + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 2; ++ addr += 2; + d += 4; + } while (--w != 0); + } +@@ -359,36 +385,36 @@ static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d, + /* + * 24 bit color + */ +-static void vga_draw_line24_le(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line24_le(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t r, g, b; + + w = width; + do { +- b = s[0]; +- g = s[1]; +- r = s[2]; ++ b = vga_read_byte(vga, addr + 0); ++ g = vga_read_byte(vga, addr + 1); ++ r = vga_read_byte(vga, addr + 2); + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 3; ++ addr += 3; + d += 4; + } while (--w != 0); + } + +-static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line24_be(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { + int w; + uint32_t r, g, b; + + w = width; + do { +- r = s[0]; +- g = s[1]; +- b = s[2]; ++ r = vga_read_byte(vga, addr + 0); ++ g = vga_read_byte(vga, addr + 1); ++ b = vga_read_byte(vga, addr + 2); + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 3; ++ addr += 3; + d += 4; + } while (--w != 0); + } +@@ -396,44 +422,36 @@ static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d, + /* + * 32 bit color + */ +-static void vga_draw_line32_le(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line32_le(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { +-#ifndef HOST_WORDS_BIGENDIAN +- memcpy(d, s, width * 4); +-#else + int w; + uint32_t r, g, b; + + w = width; + do { +- b = s[0]; +- g = s[1]; +- r = s[2]; ++ b = vga_read_byte(vga, addr + 0); ++ g = vga_read_byte(vga, addr + 1); ++ r = vga_read_byte(vga, addr + 2); + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 4; ++ addr += 4; + d += 4; + } while (--w != 0); +-#endif + } + +-static void vga_draw_line32_be(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width) ++static void vga_draw_line32_be(VGACommonState *vga, uint8_t *d, ++ uint32_t addr, int width) + { +-#ifdef HOST_WORDS_BIGENDIAN +- memcpy(d, s, width * 4); +-#else + int w; + uint32_t r, g, b; + + w = width; + do { +- r = s[1]; +- g = s[2]; +- b = s[3]; ++ r = vga_read_byte(vga, addr + 1); ++ g = vga_read_byte(vga, addr + 2); ++ b = vga_read_byte(vga, addr + 3); + ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); +- s += 4; ++ addr += 4; + d += 4; + } while (--w != 0); +-#endif + } +diff --git a/hw/display/vga.c b/hw/display/vga.c +index ad7a465..6fc8c87 100644 +--- a/hw/display/vga.c ++++ b/hw/display/vga.c +@@ -1005,7 +1005,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val) + } + + typedef void vga_draw_line_func(VGACommonState *s1, uint8_t *d, +- const uint8_t *s, int width); ++ uint32_t srcaddr, int width); + + #include "vga-helpers.h" + +@@ -1666,7 +1666,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) + if (y_start < 0) + y_start = y; + if (!(is_buffer_shared(surface))) { +- vga_draw_line(s, d, s->vram_ptr + addr, width); ++ vga_draw_line(s, d, addr, width); + if (s->cursor_draw_line) + s->cursor_draw_line(s, d, y); + } +@@ -2170,6 +2170,7 @@ void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate) + if (!s->vbe_size) { + s->vbe_size = s->vram_size; + } ++ s->vbe_size_mask = s->vbe_size - 1; + + s->is_vbe_vmstate = 1; + memory_region_init_ram_nomigrate(&s->vram, obj, "vga.vram", s->vram_size, +diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h +index dd6c958..ad34a1f 100644 +--- a/hw/display/vga_int.h ++++ b/hw/display/vga_int.h +@@ -94,6 +94,7 @@ typedef struct VGACommonState { + uint32_t vram_size; + uint32_t vram_size_mb; /* property */ + uint32_t vbe_size; ++ uint32_t vbe_size_mask; + uint32_t latch; + bool has_chain4_alias; + MemoryRegion chain4_alias; +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch new file mode 100644 index 000000000..3d0695fd6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch @@ -0,0 +1,53 @@ +From e65294157d4b69393b3f819c99f4f647452b48e3 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Mon, 28 Aug 2017 14:33:07 +0200 +Subject: [PATCH] vga: fix display update region calculation (split screen) + +vga display update mis-calculated the region for the dirty bitmap +snapshot in case split screen mode is used. This can trigger an +assert in cpu_physical_memory_snapshot_get_dirty(). + +Impact: DoS for privileged guest users. + +Fixes: CVE-2017-13673 +Fixes: fec5e8c92becad223df9d972770522f64aafdb72 +Cc: P J P +Reported-by: David Buchanan +Signed-off-by: Gerd Hoffmann +Message-id: 20170828123307.15392-1-kraxel@redhat.com + +Upstream-Status: Backport +[https://git.qemu.org/?p=qemu.git;a=commit;h=e65294157d4b69393b3f819c99f4f647452b48e3] + +CVE: CVE-2017-13673 + +Signed-off-by: Yi Zhao +--- + hw/display/vga.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/hw/display/vga.c b/hw/display/vga.c +index 3433102..ad7a465 100644 +--- a/hw/display/vga.c ++++ b/hw/display/vga.c +@@ -1628,9 +1628,15 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) + y1 = 0; + + if (!full_update) { ++ ram_addr_t region_start = addr1; ++ ram_addr_t region_end = addr1 + line_offset * height; + vga_sync_dirty_bitmap(s); +- snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1, +- line_offset * height, ++ if (s->line_compare < height) { ++ /* split screen mode */ ++ region_start = 0; ++ } ++ snap = memory_region_snapshot_and_clear_dirty(&s->vram, region_start, ++ region_end - region_start, + DIRTY_MEMORY_VGA); + } + +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch new file mode 100644 index 000000000..352f73f62 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch @@ -0,0 +1,87 @@ +From 1201d308519f1e915866d7583d5136d03cc1d384 Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Fri, 25 Aug 2017 01:35:53 +0200 +Subject: [PATCH] slirp: fix clearing ifq_so from pending packets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The if_fastq and if_batchq contain not only packets, but queues of packets +for the same socket. When sofree frees a socket, it thus has to clear ifq_so +from all the packets from the queues, not only the first. + +Signed-off-by: Samuel Thibault +Reviewed-by: Philippe Mathieu-Daudé +Cc: qemu-stable@nongnu.org +Signed-off-by: Peter Maydell + +Upstream-Status: Backport +[https://git.qemu.org/?p=qemu.git;a=commit;h=1201d308519f1e915866d7583d5136d03cc1d384] + +CVE: CVE-2017-13711 + +Signed-off-by: Yi Zhao +--- + slirp/socket.c | 39 +++++++++++++++++++++++---------------- + 1 file changed, 23 insertions(+), 16 deletions(-) + +diff --git a/slirp/socket.c b/slirp/socket.c +index ecec029..cb7b5b6 100644 +--- a/slirp/socket.c ++++ b/slirp/socket.c +@@ -60,29 +60,36 @@ socreate(Slirp *slirp) + } + + /* ++ * Remove references to so from the given message queue. ++ */ ++static void ++soqfree(struct socket *so, struct quehead *qh) ++{ ++ struct mbuf *ifq; ++ ++ for (ifq = (struct mbuf *) qh->qh_link; ++ (struct quehead *) ifq != qh; ++ ifq = ifq->ifq_next) { ++ if (ifq->ifq_so == so) { ++ struct mbuf *ifm; ++ ifq->ifq_so = NULL; ++ for (ifm = ifq->ifs_next; ifm != ifq; ifm = ifm->ifs_next) { ++ ifm->ifq_so = NULL; ++ } ++ } ++ } ++} ++ ++/* + * remque and free a socket, clobber cache + */ + void + sofree(struct socket *so) + { + Slirp *slirp = so->slirp; +- struct mbuf *ifm; + +- for (ifm = (struct mbuf *) slirp->if_fastq.qh_link; +- (struct quehead *) ifm != &slirp->if_fastq; +- ifm = ifm->ifq_next) { +- if (ifm->ifq_so == so) { +- ifm->ifq_so = NULL; +- } +- } +- +- for (ifm = (struct mbuf *) slirp->if_batchq.qh_link; +- (struct quehead *) ifm != &slirp->if_batchq; +- ifm = ifm->ifq_next) { +- if (ifm->ifq_so == so) { +- ifm->ifq_so = NULL; +- } +- } ++ soqfree(so, &slirp->if_fastq); ++ soqfree(so, &slirp->if_batchq); + + if (so->so_emu==EMU_RSH && so->extra) { + sofree(so->extra); +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch new file mode 100644 index 000000000..969ad877d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch @@ -0,0 +1,70 @@ +From ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb Mon Sep 17 00:00:00 2001 +From: Prasad J Pandit +Date: Thu, 7 Sep 2017 12:02:56 +0530 +Subject: [PATCH] multiboot: validate multiboot header address values + +While loading kernel via multiboot-v1 image, (flags & 0x00010000) +indicates that multiboot header contains valid addresses to load +the kernel image. These addresses are used to compute kernel +size and kernel text offset in the OS image. Validate these +address values to avoid an OOB access issue. + +This is CVE-2017-14167. + +Reported-by: Thomas Garnier +Signed-off-by: Prasad J Pandit +Message-Id: <20170907063256.7418-1-ppandit@redhat.com> +Signed-off-by: Paolo Bonzini + +Upstream-Status: Backport +[https://git.qemu.org/?p=qemu.git;a=commit;h=ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb] + +CVE: CVE-2017-14167 + +Signed-off-by: Yi Zhao +--- + hw/i386/multiboot.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c +index 6001f4c..c7b70c9 100644 +--- a/hw/i386/multiboot.c ++++ b/hw/i386/multiboot.c +@@ -221,15 +221,34 @@ int load_multiboot(FWCfgState *fw_cfg, + uint32_t mh_header_addr = ldl_p(header+i+12); + uint32_t mh_load_end_addr = ldl_p(header+i+20); + uint32_t mh_bss_end_addr = ldl_p(header+i+24); ++ + mh_load_addr = ldl_p(header+i+16); ++ if (mh_header_addr < mh_load_addr) { ++ fprintf(stderr, "invalid mh_load_addr address\n"); ++ exit(1); ++ } ++ + uint32_t mb_kernel_text_offset = i - (mh_header_addr - mh_load_addr); + uint32_t mb_load_size = 0; + mh_entry_addr = ldl_p(header+i+28); + + if (mh_load_end_addr) { ++ if (mh_bss_end_addr < mh_load_addr) { ++ fprintf(stderr, "invalid mh_bss_end_addr address\n"); ++ exit(1); ++ } + mb_kernel_size = mh_bss_end_addr - mh_load_addr; ++ ++ if (mh_load_end_addr < mh_load_addr) { ++ fprintf(stderr, "invalid mh_load_end_addr address\n"); ++ exit(1); ++ } + mb_load_size = mh_load_end_addr - mh_load_addr; + } else { ++ if (kernel_file_size < mb_kernel_text_offset) { ++ fprintf(stderr, "invalid kernel_file_size\n"); ++ exit(1); ++ } + mb_kernel_size = kernel_file_size - mb_kernel_text_offset; + mb_load_size = mb_kernel_size; + } +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch new file mode 100644 index 000000000..e9639820b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch @@ -0,0 +1,28 @@ +From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001 +From: Juro Bystricky +Date: Thu, 31 Aug 2017 11:06:56 -0700 +Subject: Add subpackage -ptest which runs all unit test cases for qemu. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang + +Signed-off-by: Juro Bystricky + +diff --git a/tests/Makefile.include b/tests/Makefile.include +index f08b741..3d1b3e9 100644 +--- a/tests/Makefile.include ++++ b/tests/Makefile.include +@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y) + -include $(wildcard tests/*.d) + -include $(wildcard tests/libqos/*.d) + ++buildtest-TESTS: $(check-unit-y) ++ ++runtest-TESTS: ++ for f in $(check-unit-y); do \ ++ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \ ++ $$nf; \ ++ done ++ + endif diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch deleted file mode 100644 index 2ce3478e4..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Pending - -Add subpackage -ptest which runs all unit test cases for qemu. - -Signed-off-by: Kai Kang ---- - tests/Makefile.include | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/tests/Makefile.include b/tests/Makefile.include -index 14be491..0fce37a 100644 ---- a/tests/Makefile.include -+++ b/tests/Makefile.include -@@ -776,3 +776,11 @@ all: $(QEMU_IOTESTS_HELPERS-y) - - -include $(wildcard tests/*.d) - -include $(wildcard tests/libqos/*.d) -+ -+buildtest-TESTS: $(check-unit-y) -+ -+runtest-TESTS: -+ for f in $(check-unit-y); do \ -+ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \ -+ $$nf; \ -+ done --- -2.9.0 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch new file mode 100644 index 000000000..9bbbc6f76 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch @@ -0,0 +1,46 @@ +From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Tue, 26 Feb 2013 11:43:28 -0500 +Subject: [PATCH 03/18] apic: fixup fallthrough to PIC + +Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC +interrupts through the local APIC if the local APIC config says so.] +missed a check to ensure the local APIC is enabled. Since if the local +APIC is disabled it doesn't matter what the local APIC config says. + +If this check isn't done and the guest has disabled the local APIC the +guest will receive a general protection fault, similar to what is seen +here: + +https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html + +The GPF is caused by an attempt to service interrupt 0xffffffff. This +comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr() +(with the local APIC disabled apic_get_interrupt() returns -1). +apic_accept_pic_intr() returns 0 and thus the interrupt number which +is returned from cpu_get_pic_interrupt(), and which is attempted to be +serviced, is -1. + +Signed-off-by: Mark Asselstine +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html] +Signed-off-by: He Zhe +--- + hw/intc/apic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/intc/apic.c b/hw/intc/apic.c +index 45887d99..c5ae4087 100644 +--- a/hw/intc/apic.c ++++ b/hw/intc/apic.c +@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev) + APICCommonState *s = APIC_COMMON(dev); + uint32_t lvt0; + +- if (!s) ++ if (!s || !(s->spurious_vec & APIC_SV_ENABLE)) + return -1; + + lvt0 = s->lvt[APIC_LVT_LINT0]; +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch deleted file mode 100644 index 59cdc1c30..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch +++ /dev/null @@ -1,32 +0,0 @@ -Upstream-Status: Pending -Signed-off-by: Cristian Iorga - -From 9ac096d8eccf2d56ece646320c282c8369f8337c Mon Sep 17 00:00:00 2001 -From: Cristian Iorga -Date: Tue, 29 Jul 2014 18:35:59 +0300 -Subject: [PATCH] configure: fix Darwin target detection - -fix Darwin target detection for qemu -cross-compilation. - -Signed-off-by: Cristian Iorga ---- - configure | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configure b/configure -index 283c71c..1c66a11 100755 ---- a/configure -+++ b/configure -@@ -444,6 +444,8 @@ elif check_define __sun__ ; then - targetos='SunOS' - elif check_define __HAIKU__ ; then - targetos='Haiku' -+elif check_define __APPLE__ ; then -+ targetos='Darwin' - else - targetos=`uname -s` - fi --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch new file mode 100644 index 000000000..6f722433d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch @@ -0,0 +1,105 @@ +I've tracked down what I think is a problem causing qemu-system-ppc +to hang whilst booting images. + +I believe the decrementer timer stops receiving interrupts so +tasks in our images hang indefinitely as the timer stopped. + +It can be summed up with this line of debug: + +ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000004 + +It should normally read: + +ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000002 + +The question is why CPU_INTERRUPT_EXITTB ends up being set when the +lines above this log message clearly sets CPU_INTERRUPT_HARD (via +cpu_interrupt() ). + +I note in cpu.h: + + /* updates protected by BQL */ + uint32_t interrupt_request; + +(for struct CPUState) + +The ppc code does "cs->interrupt_request |= CPU_INTERRUPT_EXITTB" in 5 +places, 3 in excp_helper.c and 2 in helper_regs.h. In all cases, +g_assert(qemu_mutex_iothread_locked()); fails. If I do something like: + +if (!qemu_mutex_iothread_locked()) { + qemu_mutex_lock_iothread(); + cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); + qemu_mutex_unlock_iothread(); +} else { + cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); +} + +in these call sites then I can no longer lock qemu up with my test +case. + +I suspect the _HARD setting gets overwritten which stops the +decrementer interrupts being delivered. + +Upstream-Status: Submitted [Issue discussed on qemu mailing list 2017/11/20] +RP 2017/11/20 + +Index: qemu-2.10.1/target/ppc/excp_helper.c +=================================================================== +--- qemu-2.10.1.orig/target/ppc/excp_helper.c ++++ qemu-2.10.1/target/ppc/excp_helper.c +@@ -207,7 +207,9 @@ static inline void powerpc_excp(PowerPCC + "Entering checkstop state\n"); + } + cs->halted = 1; +- cs->interrupt_request |= CPU_INTERRUPT_EXITTB; ++ qemu_mutex_lock_iothread(); ++ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); ++ qemu_mutex_unlock_iothread(); + } + if (env->msr_mask & MSR_HVB) { + /* ISA specifies HV, but can be delivered to guest with HV clear +@@ -940,7 +942,9 @@ void helper_store_msr(CPUPPCState *env, + + if (excp != 0) { + CPUState *cs = CPU(ppc_env_get_cpu(env)); +- cs->interrupt_request |= CPU_INTERRUPT_EXITTB; ++ qemu_mutex_lock_iothread(); ++ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); ++ qemu_mutex_unlock_iothread(); + raise_exception(env, excp); + } + } +@@ -995,7 +999,9 @@ static inline void do_rfi(CPUPPCState *e + /* No need to raise an exception here, + * as rfi is always the last insn of a TB + */ +- cs->interrupt_request |= CPU_INTERRUPT_EXITTB; ++ qemu_mutex_lock_iothread(); ++ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); ++ qemu_mutex_unlock_iothread(); + + /* Reset the reservation */ + env->reserve_addr = -1; +Index: qemu-2.10.1/target/ppc/helper_regs.h +=================================================================== +--- qemu-2.10.1.orig/target/ppc/helper_regs.h ++++ qemu-2.10.1/target/ppc/helper_regs.h +@@ -114,11 +114,15 @@ static inline int hreg_store_msr(CPUPPCS + } + if (((value >> MSR_IR) & 1) != msr_ir || + ((value >> MSR_DR) & 1) != msr_dr) { +- cs->interrupt_request |= CPU_INTERRUPT_EXITTB; ++ qemu_mutex_lock_iothread(); ++ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); ++ qemu_mutex_unlock_iothread(); + } + if ((env->mmu_model & POWERPC_MMU_BOOKE) && + ((value >> MSR_GS) & 1) != msr_gs) { +- cs->interrupt_request |= CPU_INTERRUPT_EXITTB; ++ qemu_mutex_lock_iothread(); ++ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB); ++ qemu_mutex_unlock_iothread(); + } + if (unlikely((env->flags & POWERPC_FLAG_TGPR) && + ((value ^ env->msr) & (1 << MSR_TGPR)))) { diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch index 173394fd0..eb99d1463 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/configure +++ b/configure @@ -4468,10 +4468,6 @@ fi diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch deleted file mode 100644 index ba21e71b0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch +++ /dev/null @@ -1,48 +0,0 @@ -[Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread - -From: Sam Bobroff -Subject: [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread_create() -Date: Mon, 30 Jan 2017 16:08:07 +1100 -Programs run under qemu-ppc64 on an x86_64 host currently segfault -if they use pthread_create() due to the adjustment made to the NIP in -commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9. - -This patch changes cpu_loop() to set the NIP back to the -pre-incremented value before calling do_syscall(), which causes the -correct address to be used for the new thread and corrects the fault. - -Signed-off-by: Sam Bobroff - -Upstream-Status: Backport - ---- - -linux-user/main.c | 4 +++- -1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/linux-user/main.c b/linux-user/main.c -index 30049581ef..b5dee01541 100644 ---- a/linux-user/main.c -+++ b/linux-user/main.c -@@ -1712,18 +1712,20 @@ void cpu_loop(CPUPPCState *env) - * in syscalls. - */ - env->crf[0] &= ~0x1; -+ env->nip += 4; - ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4], - env->gpr[5], env->gpr[6], env->gpr[7], - env->gpr[8], 0, 0); - if (ret == -TARGET_ERESTARTSYS) { -+ env->nip -= 4; - break; - } - if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) { -+ env->nip -= 4; - /* Returning from a successful sigreturn syscall. - Avoid corrupting register state. */ - break; - } -- env->nip += 4; - if (ret > (target_ulong)(-515)) { - env->crf[0] |= 0x1; - ret = -ret; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb new file mode 100644 index 000000000..a9b4939b0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb @@ -0,0 +1,63 @@ +require qemu.inc + +inherit ptest + +RDEPENDS_${PN}-ptest = "bash make" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \ + file://powerpc_rom.bin \ + file://disable-grabs.patch \ + file://exclude-some-arm-EABI-obsolete-syscalls.patch \ + file://wacom.patch \ + file://add-ptest-in-makefile-v10.patch \ + file://run-ptest \ + file://qemu-enlarge-env-entry-size.patch \ + file://no-valgrind.patch \ + file://pathlimit.patch \ + file://qemu-2.5.0-cflags.patch \ + file://glibc-2.25.patch \ + file://0001-Provide-support-for-the-CUSE-TPM.patch \ + file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \ + file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \ + file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch \ + file://apic-fixup-fallthrough-to-PIC.patch \ + file://CVE-2017-13711.patch \ + file://CVE-2017-13673.patch \ + file://CVE-2017-13672.patch \ + file://CVE-2017-14167.patch \ + file://ppc_locking.patch \ + " +UPSTREAM_CHECK_REGEX = "qemu-(?P\d+\..*)\.tar" + + +SRC_URI_append_class-native = " \ + file://fix-libcap-header-issue-on-some-distro.patch \ + file://cpus.c-qemu_cpu_kick_thread_debugging.patch \ + " + +SRC_URI[md5sum] = "ca73441de73a9b52c6c49c97190d2185" +SRC_URI[sha256sum] = "7e9f39e1306e6dcc595494e91c1464d4b03f55ddd2053183e0e1b69f7f776d48" + +COMPATIBLE_HOST_mipsarchn32 = "null" +COMPATIBLE_HOST_mipsarchn64 = "null" + +do_install_append() { + # Prevent QA warnings about installed ${localstatedir}/run + if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi + install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu +} + +do_compile_ptest() { + make buildtest-TESTS +} + +do_install_ptest() { + cp -rL ${B}/tests ${D}${PTEST_PATH} + find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} + + cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests +} + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb deleted file mode 100644 index fa70009f7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb +++ /dev/null @@ -1,65 +0,0 @@ -require qemu.inc - -inherit ptest - -RDEPENDS_${PN}-ptest = "bash make" - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" - -SRC_URI += " \ - file://powerpc_rom.bin \ - file://disable-grabs.patch \ - file://exclude-some-arm-EABI-obsolete-syscalls.patch \ - file://wacom.patch \ - file://add-ptest-in-makefile.patch \ - file://run-ptest \ - file://configure-fix-Darwin-target-detection.patch \ - file://qemu-enlarge-env-entry-size.patch \ - file://no-valgrind.patch \ - file://pathlimit.patch \ - file://qemu-2.5.0-cflags.patch \ - file://target-ppc-fix-user-mode.patch \ - file://glibc-2.25.patch \ - file://04b33e21866412689f18b7ad6daf0a54d8f959a7.patch \ -" - -SRC_URI += " \ - file://0001-Provide-support-for-the-CUSE-TPM.patch \ - file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \ - file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \ - file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \ - file://CVE-2016-9908.patch \ - file://CVE-2016-9912.patch \ -" - -SRC_URI_append_class-native = " \ - file://fix-libcap-header-issue-on-some-distro.patch \ - file://cpus.c-qemu_cpu_kick_thread_debugging.patch \ - " - -SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2" - -SRC_URI[md5sum] = "17940dce063b6ce450a12e719a6c9c43" -SRC_URI[sha256sum] = "dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62" - -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" - -do_install_append() { - # Prevent QA warnings about installed ${localstatedir}/run - if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi - install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu -} - -do_compile_ptest() { - make buildtest-TESTS -} - -do_install_ptest() { - cp -rL ${B}/tests ${D}${PTEST_PATH} - find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} - - cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests -} - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb index e40cdafc9..c983fbae6 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb @@ -1,4 +1,5 @@ SUMMARY = "QEMU wrapper script" +HOMEPAGE = "http://qemu.org" LICENSE = "MIT" S = "${WORKDIR}" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc deleted file mode 100644 index df889fcf9..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Makefile debugger which is gnumake compatible" -DESCRIPTION = "remake is a patched and modernized version of GNU make \ -utility that adds improved error reporting, the ability to trace \ -execution in a comprehensible way, and a debugger." - -HOMEPAGE = "http://bashdb.sourceforge.net/remake/" -SECTION = "devel" - -SRC_URI = "git://github.com/rocky/remake.git" - -inherit autotools gettext update-alternatives pkgconfig - -ALTERNATIVE_${PN} = "make" -ALTERNATIVE_LINK_NAME[make] = "${bindir}/make" -ALTERNATIVE_TARGET[make] = "${bindir}/remake" -ALTERNATIVE_PRIORITY = "100" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch deleted file mode 100644 index fa6329e06..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -version-remake.texi is not there but it is required by remake.texi, -just add it for getting the 'make remake.info' works. - -============================================================== -diff --git a/doc/version-remake.texi b/doc/version-remake.texi -new file mode 100644 -index 0000000..2a3b72b ---- /dev/null -+++ b/doc/version-remake.texi -@@ -0,0 +1,4 @@ -+@set UPDATED 10 June 2012 -+@set UPDATED-MONTH June 2012 -+@set EDITION 3.82+dbg-0.9git -+@set VERSION 3.82+dbg-0.9git diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb deleted file mode 100644 index 8eab7e3a0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4" -require remake.inc - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+)\+dbg.+)" -SRC_URI += "file://version-remake.texi.patch \ - " -SRCREV = "cf54641d50a0165bb17622b3e9770f426ccbc561" -S = "${WORKDIR}/git" - -DEPENDS += "readline guile" -# Need to add "gettext-native" dependency to remake-native. -# By default only "gettext-minimal-native" is added -# when inherit gettext. -DEPENDS_class-native += "gettext-native" -PROVIDES += "virtual/make" - -do_configure_prepend() { - # remove the default LINGUAS since we are not going to generate languages - rm ${S}/po/LINGUAS - touch ${S}/po/LINGUAS - # create config.rpath which required by configure.ac - ( cd ${S}; autopoint || touch config.rpath ) -} - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch index d99ddeb9e..1f61acaf4 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch @@ -4,7 +4,7 @@ Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. -Upstream-Status: Inappropriate [oe-core specific] +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/263] Signed-off-by: Alexander Kanavin --- diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch index 95c70136b..edf9ec089 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin Date: Mon, 27 Feb 2017 14:43:21 +0200 Subject: [PATCH] Fix build with musl C library. -Upstream-Status: Pending +Upstream-Status: Inappropriate [problem already solved in master branch] Signed-off-by: Alexander Kanavin diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch new file mode 100644 index 000000000..6e44f0b7f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch @@ -0,0 +1,84 @@ +From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 25 May 2017 18:15:27 +0300 +Subject: [PATCH 1/4] Split binary package building into a separate function + +So that it can be run as a thread pool task. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] +Signed-off-by: Alexander Kanavin + +--- + build/pack.c | 33 +++++++++++++++++++++------------ + 1 file changed, 21 insertions(+), 12 deletions(-) + +diff --git a/build/pack.c b/build/pack.c +index 518f4e92a..ccfd614cc 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck) + return RPMRC_OK; + } + +-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) ++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename) + { +- rpmRC rc; +- const char *errorString; +- Package pkg; +- char *pkglist = NULL; +- +- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { +- char *fn; ++ const char *errorString; ++ rpmRC rc = RPMRC_OK; + + if (pkg->fileList == NULL) +- continue; ++ return rc; + + if ((rc = processScriptFiles(spec, pkg))) + return rc; +@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) + headerGetString(pkg->header, RPMTAG_NAME), errorString); + return RPMRC_FAIL; + } +- fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL); ++ *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL); + if ((binDir = strchr(binRpm, '/')) != NULL) { + struct stat st; + char *dn; +@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) + free(binRpm); + } + +- rc = writeRPM(pkg, NULL, fn, NULL); ++ rc = writeRPM(pkg, NULL, *filename, NULL); + if (rc == RPMRC_OK) { + /* Do check each written package if enabled */ +- char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL); ++ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL); + if (pkgcheck[0] != ' ') { + rc = checkPackages(pkgcheck); + } + free(pkgcheck); ++ } ++ return rc; ++} ++ ++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) ++{ ++ rpmRC rc; ++ Package pkg; ++ char *pkglist = NULL; ++ ++ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { ++ char *fn = NULL; ++ rc = packageBinary(spec, pkg, cookie, cheating, &fn); ++ if (rc == RPMRC_OK) { + rstrcat(&pkglist, fn); + rstrcat(&pkglist, " "); + } +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch new file mode 100644 index 000000000..d10041c2e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch @@ -0,0 +1,127 @@ +From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 25 May 2017 19:30:20 +0300 +Subject: [PATCH 1/3] Run binary package creation via thread pools. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] +Signed-off-by: Alexander Kanavin + +--- + build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++----------- + configure.ac | 3 +++ + 2 files changed, 70 insertions(+), 14 deletions(-) + +diff --git a/build/pack.c b/build/pack.c +index ccfd614cc..ed5b9ab4e 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + return rc; + } + +-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) ++struct binaryPackageTaskData + { +- rpmRC rc; + Package pkg; ++ char *filename; ++ rpmRC result; ++ struct binaryPackageTaskData *next; ++}; ++ ++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating) ++{ ++ struct binaryPackageTaskData *tasks = NULL; ++ struct binaryPackageTaskData *task = NULL; ++ struct binaryPackageTaskData *prev = NULL; ++ ++ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) { ++ task = rcalloc(1, sizeof(*task)); ++ task->pkg = pkg; ++ if (pkg == spec->packages) { ++ // the first package needs to be processed ahead of others, as they copy ++ // changelog data from it, and so otherwise data races would happen ++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename)); ++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); ++ tasks = task; ++ } ++ if (prev != NULL) { ++ prev->next = task; ++ } ++ prev = task; ++ } ++ ++ #pragma omp parallel ++ #pragma omp single ++ // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults ++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { ++ if (task != tasks) ++ #pragma omp task ++ { ++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename)); ++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); ++ } ++ } ++ ++ return tasks; ++} ++ ++static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks) ++{ ++ while (tasks != NULL) { ++ struct binaryPackageTaskData* next = tasks->next; ++ rfree(tasks->filename); ++ rfree(tasks); ++ tasks = next; ++ } ++} ++ ++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) ++{ + char *pkglist = NULL; + +- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { +- char *fn = NULL; +- rc = packageBinary(spec, pkg, cookie, cheating, &fn); +- if (rc == RPMRC_OK) { +- rstrcat(&pkglist, fn); +- rstrcat(&pkglist, " "); +- } +- free(fn); +- if (rc != RPMRC_OK) { +- pkglist = _free(pkglist); +- return rc; +- } ++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating); ++ ++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { ++ if (task->result == RPMRC_OK) { ++ rstrcat(&pkglist, task->filename); ++ rstrcat(&pkglist, " "); ++ } else { ++ _free(pkglist); ++ freeBinaryPackageTasks(tasks); ++ return RPMRC_FAIL; ++ } + } ++ freeBinaryPackageTasks(tasks); + + /* Now check the package set if enabled */ + if (pkglist != NULL) { +diff --git a/configure.ac b/configure.ac +index a506ec819..59fa0acaf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,6 +17,9 @@ AC_DISABLE_STATIC + + PKG_PROG_PKG_CONFIG + ++AC_OPENMP ++RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS" ++ + dnl Checks for programs. + AC_PROG_CXX + AC_PROG_AWK +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch new file mode 100644 index 000000000..c348ae533 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch @@ -0,0 +1,207 @@ +From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 30 May 2017 13:58:30 +0300 +Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools + thread-safe + +Otherwise multithreaded rpm building explodes in various ways due +to data races. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] +Signed-off-by: Alexander Kanavin + +--- + rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 47 insertions(+), 9 deletions(-) + +diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c +index 30a57eb10..58ba95a02 100644 +--- a/rpmio/rpmstrpool.c ++++ b/rpmio/rpmstrpool.c +@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets) + return ht; + } + ++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid); ++ + static void poolHashResize(rpmstrPool pool, int numBuckets) + { + poolHash ht = pool->hash; +@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets) + + for (int i=0; inumBuckets; i++) { + if (!ht->buckets[i].keyid) continue; +- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid)); ++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid)); + for (unsigned int j=0;;j++) { + unsigned int hash = hashbucket(keyHash, j) % numBuckets; + if (!buckets[hash].keyid) { +@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke + ht->buckets[hash].keyid = keyid; + ht->keyCount++; + break; +- } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) { ++ } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) { + return; + } + } +@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool) + int maxcollisions = 0; + + for (i=0; inumBuckets; i++) { +- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid)); ++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid)); + for (unsigned int j=0;;j++) { + unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets; + if (hash==i) { +@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool) + + pool->hash = poolHashCreate(sizehint); + for (int i = 1; i <= pool->offs_size; i++) +- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i); ++ poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i); + } + + rpmstrPool rpmstrPoolCreate(void) +@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void) + + rpmstrPool rpmstrPoolFree(rpmstrPool pool) + { ++ #pragma omp critical(rpmstrpool) ++ { + if (pool) { + if (pool->nrefs > 1) { + pool->nrefs--; +@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool) + free(pool); + } + } ++ } + return NULL; + } + + rpmstrPool rpmstrPoolLink(rpmstrPool pool) + { ++ #pragma omp critical(rpmstrpool) ++ { + if (pool) + pool->nrefs++; ++ } + return pool; + } + + void rpmstrPoolFreeze(rpmstrPool pool, int keephash) + { ++ #pragma omp critical(rpmstrpool) ++ { + if (pool && !pool->frozen) { + if (!keephash) { + pool->hash = poolHashFree(pool->hash); +@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash) + pool->offs_alloced * sizeof(*pool->offs)); + pool->frozen = 1; + } ++ } + } + + void rpmstrPoolUnfreeze(rpmstrPool pool) + { ++ #pragma omp critical(rpmstrpool) ++ { + if (pool) { + if (pool->hash == NULL) { + rpmstrPoolRehash(pool); + } + pool->frozen = 0; + } ++ } + } + + static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash) +@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen, + return 0; + } + +- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid); ++ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid); + /* pool string could be longer than keylen, require exact matche */ + if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0') + return ht->buckets[hash].keyid; +@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen, + rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create) + { + rpmsid sid = 0; +- ++ #pragma omp critical(rpmstrpool) ++ { + if (s != NULL) { + unsigned int hash = rstrnhash(s, slen); + sid = strn2id(pool, s, slen, hash, create); + } ++ } + return sid; + } + + rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create) + { + rpmsid sid = 0; +- ++ #pragma omp critical(rpmstrpool) ++ { + if (s != NULL) { + size_t slen; + unsigned int hash = rstrlenhash(s, &slen); + sid = strn2id(pool, s, slen, hash, create); + } ++ } + return sid; + } + +-const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) ++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid) + { + const char *s = NULL; + if (pool && sid > 0 && sid <= pool->offs_size) +@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) + return s; + } + ++const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) ++{ ++ const char *s = NULL; ++ #pragma omp critical(rpmstrpool) ++ { ++ s = rpmstrPoolStrNoLock(pool, sid); ++ } ++ return s; ++} ++ + size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid) + { + size_t slen = 0; ++ #pragma omp critical(rpmstrpool) ++ { + if (pool && sid > 0 && sid <= pool->offs_size) { + slen = strlen(pool->offs[sid]); + } ++ } + return slen; + } + +@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA, + + rpmsid rpmstrPoolNumStr(rpmstrPool pool) + { +- return (pool != NULL) ? pool->offs_size : 0; ++ rpmsid id = 0; ++ #pragma omp critical(rpmstrpool) ++ { ++ if (pool) { ++ id = pool->offs_size; ++ } ++ } ++ return id; + } +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch new file mode 100644 index 000000000..64a5651f7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch @@ -0,0 +1,337 @@ +From ec305795a302d226343e69031ff2024dfcde69c0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 8 Jun 2017 17:08:09 +0300 +Subject: [PATCH 3/3] build/pack.c: remove static local variables from + buildHost() and getBuildTime() + +Their use is causing difficult to diagnoze data races when building multiple +packages in parallel, and is a bad idea in general, as it also makes it more +difficult to reason about code. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] +Signed-off-by: Alexander Kanavin + + +Signed-off-by: Alexander Kanavin +--- + build/build.c | 54 ++++++++++++++++++++++++++++-- + build/pack.c | 84 +++++++++-------------------------------------- + build/rpmbuild_internal.h | 8 +++-- + 3 files changed, 74 insertions(+), 72 deletions(-) + +diff --git a/build/build.c b/build/build.c +index 5f99c8db7..09a1311c5 100644 +--- a/build/build.c ++++ b/build/build.c +@@ -6,6 +6,8 @@ + #include "system.h" + + #include ++#include ++#include + #include + + #include +@@ -16,6 +18,50 @@ + + #include "debug.h" + ++static rpm_time_t getBuildTime(void) ++{ ++ rpm_time_t buildTime = 0; ++ char *srcdate; ++ time_t epoch; ++ char *endptr; ++ ++ srcdate = getenv("SOURCE_DATE_EPOCH"); ++ if (srcdate) { ++ errno = 0; ++ epoch = strtol(srcdate, &endptr, 10); ++ if (srcdate == endptr || *endptr || errno != 0) ++ rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n")); ++ else ++ buildTime = (int32_t) epoch; ++ } else ++ buildTime = (int32_t) time(NULL); ++ ++ return buildTime; ++} ++ ++static char * buildHost(void) ++{ ++ char* hostname; ++ struct hostent *hbn; ++ char *bhMacro; ++ ++ bhMacro = rpmExpand("%{?_buildhost}", NULL); ++ if (strcmp(bhMacro, "") != 0) { ++ rasprintf(&hostname, "%s", bhMacro); ++ } else { ++ hostname = rcalloc(1024, sizeof(*hostname)); ++ (void) gethostname(hostname, 1024); ++ hbn = gethostbyname(hostname); ++ if (hbn) ++ strcpy(hostname, hbn->h_name); ++ else ++ rpmlog(RPMLOG_WARNING, ++ _("Could not canonicalize hostname: %s\n"), hostname); ++ } ++ free(bhMacro); ++ return(hostname); ++} ++ + /** + */ + static rpmRC doRmSource(rpmSpec spec) +@@ -203,6 +249,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) + rpmRC rc = RPMRC_OK; + int test = (what & RPMBUILD_NOBUILD); + char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL; ++ const char* host = buildHost(); ++ rpm_time_t buildTime = getBuildTime(); ++ + + if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") && + getenv("SOURCE_DATE_EPOCH") == NULL) { +@@ -271,11 +320,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) + goto exit; + + if (((what & RPMBUILD_PACKAGESOURCE) && !test) && +- (rc = packageSources(spec, &cookie))) ++ (rc = packageSources(spec, &cookie, buildTime, host))) + return rc; + + if (((what & RPMBUILD_PACKAGEBINARY) && !test) && +- (rc = packageBinaries(spec, cookie, (didBuild == 0)))) ++ (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host))) + goto exit; + + if ((what & RPMBUILD_CLEAN) && +@@ -295,6 +344,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) + (void) unlink(spec->specFile); + + exit: ++ free(host); + free(cookie); + spec->rootDir = NULL; + if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) { +diff --git a/build/pack.c b/build/pack.c +index ed5b9ab4e..62427065a 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -6,8 +6,6 @@ + #include "system.h" + + #include +-#include +-#include + #include + + #include /* RPMSIGTAG*, rpmReadPackageFile */ +@@ -151,57 +149,6 @@ exit: + return rc; + } + +-static rpm_time_t * getBuildTime(void) +-{ +- static rpm_time_t buildTime[1]; +- char *srcdate; +- time_t epoch; +- char *endptr; +- +- if (buildTime[0] == 0) { +- srcdate = getenv("SOURCE_DATE_EPOCH"); +- if (srcdate) { +- errno = 0; +- epoch = strtol(srcdate, &endptr, 10); +- if (srcdate == endptr || *endptr || errno != 0) +- rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n")); +- else +- buildTime[0] = (int32_t) epoch; +- } else +- buildTime[0] = (int32_t) time(NULL); +- } +- +- return buildTime; +-} +- +-static const char * buildHost(void) +-{ +- static char hostname[1024]; +- static int oneshot = 0; +- struct hostent *hbn; +- char *bhMacro; +- +- if (! oneshot) { +- bhMacro = rpmExpand("%{?_buildhost}", NULL); +- if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) { +- strcpy(hostname, bhMacro); +- } else { +- if (strcmp(bhMacro, "") != 0) +- rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n")); +- (void) gethostname(hostname, sizeof(hostname)); +- hbn = gethostbyname(hostname); +- if (hbn) +- strcpy(hostname, hbn->h_name); +- else +- rpmlog(RPMLOG_WARNING, +- _("Could not canonicalize hostname: %s\n"), hostname); +- } +- free(bhMacro); +- oneshot = 1; +- } +- return(hostname); +-} +- + static rpmRC processScriptFiles(rpmSpec spec, Package pkg) + { + struct TriggerFileEntry *p; +@@ -308,7 +255,8 @@ static int haveRichDep(Package pkg) + } + + static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp, +- const char *fileName, char **cookie) ++ const char *fileName, char **cookie, ++ rpm_time_t buildTime, const char* buildHost) + { + FD_t fd = NULL; + char * rpmio_flags = NULL; +@@ -397,7 +345,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp, + + /* Create and add the cookie */ + if (cookie) { +- rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime())); ++ rasprintf(cookie, "%s %d", buildHost, buildTime); + headerPutString(pkg->header, RPMTAG_COOKIE, *cookie); + } + +@@ -546,7 +494,7 @@ static rpmRC checkPackages(char *pkgcheck) + return RPMRC_OK; + } + +-static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename) ++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost) + { + const char *errorString; + rpmRC rc = RPMRC_OK; +@@ -565,8 +513,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerCopyTags(spec->packages->header, pkg->header, copyTags); + + headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION); +- headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost()); +- headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); ++ headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost); ++ headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1); + + if (spec->sourcePkgId != NULL) { + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); +@@ -604,7 +552,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + free(binRpm); + } + +- rc = writeRPM(pkg, NULL, *filename, NULL); ++ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost); + if (rc == RPMRC_OK) { + /* Do check each written package if enabled */ + char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL); +@@ -624,7 +572,7 @@ struct binaryPackageTaskData + struct binaryPackageTaskData *next; + }; + +-static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating) ++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost) + { + struct binaryPackageTaskData *tasks = NULL; + struct binaryPackageTaskData *task = NULL; +@@ -636,7 +584,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c + if (pkg == spec->packages) { + // the first package needs to be processed ahead of others, as they copy + // changelog data from it, and so otherwise data races would happen +- task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename)); ++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost); + rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); + tasks = task; + } +@@ -653,7 +601,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c + if (task != tasks) + #pragma omp task + { +- task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename)); ++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost); + rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); + } + } +@@ -671,11 +619,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks) + } + } + +-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) ++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost) + { + char *pkglist = NULL; + +- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating); ++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost); + + for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { + if (task->result == RPMRC_OK) { +@@ -702,22 +650,22 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) + return RPMRC_OK; + } + +-rpmRC packageSources(rpmSpec spec, char **cookie) ++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost) + { + Package sourcePkg = spec->sourcePackage; + rpmRC rc; + + /* Add some cruft */ + headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION); +- headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost()); +- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); ++ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost); ++ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1); + + /* XXX this should be %_srpmdir */ + { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL); + char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL); + + spec->sourcePkgId = NULL; +- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie); ++ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost); + + /* Do check SRPM package if enabled */ + if (rc == RPMRC_OK && pkgcheck[0] != ' ') { +diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h +index 8351a6a34..797337ca7 100644 +--- a/build/rpmbuild_internal.h ++++ b/build/rpmbuild_internal.h +@@ -408,19 +408,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags); + * @param spec spec file control structure + * @param cookie build identifier "cookie" or NULL + * @param cheating was build shortcircuited? ++ * @param buildTime the build timestamp that goes into packages ++ * @param buildHost the hostname where the build is happening + * @return RPMRC_OK on success + */ + RPM_GNUC_INTERNAL +-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating); ++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost); + + /** \ingroup rpmbuild + * Generate source package. + * @param spec spec file control structure + * @retval cookie build identifier "cookie" or NULL ++ * @param buildTime the build timestamp that goes into packages ++ * @param buildHost the hostname where the build is happening + * @return RPMRC_OK on success + */ + RPM_GNUC_INTERNAL +-rpmRC packageSources(rpmSpec spec, char **cookie); ++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost); + + RPM_GNUC_INTERNAL + int addLangTag(rpmSpec spec, Header h, rpmTagVal tag, +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb index b0f57809c..7866314ad 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb @@ -38,8 +38,13 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \ file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \ file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \ file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \ + file://0001-Split-binary-package-building-into-a-separate-functi.patch \ + file://0002-Run-binary-package-creation-via-thread-pools.patch \ + file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ + file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ file://0001-perl-disable-auto-reqs.patch \ " +UPSTREAM_VERSION_UNKNOWN = "1" PV = "4.13.90+git${SRCPV}" PE = "1" @@ -47,8 +52,8 @@ SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be" S = "${WORKDIR}/git" -DEPENDS = "nss libarchive db file popt xz dbus elfutils python3" -DEPENDS_append_class-native = " file-replacement-native" +DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3" +DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" inherit autotools gettext pkgconfig python3native export PYTHON_ABI @@ -68,6 +73,9 @@ EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --di BBCLASSEXTEND = "native nativesdk" +PACKAGECONFIG ??= "" +PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" + # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in # libmagic also has sysroot path contamination, so override it do_install_append_class-native() { @@ -99,7 +107,8 @@ do_install_append_class-target() { } do_install_append () { - sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}/${libdir}/rpm/macros + sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ + ${D}/${libdir}/rpm/macros sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ ${D}${libdir}/rpm/pythondistdeps.py @@ -119,3 +128,11 @@ FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" RPROVIDES_${PN} += "rpm-build" RDEPENDS_${PN} = "bash perl python3-core" + +PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" + +# Do not specify a sysroot when compiling on a target. +rpm_package_preprocess () { + sed -i -e 's:--sysroot[^ ]*::g' \ + ${PKGD}/${libdir}/rpm/macros +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch deleted file mode 100644 index 700d1bc58..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch +++ /dev/null @@ -1,353 +0,0 @@ -From d86d283fcb35d1442a121b92030884523908a331 Mon Sep 17 00:00:00 2001 -From: nagachika -Date: Sat, 22 Apr 2017 07:29:01 +0000 -Subject: [PATCH] merge revision(s) 58323,58324: - - Merge json-2.0.4. - - * https://github.com/flori/json/releases/tag/v2.0.4 - * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204 - Use `assert_raise` instead of `assert_raises`. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - -Upstream-Status: Backport -CVE: CVE-2017-14064 - -Signed-off-by: Armin Kuster - ---- - ext/json/fbuffer/fbuffer.h | 3 --- - ext/json/generator/generator.c | 12 +++++----- - ext/json/generator/generator.h | 1 - - ext/json/json.gemspec | Bin 5473 -> 5474 bytes - ext/json/lib/json/version.rb | 2 +- - ext/json/parser/parser.c | 48 +++++++++++++++++++++++---------------- - ext/json/parser/parser.rl | 14 +++++++++--- - test/json/json_encoding_test.rb | 2 ++ - test/json/json_generator_test.rb | 0 - version.h | 2 +- - 10 files changed, 49 insertions(+), 35 deletions(-) - mode change 100755 => 100644 test/json/json_generator_test.rb - -Index: ruby-2.4.0/ext/json/fbuffer/fbuffer.h -=================================================================== ---- ruby-2.4.0.orig/ext/json/fbuffer/fbuffer.h -+++ ruby-2.4.0/ext/json/fbuffer/fbuffer.h -@@ -12,9 +12,6 @@ - #define RFLOAT_VALUE(val) (RFLOAT(val)->value) - #endif - --#ifndef RARRAY_PTR --#define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr --#endif - #ifndef RARRAY_LEN - #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len - #endif -Index: ruby-2.4.0/ext/json/generator/generator.c -=================================================================== ---- ruby-2.4.0.orig/ext/json/generator/generator.c -+++ ruby-2.4.0/ext/json/generator/generator.c -@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, u - char *result; - if (len <= 0) return NULL; - result = ALLOC_N(char, len); -- memccpy(result, ptr, 0, len); -+ memcpy(result, ptr, len); - return result; - } - -@@ -1062,7 +1062,7 @@ static VALUE cState_indent_set(VALUE sel - } - } else { - if (state->indent) ruby_xfree(state->indent); -- state->indent = strdup(RSTRING_PTR(indent)); -+ state->indent = fstrndup(RSTRING_PTR(indent), len); - state->indent_len = len; - } - return Qnil; -@@ -1100,7 +1100,7 @@ static VALUE cState_space_set(VALUE self - } - } else { - if (state->space) ruby_xfree(state->space); -- state->space = strdup(RSTRING_PTR(space)); -+ state->space = fstrndup(RSTRING_PTR(space), len); - state->space_len = len; - } - return Qnil; -@@ -1136,7 +1136,7 @@ static VALUE cState_space_before_set(VAL - } - } else { - if (state->space_before) ruby_xfree(state->space_before); -- state->space_before = strdup(RSTRING_PTR(space_before)); -+ state->space_before = fstrndup(RSTRING_PTR(space_before), len); - state->space_before_len = len; - } - return Qnil; -@@ -1173,7 +1173,7 @@ static VALUE cState_object_nl_set(VALUE - } - } else { - if (state->object_nl) ruby_xfree(state->object_nl); -- state->object_nl = strdup(RSTRING_PTR(object_nl)); -+ state->object_nl = fstrndup(RSTRING_PTR(object_nl), len); - state->object_nl_len = len; - } - return Qnil; -@@ -1208,7 +1208,7 @@ static VALUE cState_array_nl_set(VALUE s - } - } else { - if (state->array_nl) ruby_xfree(state->array_nl); -- state->array_nl = strdup(RSTRING_PTR(array_nl)); -+ state->array_nl = fstrndup(RSTRING_PTR(array_nl), len); - state->array_nl_len = len; - } - return Qnil; -Index: ruby-2.4.0/ext/json/generator/generator.h -=================================================================== ---- ruby-2.4.0.orig/ext/json/generator/generator.h -+++ ruby-2.4.0/ext/json/generator/generator.h -@@ -1,7 +1,6 @@ - #ifndef _GENERATOR_H_ - #define _GENERATOR_H_ - --#include - #include - #include - -Index: ruby-2.4.0/ext/json/lib/json/version.rb -=================================================================== ---- ruby-2.4.0.orig/ext/json/lib/json/version.rb -+++ ruby-2.4.0/ext/json/lib/json/version.rb -@@ -1,7 +1,7 @@ - # frozen_string_literal: false - module JSON - # JSON version -- VERSION = '2.0.2' -+ VERSION = '2.0.4' - VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: - VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: - VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: -Index: ruby-2.4.0/ext/json/parser/parser.c -=================================================================== ---- ruby-2.4.0.orig/ext/json/parser/parser.c -+++ ruby-2.4.0/ext/json/parser/parser.c -@@ -1435,13 +1435,21 @@ static VALUE json_string_unescape(VALUE - break; - case 'u': - if (pe > stringEnd - 4) { -- return Qnil; -+ rb_enc_raise( -+ EXC_ENCODING eParserError, -+ "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p -+ ); - } else { - UTF32 ch = unescape_unicode((unsigned char *) ++pe); - pe += 3; - if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { - pe++; -- if (pe > stringEnd - 6) return Qnil; -+ if (pe > stringEnd - 6) { -+ rb_enc_raise( -+ EXC_ENCODING eParserError, -+ "%u: incomplete surrogate pair at '%s'", __LINE__, p -+ ); -+ } - if (pe[0] == '\\' && pe[1] == 'u') { - UTF32 sur = unescape_unicode((unsigned char *) pe + 2); - ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16) -@@ -1471,7 +1479,7 @@ static VALUE json_string_unescape(VALUE - } - - --#line 1475 "parser.c" -+#line 1483 "parser.c" - enum {JSON_string_start = 1}; - enum {JSON_string_first_final = 8}; - enum {JSON_string_error = 0}; -@@ -1479,7 +1487,7 @@ enum {JSON_string_error = 0}; - enum {JSON_string_en_main = 1}; - - --#line 504 "parser.rl" -+#line 512 "parser.rl" - - - static int -@@ -1501,15 +1509,15 @@ static char *JSON_parse_string(JSON_Pars - - *result = rb_str_buf_new(0); - --#line 1505 "parser.c" -+#line 1513 "parser.c" - { - cs = JSON_string_start; - } - --#line 525 "parser.rl" -+#line 533 "parser.rl" - json->memo = p; - --#line 1513 "parser.c" -+#line 1521 "parser.c" - { - if ( p == pe ) - goto _test_eof; -@@ -1534,7 +1542,7 @@ case 2: - goto st0; - goto st2; - tr2: --#line 490 "parser.rl" -+#line 498 "parser.rl" - { - *result = json_string_unescape(*result, json->memo + 1, p); - if (NIL_P(*result)) { -@@ -1545,14 +1553,14 @@ tr2: - {p = (( p + 1))-1;} - } - } --#line 501 "parser.rl" -+#line 509 "parser.rl" - { p--; {p++; cs = 8; goto _out;} } - goto st8; - st8: - if ( ++p == pe ) - goto _test_eof8; - case 8: --#line 1556 "parser.c" -+#line 1564 "parser.c" - goto st0; - st3: - if ( ++p == pe ) -@@ -1628,7 +1636,7 @@ case 7: - _out: {} - } - --#line 527 "parser.rl" -+#line 535 "parser.rl" - - if (json->create_additions && RTEST(match_string = json->match_string)) { - VALUE klass; -@@ -1675,7 +1683,7 @@ static VALUE convert_encoding(VALUE sour - } - FORCE_UTF8(source); - } else { -- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding()); -+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding()); - } - #endif - return source; -@@ -1808,7 +1816,7 @@ static VALUE cParser_initialize(int argc - } - - --#line 1812 "parser.c" -+#line 1820 "parser.c" - enum {JSON_start = 1}; - enum {JSON_first_final = 10}; - enum {JSON_error = 0}; -@@ -1816,7 +1824,7 @@ enum {JSON_error = 0}; - enum {JSON_en_main = 1}; - - --#line 720 "parser.rl" -+#line 728 "parser.rl" - - - /* -@@ -1833,16 +1841,16 @@ static VALUE cParser_parse(VALUE self) - GET_PARSER; - - --#line 1837 "parser.c" -+#line 1845 "parser.c" - { - cs = JSON_start; - } - --#line 736 "parser.rl" -+#line 744 "parser.rl" - p = json->source; - pe = p + json->len; - --#line 1846 "parser.c" -+#line 1854 "parser.c" - { - if ( p == pe ) - goto _test_eof; -@@ -1876,7 +1884,7 @@ st0: - cs = 0; - goto _out; - tr2: --#line 712 "parser.rl" -+#line 720 "parser.rl" - { - char *np = JSON_parse_value(json, p, pe, &result, 0); - if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;} -@@ -1886,7 +1894,7 @@ st10: - if ( ++p == pe ) - goto _test_eof10; - case 10: --#line 1890 "parser.c" -+#line 1898 "parser.c" - switch( (*p) ) { - case 13: goto st10; - case 32: goto st10; -@@ -1975,7 +1983,7 @@ case 9: - _out: {} - } - --#line 739 "parser.rl" -+#line 747 "parser.rl" - - if (cs >= JSON_first_final && p == pe) { - return result; -Index: ruby-2.4.0/ext/json/parser/parser.rl -=================================================================== ---- ruby-2.4.0.orig/ext/json/parser/parser.rl -+++ ruby-2.4.0/ext/json/parser/parser.rl -@@ -446,13 +446,21 @@ static VALUE json_string_unescape(VALUE - break; - case 'u': - if (pe > stringEnd - 4) { -- return Qnil; -+ rb_enc_raise( -+ EXC_ENCODING eParserError, -+ "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p -+ ); - } else { - UTF32 ch = unescape_unicode((unsigned char *) ++pe); - pe += 3; - if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { - pe++; -- if (pe > stringEnd - 6) return Qnil; -+ if (pe > stringEnd - 6) { -+ rb_enc_raise( -+ EXC_ENCODING eParserError, -+ "%u: incomplete surrogate pair at '%s'", __LINE__, p -+ ); -+ } - if (pe[0] == '\\' && pe[1] == 'u') { - UTF32 sur = unescape_unicode((unsigned char *) pe + 2); - ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16) -@@ -570,7 +578,7 @@ static VALUE convert_encoding(VALUE sour - } - FORCE_UTF8(source); - } else { -- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding()); -+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding()); - } - #endif - return source; -Index: ruby-2.4.0/test/json/json_encoding_test.rb -=================================================================== ---- ruby-2.4.0.orig/test/json/json_encoding_test.rb -+++ ruby-2.4.0/test/json/json_encoding_test.rb -@@ -79,6 +79,8 @@ class JSONEncodingTest < Test::Unit::Tes - json = '["\ud840\udc01"]' - assert_equal json, generate(utf8, :ascii_only => true) - assert_equal utf8, parse(json) -+ assert_raise(JSON::ParserError) { parse('"\u"') } -+ assert_raise(JSON::ParserError) { parse('"\ud800"') } - end - - def test_chars diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch index 8b6845034..a5b2184af 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch @@ -1,3 +1,4 @@ +Upstream-Status: Pending diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb --- ruby-1.8.7-p248.orig/ext/extmk.rb 2009-12-24 03:01:58.000000000 -0600 +++ ruby-1.8.7-p248/ext/extmk.rb 2010-02-12 15:55:27.370061558 -0600 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch new file mode 100644 index 000000000..88e693c94 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch @@ -0,0 +1,87 @@ +From 8f782fd8e181d9cfe9387ded43a5ca9692266b85 Mon Sep 17 00:00:00 2001 +From: Florian Frank +Date: Thu, 2 Mar 2017 12:12:33 +0100 +Subject: [PATCH] Fix arbitrary heap exposure problem + +Upstream-Status: Backport +CVE: CVE-2017-14064 + +Signed-off-by: Ovidiu Panait +--- + ext/json/generator/generator.c | 12 ++++++------ + ext/json/generator/generator.h | 1 - + 2 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c +index ef85bb7..c88818c 100644 +--- a/ext/json/generator/generator.c ++++ b/ext/json/generator/generator.c +@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, unsigned long len) { + char *result; + if (len <= 0) return NULL; + result = ALLOC_N(char, len); +- memccpy(result, ptr, 0, len); ++ memcpy(result, ptr, len); + return result; + } + +@@ -1062,7 +1062,7 @@ static VALUE cState_indent_set(VALUE self, VALUE indent) + } + } else { + if (state->indent) ruby_xfree(state->indent); +- state->indent = strdup(RSTRING_PTR(indent)); ++ state->indent = fstrndup(RSTRING_PTR(indent), len); + state->indent_len = len; + } + return Qnil; +@@ -1100,7 +1100,7 @@ static VALUE cState_space_set(VALUE self, VALUE space) + } + } else { + if (state->space) ruby_xfree(state->space); +- state->space = strdup(RSTRING_PTR(space)); ++ state->space = fstrndup(RSTRING_PTR(space), len); + state->space_len = len; + } + return Qnil; +@@ -1136,7 +1136,7 @@ static VALUE cState_space_before_set(VALUE self, VALUE space_before) + } + } else { + if (state->space_before) ruby_xfree(state->space_before); +- state->space_before = strdup(RSTRING_PTR(space_before)); ++ state->space_before = fstrndup(RSTRING_PTR(space_before), len); + state->space_before_len = len; + } + return Qnil; +@@ -1173,7 +1173,7 @@ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl) + } + } else { + if (state->object_nl) ruby_xfree(state->object_nl); +- state->object_nl = strdup(RSTRING_PTR(object_nl)); ++ state->object_nl = fstrndup(RSTRING_PTR(object_nl), len); + state->object_nl_len = len; + } + return Qnil; +@@ -1208,7 +1208,7 @@ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl) + } + } else { + if (state->array_nl) ruby_xfree(state->array_nl); +- state->array_nl = strdup(RSTRING_PTR(array_nl)); ++ state->array_nl = fstrndup(RSTRING_PTR(array_nl), len); + state->array_nl_len = len; + } + return Qnil; +diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h +index 900b4d5..c367a62 100644 +--- a/ext/json/generator/generator.h ++++ b/ext/json/generator/generator.h +@@ -1,7 +1,6 @@ + #ifndef _GENERATOR_H_ + #define _GENERATOR_H_ + +-#include + #include + #include + +-- +2.10.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb deleted file mode 100644 index 8cc52d621..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb +++ /dev/null @@ -1,53 +0,0 @@ -require ruby.inc - -SRC_URI += " \ - file://ruby-CVE-2017-9224.patch \ - file://ruby-CVE-2017-9226.patch \ - file://ruby-CVE-2017-9227.patch \ - file://ruby-CVE-2017-9228.patch \ - file://ruby-CVE-2017-9229.patch \ - file://CVE-2017-14064.patch \ - " - -SRC_URI[md5sum] = "7e9485dcdb86ff52662728de2003e625" -SRC_URI[sha256sum] = "152fd0bd15a90b4a18213448f485d4b53e9f7662e1508190aa5b702446b29e3d" - -# it's unknown to configure script, but then passed to extconf.rb -# maybe it's not really needed as we're hardcoding the result with -# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch -UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" - -PACKAGECONFIG ??= "" -PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" - -PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" -PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp" -PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," - -EXTRA_AUTORECONF += "--exclude=aclocal" - -EXTRA_OECONF = "\ - --disable-versioned-paths \ - --disable-rpath \ - --disable-dtrace \ - --enable-shared \ - --enable-load-relative \ -" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" - -SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" -RDEPENDS_${PN}-ri-docs = "${PN}" -FILES_${PN}-ri-docs += "${datadir}/ri" - -SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" -RDEPENDS_${PN}-rdoc = "${PN}" -FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" - -FILES_${PN} += "${datadir}/rubygems" - -BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb new file mode 100644 index 000000000..7d27ac84e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb @@ -0,0 +1,53 @@ +require ruby.inc + +SRC_URI += " \ + file://ruby-CVE-2017-9224.patch \ + file://ruby-CVE-2017-9226.patch \ + file://ruby-CVE-2017-9227.patch \ + file://ruby-CVE-2017-9228.patch \ + file://ruby-CVE-2017-9229.patch \ + file://ruby-CVE-2017-14064.patch \ + " + +SRC_URI[md5sum] = "782bca562e474dd25956dd0017d92677" +SRC_URI[sha256sum] = "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250" + +# it's unknown to configure script, but then passed to extconf.rb +# maybe it's not really needed as we're hardcoding the result with +# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch +UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" + +PACKAGECONFIG ??= "" +PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" + +PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" +PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp" +PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," + +EXTRA_AUTORECONF += "--exclude=aclocal" + +EXTRA_OECONF = "\ + --disable-versioned-paths \ + --disable-rpath \ + --disable-dtrace \ + --enable-shared \ + --enable-load-relative \ +" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" + +SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" +RDEPENDS_${PN}-ri-docs = "${PN}" +FILES_${PN}-ri-docs += "${datadir}/ri" + +SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" +RDEPENDS_${PN}-rdoc = "${PN}" +FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" + +FILES_${PN} += "${datadir}/rubygems" + +BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service index 85a043949..1b71a1f8b 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service +++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service @@ -8,7 +8,7 @@ ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts [Service] Type=oneshot ExecStart=#SBINDIR#/run-postinsts -ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service +ExecStartPost=#BASE_BINDIR#/systemctl --no-reload disable run-postinsts.service RemainAfterExit=No TimeoutSec=0 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch new file mode 100644 index 000000000..39521a7d8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch @@ -0,0 +1,32 @@ +From https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch + +Signed-off-by: Martin Jansa + +Upstream-Status: Pending + + +sys/types.h might not always include sys/sysmacros.h for major/minor/makedev + +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -59,6 +59,7 @@ + #else + #include + #include ++#include + #endif + + #include "squashfs_fs.h" +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -38,6 +38,10 @@ + #include + #include + ++#ifdef linux ++#include ++#endif ++ + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_inflate, *to_writer, *from_writer; + pthread_t *thread, *inflator_thread; diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb index 33ed09ae8..0f991706c 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb @@ -13,8 +13,10 @@ SRCREV = "9c1db6d13a51a2e009f0027ef336ce03624eac0d" SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \ http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \ file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \ + file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \ file://fix-compat.patch \ " +UPSTREAM_VERSION_UNKNOWN = "1" SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759" SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch new file mode 100644 index 000000000..52096b28c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch @@ -0,0 +1,37 @@ +From 9f3fd388ae7c46420bccba405468690ed46d669a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 18 Sep 2017 22:51:32 -0700 +Subject: [PATCH] tests/sigaction: Check for mips and alpha before using + sa_restorer + +local structure does not define restorer member for mips and alpha +in definition, we need to match that assumption here where they are +being set + +Fixes +| ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer' +| # define SA_RESTORER_ARGS , new_act->restorer + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + tests/sigaction.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/sigaction.c b/tests/sigaction.c +index 7b46944..f46cda7 100644 +--- a/tests/sigaction.c ++++ b/tests/sigaction.c +@@ -170,7 +170,7 @@ main(void) + sigdelset(mask.libc, SIGHUP); + + memcpy(new_act->mask, mask.old, sizeof(mask.old)); +-#ifdef SA_RESTORER ++#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA) + new_act->flags = SA_RESTORER; + new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL; + # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx" +-- +2.14.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch index 876c2d862..97bcc90a8 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch @@ -1,19 +1,23 @@ -strace: Add ptest +From 0574ae9926308dcbca78bd8cd0f0f143f19cbcb5 Mon Sep 17 00:00:00 2001 +From: Gabriel Barbu +Date: Thu, 25 Jul 2013 15:28:33 +0200 +Subject: [PATCH 4/8] strace: Add ptest Upstream-Status: Inappropriate Signed-off-by: Gabriel Barbu Signed-off-by: Chong Lu + --- configure.ac | 2 +- tests/Makefile.am | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index b2b03c6..464a9dc 100644 +index 61d6425..6387c24 100644 --- a/configure.ac +++ b/configure.ac -@@ -39,7 +39,7 @@ AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.]) +@@ -41,7 +41,7 @@ AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.]) AC_CONFIG_SRCDIR([strace.c]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_HEADERS([config.h]) @@ -23,11 +27,11 @@ index b2b03c6..464a9dc 100644 AM_MAINTAINER_MODE AC_CANONICAL_HOST diff --git a/tests/Makefile.am b/tests/Makefile.am -index 311d3bb..72f9022 100644 +index 5aa7f89..a55a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -960,3 +960,21 @@ $(objects): scno.h - CLEANFILES = ksysent.h $(TESTS:=.tmp) +@@ -379,3 +379,21 @@ clean-local-check: + CLEANFILES = ksysent.h include ../scno.am + @@ -47,4 +51,7 @@ index 311d3bb..72f9022 100644 + install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \ + sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \ + done -+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done ++ for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch index 94ee53c7f..f6ffa8e7a 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch @@ -12,20 +12,20 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Andre McCurdy --- - mpers.awk | 2 +- - tests-m32/caps.awk | 2 +- - tests-m32/match.awk | 2 +- - tests-m32/sigaction.awk | 2 +- - tests-mx32/caps.awk | 2 +- - tests-mx32/match.awk | 2 +- - tests-mx32/sigaction.awk | 2 +- - tests/caps.awk | 2 +- - tests/match.awk | 2 +- - tests/sigaction.awk | 2 +- + mpers.awk | 2 +- + tests-m32/caps.awk | 2 +- + tests-m32/match.awk | 2 +- + tests-m32/rt_sigaction.awk | 2 +- + tests-mx32/caps.awk | 2 +- + tests-mx32/match.awk | 2 +- + tests-mx32/rt_sigaction.awk | 2 +- + tests/caps.awk | 2 +- + tests/match.awk | 2 +- + tests/rt_sigaction.awk | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mpers.awk b/mpers.awk -index 99248c5..ff10520 100644 +index fe54763..b5238a8 100644 --- a/mpers.awk +++ b/mpers.awk @@ -1,4 +1,4 @@ @@ -35,7 +35,7 @@ index 99248c5..ff10520 100644 # Copyright (c) 2015 Elvira Khabirova # Copyright (c) 2015-2016 Dmitry V. Levin diff --git a/tests-m32/caps.awk b/tests-m32/caps.awk -index 67003ac..a66f1f0 100644 +index c6e31ef..5efc6cc 100644 --- a/tests-m32/caps.awk +++ b/tests-m32/caps.awk @@ -1,4 +1,4 @@ @@ -54,18 +54,18 @@ index abfbae9..f2740bf 100644 # # Copyright (c) 2014-2015 Dmitry V. Levin # All rights reserved. -diff --git a/tests-m32/sigaction.awk b/tests-m32/sigaction.awk -index 5c6b6d0..3e14464 100644 ---- a/tests-m32/sigaction.awk -+++ b/tests-m32/sigaction.awk +diff --git a/tests-m32/rt_sigaction.awk b/tests-m32/rt_sigaction.awk +index 9c3a9ed..8414243 100644 +--- a/tests-m32/rt_sigaction.awk ++++ b/tests-m32/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # # Copyright (c) 2014-2015 Dmitry V. Levin - # All rights reserved. + # Copyright (c) 2016 Elvira Khabirova diff --git a/tests-mx32/caps.awk b/tests-mx32/caps.awk -index 67003ac..a66f1f0 100644 +index c6e31ef..5efc6cc 100644 --- a/tests-mx32/caps.awk +++ b/tests-mx32/caps.awk @@ -1,4 +1,4 @@ @@ -84,18 +84,18 @@ index abfbae9..f2740bf 100644 # # Copyright (c) 2014-2015 Dmitry V. Levin # All rights reserved. -diff --git a/tests-mx32/sigaction.awk b/tests-mx32/sigaction.awk -index 5c6b6d0..3e14464 100644 ---- a/tests-mx32/sigaction.awk -+++ b/tests-mx32/sigaction.awk +diff --git a/tests-mx32/rt_sigaction.awk b/tests-mx32/rt_sigaction.awk +index 9c3a9ed..8414243 100644 +--- a/tests-mx32/rt_sigaction.awk ++++ b/tests-mx32/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # # Copyright (c) 2014-2015 Dmitry V. Levin - # All rights reserved. + # Copyright (c) 2016 Elvira Khabirova diff --git a/tests/caps.awk b/tests/caps.awk -index 67003ac..a66f1f0 100644 +index c6e31ef..5efc6cc 100644 --- a/tests/caps.awk +++ b/tests/caps.awk @@ -1,4 +1,4 @@ @@ -114,13 +114,13 @@ index abfbae9..f2740bf 100644 # # Copyright (c) 2014-2015 Dmitry V. Levin # All rights reserved. -diff --git a/tests/sigaction.awk b/tests/sigaction.awk -index 5c6b6d0..3e14464 100644 ---- a/tests/sigaction.awk -+++ b/tests/sigaction.awk +diff --git a/tests/rt_sigaction.awk b/tests/rt_sigaction.awk +index 9c3a9ed..8414243 100644 +--- a/tests/rt_sigaction.awk ++++ b/tests/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # # Copyright (c) 2014-2015 Dmitry V. Levin - # All rights reserved. + # Copyright (c) 2016 Elvira Khabirova diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb deleted file mode 100644 index b6cd2ac9b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "System call tracing tool" -HOMEPAGE = "http://strace.sourceforge.net" -SECTION = "console/utils" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=488acb3aaaf5d14a2e1a852d13668a70" - -SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ - file://disable-git-version-gen.patch \ - file://more-robust-test-for-m32-mx32-compile-support.patch \ - file://update-gawk-paths.patch \ - file://Makefile-ptest.patch \ - file://run-ptest \ - file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \ - file://mips-SIGEMT.patch \ - file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ - " - -SRC_URI[md5sum] = "2873366cac98770efcbed6e748d5ef23" -SRC_URI[sha256sum] = "98487cb5178ec1259986cc9f6e2a844f50e5d1208c112cc22431a1e4d9adf0ef" - -inherit autotools ptest bluetooth - -RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" - -PACKAGECONFIG_class-target ??= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ -" - -PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" - -TESTDIR = "tests" - -do_install_append() { - # We don't ship strace-graph here because it needs perl - rm ${D}${bindir}/strace-graph -} - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} - sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile -} - -BBCLASSEXTEND = "native" -TOOLCHAIN = "gcc" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb new file mode 100644 index 000000000..5b2891ad9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb @@ -0,0 +1,59 @@ +SUMMARY = "System call tracing tool" +HOMEPAGE = "http://strace.sourceforge.net" +SECTION = "console/utils" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711" + +SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ + file://disable-git-version-gen.patch \ + file://more-robust-test-for-m32-mx32-compile-support.patch \ + file://update-gawk-paths.patch \ + file://Makefile-ptest.patch \ + file://run-ptest \ + file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \ + file://mips-SIGEMT.patch \ + file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ + file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ + " + +SRC_URI[md5sum] = "3579b3266bb096cebaefbe2cdb1a3a78" +SRC_URI[sha256sum] = "89ad887c1e6226bdbca8da31d589cadea4be0744b142eb47b768086c937fca08" + +inherit autotools ptest bluetooth + +RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" + +PACKAGECONFIG_class-target ??= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ +" + +PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" + +TESTDIR = "tests" + +do_install_append() { + # We don't ship strace-graph here because it needs perl + rm ${D}${bindir}/strace-graph +} + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} + sed -i -e '/^src/s/strace.*[1-9]/ptest/' \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -e '/^DEB_CHANGELOGTIME/d' \ + -e '/^RPM_CHANGELOGTIME/d' \ + ${D}/${PTEST_PATH}/${TESTDIR}/Makefile +} + +BBCLASSEXTEND = "native" +TOOLCHAIN = "gcc" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch new file mode 100644 index 000000000..0599c2bad --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch @@ -0,0 +1,136 @@ +------------------------------------------------------------------------ +r1804691 | danielsh | 2017-08-10 11:14:13 -0700 (Thu, 10 Aug 2017) | 18 lines + +Fix CVE-2017-9800. + +See: https://subversion.apache.org/security/CVE-2017-0800-advisory.txt + +* subversion/libsvn_ra_svn/client.c + (svn_ctype.h): Include. + (find_tunnel_agent): Pass a "--" end-of-options guard to ssh. + Expect the 'hostinfo' parameter to be URI-decoded. + (is_valid_hostinfo): New. + (ra_svn_open): Validate the hostname before using it. + +* subversion/libsvn_subr/config_file.c + (svn_config_ensure): Update the example configuration likewise. + +Patch by: philip +Review by: danielsh + stsp + astieger (earlier version) + +Upstream-Status: Backport +http://svn.apache.org/viewvc?view=revision&sortby=rev&revision=1804691 + +CVE: CVE-2017-9800 + +Signed-off-by: Wenzong Fan +--- +Index: subversion/libsvn_subr/config_file.c +=================================================================== +--- subversion/libsvn_subr/config_file.c (revision 1804690) ++++ subversion/libsvn_subr/config_file.c (revision 1804691) +@@ -1448,12 +1448,12 @@ + "### passed to the tunnel agent as @.) If the" NL + "### built-in ssh scheme were not predefined, it could be defined" NL + "### as:" NL +- "# ssh = $SVN_SSH ssh -q" NL ++ "# ssh = $SVN_SSH ssh -q --" NL + "### If you wanted to define a new 'rsh' scheme, to be used with" NL + "### 'svn+rsh:' URLs, you could do so as follows:" NL +- "# rsh = rsh" NL ++ "# rsh = rsh --" NL + "### Or, if you wanted to specify a full path and arguments:" NL +- "# rsh = /path/to/rsh -l myusername" NL ++ "# rsh = /path/to/rsh -l myusername --" NL + "### On Windows, if you are specifying a full path to a command," NL + "### use a forward slash (/) or a paired backslash (\\\\) as the" NL + "### path separator. A single backslash will be treated as an" NL +Index: subversion/libsvn_ra_svn/client.c +=================================================================== +--- subversion/libsvn_ra_svn/client.c (revision 1804690) ++++ subversion/libsvn_ra_svn/client.c (revision 1804691) +@@ -46,6 +46,7 @@ + #include "svn_props.h" + #include "svn_mergeinfo.h" + #include "svn_version.h" ++#include "svn_ctype.h" + + #include "svn_private_config.h" + +@@ -398,7 +399,7 @@ + * versions have it too. If the user is using some other ssh + * implementation that doesn't accept it, they can override it + * in the [tunnels] section of the config. */ +- val = "$SVN_SSH ssh -q"; ++ val = "$SVN_SSH ssh -q --"; + } + + if (!val || !*val) +@@ -443,7 +444,7 @@ + for (n = 0; cmd_argv[n] != NULL; n++) + argv[n] = cmd_argv[n]; + +- argv[n++] = svn_path_uri_decode(hostinfo, pool); ++ argv[n++] = hostinfo; + argv[n++] = "svnserve"; + argv[n++] = "-t"; + argv[n] = NULL; +@@ -811,7 +812,33 @@ + } + + ++/* A simple whitelist to ensure the following are valid: ++ * user@server ++ * [::1]:22 ++ * server-name ++ * server_name ++ * 127.0.0.1 ++ * with an extra restriction that a leading '-' is invalid. ++ */ ++static svn_boolean_t ++is_valid_hostinfo(const char *hostinfo) ++{ ++ const char *p = hostinfo; + ++ if (p[0] == '-') ++ return FALSE; ++ ++ while (*p) ++ { ++ if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p)) ++ return FALSE; ++ ++ ++p; ++ } ++ ++ return TRUE; ++} ++ + static svn_error_t *ra_svn_open(svn_ra_session_t *session, + const char **corrected_url, + const char *url, +@@ -844,8 +871,18 @@ + || (callbacks->check_tunnel_func && callbacks->open_tunnel_func + && !callbacks->check_tunnel_func(callbacks->tunnel_baton, + tunnel)))) +- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config, +- result_pool)); ++ { ++ const char *decoded_hostinfo; ++ ++ decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, result_pool); ++ ++ if (!is_valid_hostinfo(decoded_hostinfo)) ++ return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"), ++ uri.hostinfo); ++ ++ SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv, ++ config, result_pool)); ++ } + else + tunnel_argv = NULL; + + +------------------------------------------------------------------------ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb deleted file mode 100644 index 05fba677b..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "Subversion (svn) version control system client" -SECTION = "console/network" -DEPENDS = "apr-util serf sqlite3 file" -DEPENDS_append_class-native = " file-replacement-native" -RDEPENDS_${PN} = "serf" -LICENSE = "Apache-2" -HOMEPAGE = "http://subversion.tigris.org" - -BBCLASSEXTEND = "native" - -inherit gettext - -SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://disable_macos.patch \ - file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \ - file://0001-Fix-libtool-name-in-configure.ac.patch \ - file://serfmacro.patch \ - " - -SRC_URI[md5sum] = "9fcbae352a5efe73d46a88c97c6bba14" -SRC_URI[sha256sum] = "8a4fc68aff1d18dcb4dd9e460648d24d9e98657fbed496c582929c6b3ce555e5" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709" - -PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl" -PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring" - -EXTRA_OECONF = " \ - --without-berkeley-db --without-apxs \ - --without-swig --with-apr=${STAGING_BINDIR_CROSS} \ - --with-apr-util=${STAGING_BINDIR_CROSS} \ - --disable-keychain \ - ac_cv_path_RUBY=none" - -inherit autotools - -export LDFLAGS += " -L${STAGING_LIBDIR} " -CPPFLAGS += "-P" -BUILD_CPPFLAGS += "-P" - -acpaths = "-I build/ -I build/ac-macros/" - -do_configure_prepend () { - rm -f ${S}/libtool - rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4 - rm -f ${S}/aclocal.m4 - sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4 -} - -#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib' -#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it -#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib' -#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed -#| make: *** [install-serf-lib] Error 1 -PARALLEL_MAKEINST = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb new file mode 100644 index 000000000..532edeb08 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb @@ -0,0 +1,56 @@ +SUMMARY = "Subversion (svn) version control system client" +SECTION = "console/network" +DEPENDS = "apr-util serf sqlite3 file" +DEPENDS_append_class-native = " file-replacement-native" +RDEPENDS_${PN} = "serf" +LICENSE = "Apache-2" +HOMEPAGE = "http://subversion.tigris.org" + +BBCLASSEXTEND = "native" + +inherit gettext pkgconfig + +SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://disable_macos.patch \ + file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \ + file://0001-Fix-libtool-name-in-configure.ac.patch \ + file://serfmacro.patch \ + file://CVE-2017-9800.patch;striplevel=0 \ + " + +SRC_URI[md5sum] = "f27e00338d4a9f7f9aec9d4a3f8b418b" +SRC_URI[sha256sum] = "dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709" + +PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl" +PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring" + +EXTRA_OECONF = " \ + --without-berkeley-db --without-apxs \ + --without-swig --with-apr=${STAGING_BINDIR_CROSS} \ + --with-apr-util=${STAGING_BINDIR_CROSS} \ + --disable-keychain \ + ac_cv_path_RUBY=none" + +inherit autotools + +export LDFLAGS += " -L${STAGING_LIBDIR} " +CPPFLAGS += "-P" +BUILD_CPPFLAGS += "-P" + +acpaths = "-I build/ -I build/ac-macros/" + +do_configure_prepend () { + rm -f ${S}/libtool + rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4 + rm -f ${S}/aclocal.m4 + sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4 +} + +#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib' +#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it +#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib' +#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed +#| make: *** [install-serf-lib] Error 1 +PARALLEL_MAKEINST = "" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb index 69bce1f8d..f8b109409 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb @@ -1,5 +1,5 @@ SUMMARY = "Multi-purpose linux bootloader" -HOMEPAGE = "http://syslinux.zytor.com/" +HOMEPAGE = "http://www.syslinux.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch new file mode 100644 index 000000000..5aa0463ac --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch @@ -0,0 +1,32 @@ +From d379126d56d0b6e935b2d97ca71579e6cc54d1bb Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 18 Jul 2017 13:37:27 +0300 +Subject: [PATCH] parse-util: Don't use xlocale.h + +glibc 2.26 no longer contains the non-standard xlocale.h +(http://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27) + +This change shouldn't break anything as xlocale.h was a subset of +locale.h. + +Signed-off-by: Jussi Kukkonen +Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/35] +--- + src/parse-util.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/parse-util.c b/src/parse-util.c +index 5635a68..1b2169c 100644 +--- a/src/parse-util.c ++++ b/src/parse-util.c +@@ -21,7 +21,6 @@ + #include + #include + #include +-#include + + #include "macro.h" + #include "parse-util.h" +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb index 1d8803616..4da000e5d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb @@ -2,7 +2,9 @@ LICENSE = "LGPLv2.1 & GPLv2" LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \ file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https" +SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \ + file://0001-parse-util-Don-t-use-xlocale.h.patch \ +" # Modify these as desired PV = "231+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb index e5e41f148..9db26dccc 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb @@ -16,6 +16,7 @@ SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.4_ne file://tcf-agent.init \ file://tcf-agent.service \ " +UPSTREAM_VERSION_UNKNOWN = "1" DEPENDS = "util-linux openssl" RDEPENDS_${PN} = "bash" @@ -30,16 +31,22 @@ INITSCRIPT_NAME = "tcf-agent" INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ." # mangling needed for make -MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686,`" +MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64,a64,`" MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`" EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'" -# They don't build on ARM and we don't need them actually. -CFLAGS += "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ +LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ -DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \ - -DSERVICE_StackTrace=0 -DSERVICE_Symbols=0 -DSERVICE_LineNumbers=0 \ - -DSERVICE_Expressions=0" + -DSERVICE_StackTrace=0 -DSERVICE_Expressions=0" + + +# These features don't compile for several cases. +# +CFLAGS_append_mips = " ${LCL_STOP_SERVICES}" +CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}" +CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}" +CFLAGS_append_powerpc64 = " ${LCL_STOP_SERVICES}" do_install() { oe_runmake install INSTALLROOT=${D} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb deleted file mode 100644 index 40cd18fb0..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb +++ /dev/null @@ -1,97 +0,0 @@ -SUMMARY = "Tool Command Language" -HOMEPAGE = "http://tcl.sourceforge.net" -SECTION = "devel/tcltk" - -# http://www.tcl.tk/software/tcltk/license.html -LICENSE = "tcl & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ -" - -DEPENDS = "tcl-native zlib" - -BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ - file://tcl-add-soname.patch" -SRC_URI = "${BASE_SRC_URI} \ - file://fix_non_native_build_issue.patch \ - file://fix_issue_with_old_distro_glibc.patch \ - file://no_packages.patch \ - file://tcl-remove-hardcoded-install-path.patch \ - file://alter-includedir.patch \ - file://run-ptest \ -" -SRC_URI[md5sum] = "5193aea8107839a79df8ac709552ecb7" -SRC_URI[sha256sum] = "a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07" - -SRC_URI_class-native = "${BASE_SRC_URI}" - -S = "${WORKDIR}/${BPN}${PV}/unix" - -VER = "${PV}" - -inherit autotools ptest binconfig - -DEPENDS_class-native = "zlib-native" - -EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}" - -do_configure() { - cd ${S} - gnu-configize - cd ${B} - oe_runconf -} - -do_compile_prepend() { - echo > ${S}/../compat/fixstrtod.c -} - -do_install() { - autotools_do_install install-private-headers - ln -sf ./tclsh${VER} ${D}${bindir}/tclsh - ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} - sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh - sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh - install -d ${D}${bindir_crossscripts} - install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} - install -m 0755 tclConfig.sh ${D}${libdir} - cd .. - for dir in compat generic unix; do - install -d ${D}${includedir}/${BPN}${VER}/$dir - install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ - done -} - -SYSROOT_DIRS += "${bindir_crossscripts}" - -PACKAGES =+ "tcl-lib" -FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" -FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" -FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" - -# isn't getting picked up by shlibs code -RDEPENDS_${PN} += "tcl-lib" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}-ptest += "libgcc" - -BBCLASSEXTEND = "native nativesdk" - -do_compile_ptest() { - oe_runmake tcltest -} - -do_install_ptest() { - cp ${B}/tcltest ${D}${PTEST_PATH} - cp -r ${S}/../library ${D}${PTEST_PATH} - cp -r ${S}/../tests ${D}${PTEST_PATH} -} - -# Fix some paths that might be used by Tcl extensions -BINCONFIG_GLOB = "*Config.sh" - -# Fix the path in sstate -SSTATE_SCAN_FILES += "*Config.sh" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb new file mode 100644 index 000000000..dac73be6e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb @@ -0,0 +1,101 @@ +SUMMARY = "Tool Command Language" +HOMEPAGE = "http://tcl.sourceforge.net" +SECTION = "devel/tcltk" + +# http://www.tcl.tk/software/tcltk/license.html +LICENSE = "tcl & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ +" + +DEPENDS = "tcl-native zlib" + +BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ + file://tcl-add-soname.patch" +SRC_URI = "${BASE_SRC_URI} \ + file://fix_non_native_build_issue.patch \ + file://fix_issue_with_old_distro_glibc.patch \ + file://no_packages.patch \ + file://tcl-remove-hardcoded-install-path.patch \ + file://alter-includedir.patch \ + file://run-ptest \ +" +SRC_URI[md5sum] = "5673aaf45b5de5d8dd80bb3daaeb8838" +SRC_URI[sha256sum] = "7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5" + +SRC_URI_class-native = "${BASE_SRC_URI}" + +S = "${WORKDIR}/${BPN}${PV}/unix" + +VER = "${PV}" + +inherit autotools ptest binconfig + +EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}" + +do_compile_prepend() { + echo > ${S}/../compat/fixstrtod.c +} + +do_install() { + autotools_do_install + oe_runmake 'DESTDIR=${D}' install-private-headers + ln -sf ./tclsh${VER} ${D}${bindir}/tclsh + ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} + sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh + sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + install -d ${D}${bindir_crossscripts} + install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} + install -m 0755 tclConfig.sh ${D}${libdir} + for dir in compat generic unix; do + install -d ${D}${includedir}/${BPN}${VER}/$dir + install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ + done +} + +SYSROOT_DIRS += "${bindir_crossscripts}" + +PACKAGES =+ "tcl-lib" +FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" +FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" +FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" + +# isn't getting picked up by shlibs code +RDEPENDS_${PN} += "tcl-lib" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}-ptest += "libgcc" + +BBCLASSEXTEND = "native nativesdk" + +do_compile_ptest() { + oe_runmake tcltest +} + +do_install_ptest() { + cp ${B}/tcltest ${D}${PTEST_PATH} + cp -r ${S}/../library ${D}${PTEST_PATH} + cp -r ${S}/../tests ${D}${PTEST_PATH} +} + +# Fix some paths that might be used by Tcl extensions +BINCONFIG_GLOB = "*Config.sh" + +# Fix the path in sstate +SSTATE_SCAN_FILES += "*Config.sh" + +# Cleanup host path from ${libdir}/tclConfig.sh and remove the +# ${bindir_crossscripts}/tclConfig.sh from target +PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" +tcl_package_preprocess() { + sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ + -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ + -e "s;${STAGING_INCDIR};${includedir};g" \ + -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ + ${PKGD}${libdir}/tclConfig.sh + + rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh +} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb index 52aa17e25..cebc8660d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb +++ b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb @@ -17,7 +17,8 @@ S = "${WORKDIR}/trunk" # Only subversion url left in OE-Core, use a mirror tarball instead since # this rarely changes. # svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http -SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/trunk_svn.code.sf.net_.p.unfs3.code_497_.tar.gz \ +# rename the tarball in mirror to avoid clash with user local svn tarball +SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.tar.gz \ file://unfs3_parallel_build.patch \ file://alternate_rpc_ports.patch \ file://fix_pid_race_parent_writes_child_pid.patch \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc index b338ea097..1261c0277 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc @@ -2,7 +2,12 @@ SUMMARY = "C#-like programming language for easing GObject programming" DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ Vala compiles to plain C and has no runtime environment nor penalities whatsoever." SECTION = "devel" -DEPENDS = "bison-native flex-native libxslt-native glib-2.0" +DEPENDS = "bison-native flex-native glib-2.0" + +# Appending libxslt-native to dependencies has an effect +# of rebuilding the manual, which is very slow. Let's do this +# only when api-documentation distro feature is enabled. +DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}" # vala-native contains a native version of vapigen, which we use instead of the target one DEPENDS_append_class-target = " vala-native" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb deleted file mode 100644 index d1b49aea7..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb +++ /dev/null @@ -1,8 +0,0 @@ -require ${BPN}.inc - -SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \ - file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \ -" - -SRC_URI[md5sum] = "a856989d749fc5e472a3592b96f9ca48" -SRC_URI[sha256sum] = "6b17bd339414563ebc51f64b0b837919ea7552d8a8ffa71cdc837d25c9696b83" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb new file mode 100644 index 000000000..51000d9e1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb @@ -0,0 +1,8 @@ +require ${BPN}.inc + +SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \ + file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \ +" + +SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c" +SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch deleted file mode 100644 index dc6feff7f..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 14 Feb 2016 09:14:12 +0000 -Subject: [PATCH] fix build for musl targets - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - configure.ac | 2 -- - coregrind/vg_preloaded.c | 2 +- - include/pub_tool_redir.h | 7 +++++-- - 3 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 9366dc7..679f514 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in - ;; - 2.0|2.1|*) - AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) -- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,]) -- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc]) - ;; - esac - -diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c -index 2ea7a7a..e49c832 100644 ---- a/coregrind/vg_preloaded.c -+++ b/coregrind/vg_preloaded.c -@@ -56,7 +56,7 @@ - void VG_NOTIFY_ON_LOAD(freeres)( void ); - void VG_NOTIFY_ON_LOAD(freeres)( void ) - { --# if !defined(__UCLIBC__) \ -+# if !defined(__UCLIBC__) && defined(__GLIBC__) \ - && !defined(VGPV_arm_linux_android) \ - && !defined(VGPV_x86_linux_android) \ - && !defined(VGPV_mips32_linux_android) \ -diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h -index bac00d7..fbb2ef2 100644 ---- a/include/pub_tool_redir.h -+++ b/include/pub_tool_redir.h -@@ -242,8 +242,7 @@ - /* --- Soname of the standard C library. --- */ - - #if defined(VGO_linux) || defined(VGO_solaris) --# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so* -- -+# define VG_Z_LIBC_SONAME libcZdZa // libc.* - #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6) - # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib - -@@ -274,7 +273,11 @@ - /* --- Soname of the pthreads library. --- */ - - #if defined(VGO_linux) -+# if defined(__GLIBC__) || defined(__UCLIBC__) - # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0 -+# else -+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.* -+#endif - #elif defined(VGO_darwin) - # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib - #elif defined(VGO_solaris) --- -2.7.1 - diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch new file mode 100644 index 000000000..9f1da7bac --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch @@ -0,0 +1,108 @@ +From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 20 Apr 2017 10:11:16 -0700 +Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm + architecture + +We can not assume that all arches armv7+ are cortex-a8 only +it fails to build for rpi which is armv7ve based (cortex-a8) cpu +implementation. +Fixes +| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.all.am | 6 +++--- + helgrind/tests/Makefile.am | 6 +++--- + none/tests/arm/Makefile.am | 18 +++++++++--------- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/Makefile.all.am b/Makefile.all.am +index 02059a3..c7c4700 100644 +--- a/Makefile.all.am ++++ b/Makefile.all.am +@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \ +- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 ++ $(AM_CFLAGS_BASE) -marm + AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \ +- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE) ++ -marm $(AM_CFLAGS_PSO_BASE) + AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \ +- -marm -mcpu=cortex-a8 -g ++ -marm -g + + AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@ + AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) +diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am +index df82169..07eb66a 100644 +--- a/helgrind/tests/Makefile.am ++++ b/helgrind/tests/Makefile.am +@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN + endif + + if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX +-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 +-tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 +-tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 ++annotate_hbefore_CFLAGS = $(AM_CFLAGS) ++tc07_hbl1_CFLAGS = $(AM_CFLAGS) ++tc08_hbl2_CFLAGS = $(AM_CFLAGS) + else + annotate_hbefore_CFLAGS = $(AM_CFLAGS) + tc07_hbl1_CFLAGS = $(AM_CFLAGS) +diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am +index 024eb6d..ccecb90 100644 +--- a/none/tests/arm/Makefile.am ++++ b/none/tests/arm/Makefile.am +@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ + # need special helping w.r.t -mfpu and -mfloat-abi, though. + # Also force -O0 since -O takes hundreds of MB of memory + # for v6intThumb.c. +-v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm +-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb ++v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm ++v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb + +-v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb ++v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb + + v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm + v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb +@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \ + v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb + +-vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + + +-neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + +-neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + + intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb +-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb +-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm ++ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb ++ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm + +-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 ++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3 + + vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm +-- +2.12.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch new file mode 100644 index 000000000..a48d7db07 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch @@ -0,0 +1,32 @@ +From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 5 Jul 2017 17:12:43 -0700 +Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined + +Helps compiling with musl where __THROW is not available + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + memcheck/tests/arm64-linux/scalar.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h +index 9008816..8ef050f 100644 +--- a/memcheck/tests/arm64-linux/scalar.h ++++ b/memcheck/tests/arm64-linux/scalar.h +@@ -12,6 +12,10 @@ + #include + #include + ++#ifndef __THROW ++#define __THROW ++#endif ++ + // Since we use vki_unistd.h, we can't include . So we have to + // declare this ourselves. + extern long int syscall (long int __sysno, ...) __THROW; +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch new file mode 100644 index 000000000..bf16a1adf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch @@ -0,0 +1,30 @@ +From 629ac492b1d9bc709d17337eb9b1c28603eca250 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 28 Jun 2017 11:01:25 -0700 +Subject: [PATCH] memcheck/tests: Use ucontext_t instead of struct ucontext + +glibc 2.26 does not expose struct ucontext anymore + +Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=381769] + +Signed-off-by: Khem Raj +--- + memcheck/tests/linux/stack_changes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c +index ffb49c6..acc4109 100644 +--- a/memcheck/tests/linux/stack_changes.c ++++ b/memcheck/tests/linux/stack_changes.c +@@ -11,7 +11,7 @@ + // checks that Valgrind notices their stack changes properly. + + #ifdef __GLIBC__ +-typedef struct ucontext mycontext; ++typedef ucontext_t mycontext; + + mycontext ctx1, ctx2, oldc; + int count; +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch new file mode 100644 index 000000000..27366153f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch @@ -0,0 +1,31 @@ +From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 00:46:39 -0700 +Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + memcheck/tests/linux/sigqueue.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c +index d18bd72..acb7cba 100644 +--- a/memcheck/tests/linux/sigqueue.c ++++ b/memcheck/tests/linux/sigqueue.c +@@ -8,6 +8,11 @@ + #include + #include + ++/* musl libc defines siginfo_t __si_fields instead of _sifields */ ++#if defined(__linux__) && !defined(__GLIBC__) ++#define _sifields __si_fields ++#endif ++ + int main(int argc, char **argv) + { + siginfo_t *si; +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch new file mode 100644 index 000000000..185b8f9e6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch @@ -0,0 +1,39 @@ +From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 00:39:07 -0700 +Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc + +rawmemchr() is a GNU extention therefore mark it so + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + memcheck/tests/str_tester.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c +index 9f7790a..47e4b4a 100644 +--- a/memcheck/tests/str_tester.c ++++ b/memcheck/tests/str_tester.c +@@ -504,7 +504,7 @@ test_strchrnul (void) + #endif + + // DDD: better done by testing for the function. +-#if !defined(__APPLE__) && !defined(__sun) ++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) + static void + test_rawmemchr (void) + { +@@ -1442,7 +1442,7 @@ main (void) + test_strchrnul (); + # endif + +-# if !defined(__APPLE__) && !defined(__sun) ++# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) + /* rawmemchr. */ + test_rawmemchr (); + # endif +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch new file mode 100644 index 000000000..3f9f33b48 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch @@ -0,0 +1,49 @@ +From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 01:01:10 -0700 +Subject: [PATCH 2/6] context APIs are not available on musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + memcheck/tests/linux/stack_changes.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c +index a978fc2..ffb49c6 100644 +--- a/memcheck/tests/linux/stack_changes.c ++++ b/memcheck/tests/linux/stack_changes.c +@@ -10,6 +10,7 @@ + // This test is checking the libc context calls (setcontext, etc.) and + // checks that Valgrind notices their stack changes properly. + ++#ifdef __GLIBC__ + typedef struct ucontext mycontext; + + mycontext ctx1, ctx2, oldc; +@@ -51,9 +52,11 @@ int init_context(mycontext *uc) + + return ret; + } ++#endif + + int main(int argc, char **argv) + { ++#ifdef __GLIBC__ + int c1 = init_context(&ctx1); + int c2 = init_context(&ctx2); + +@@ -66,6 +69,8 @@ int main(int argc, char **argv) + //free(ctx1.uc_stack.ss_sp); + VALGRIND_STACK_DEREGISTER(c2); + //free(ctx2.uc_stack.ss_sp); +- ++#else ++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); ++#endif + return 0; + } +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch new file mode 100644 index 000000000..543347229 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch @@ -0,0 +1,32 @@ +From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 5 Jul 2017 17:36:42 -0700 +Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined + +musl does not have __THROW, therefore make it null + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + memcheck/tests/x86-linux/scalar.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h +index ef28b03..52f742e 100644 +--- a/memcheck/tests/x86-linux/scalar.h ++++ b/memcheck/tests/x86-linux/scalar.h +@@ -11,6 +11,10 @@ + #include + #include + ++#ifndef __THROW ++#define __THROW ++#endif ++ + // Since we use vki_unistd.h, we can't include . So we have to + // declare this ourselves. + extern long int syscall (long int __sysno, ...) __THROW; +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch new file mode 100644 index 000000000..c2965c40d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch @@ -0,0 +1,45 @@ +From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 01:03:17 -0700 +Subject: [PATCH 3/6] correct include directive path for config.h + +when building out of source tree, it can not find +the generated config.h otherwise + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + memcheck/tests/linux/syscalls-2007.c | 2 +- + memcheck/tests/linux/syslog-syscall.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c +index b61c6d5..cc3fd62 100644 +--- a/memcheck/tests/linux/syscalls-2007.c ++++ b/memcheck/tests/linux/syscalls-2007.c +@@ -10,7 +10,7 @@ + + #define _GNU_SOURCE + +-#include "../../config.h" ++#include "config.h" + #include + #include + #include +diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c +index 1143722..21e758b 100644 +--- a/memcheck/tests/linux/syslog-syscall.c ++++ b/memcheck/tests/linux/syslog-syscall.c +@@ -6,7 +6,7 @@ + * klogctl(). + */ + +-#include "../../config.h" ++#include "config.h" + #include + #if defined(HAVE_SYS_KLOG_H) + #include +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch new file mode 100644 index 000000000..fa1344c85 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch @@ -0,0 +1,68 @@ +From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 5 Jul 2017 17:37:56 -0700 +Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall() + +__modify_ldt() is specific to glibc, replacing it with syscall() +makes it more portable. + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + none/tests/x86-linux/seg_override.c | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c +index b7619c9..c89874b 100644 +--- a/none/tests/x86-linux/seg_override.c ++++ b/none/tests/x86-linux/seg_override.c +@@ -2,6 +2,8 @@ + #include + #include + #include ++#include ++#include + + /* Stuff from Wine. */ + +@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) + /* our copy of the ldt */ + LDT_ENTRY ldt_copy[8192]; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +-extern int __modify_ldt (int, void *, size_t); +- + void print_ldt ( void ) + { + int res; +- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); ++ /* System call to set LDT entry. */ ++ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); + printf("got %d bytes\n", res ); + perror("error is"); + } +@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s + unsigned int empty:25; + }; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +- + void set_ldt1 ( void* base ) + { + int stat; +@@ -102,7 +98,8 @@ void set_ldt1 ( void* base ) + ldt_entry.read_exec_only = 0; + ldt_entry.limit_in_pages = 0; + ldt_entry.seg_not_present = 0; +- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); ++ /* System call to set LDT entry. */ ++ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry)); + printf("stat = %d\n", stat); + } + +-- +2.13.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch index ed313d644..39022d04a 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch @@ -1,4 +1,4 @@ -From 38ae233b6893a4eec7f9ed6d8ad02392bca8eaed Mon Sep 17 00:00:00 2001 +From 739421e253e6eba3eb6438651822f80fa9c0502a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 15 Dec 2015 15:31:50 +0200 Subject: [PATCH 1/2] Fix out of tree builds. @@ -13,21 +13,21 @@ Upstream-Status: Pending Signed-off-by: Alexander Kanavin --- - configure.ac | 64 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 32 insertions(+), 32 deletions(-) + configure.ac | 68 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac -index 8ab7f9b..9366dc7 100644 +index 3874296fde0b..7a5ba2c8557e 100644 --- a/configure.ac +++ b/configure.ac -@@ -377,44 +377,44 @@ case "${host_os}" in +@@ -373,50 +373,50 @@ case "${host_os}" in 9.*) AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) - DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" ;; 10.*) AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) @@ -75,11 +75,19 @@ index 8ab7f9b..9366dc7 100644 - DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 16.*) + AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; *) AC_MSG_RESULT([unsupported (${kernel})]) -@@ -426,13 +426,13 @@ case "${host_os}" in +@@ -428,13 +428,13 @@ case "${host_os}" in solaris2.11*) AC_MSG_RESULT([ok (${host_os})]) VGCONF_OS="solaris" @@ -95,7 +103,7 @@ index 8ab7f9b..9366dc7 100644 ;; *) -@@ -1015,29 +1015,29 @@ AC_MSG_CHECKING([the glibc version]) +@@ -982,29 +982,29 @@ AC_MSG_CHECKING([the glibc version]) case "${GLIBC_VERSION}" in 2.2) AC_MSG_RESULT(${GLIBC_VERSION} family) @@ -135,7 +143,7 @@ index 8ab7f9b..9366dc7 100644 ;; 2.*) AC_MSG_RESULT(${GLIBC_VERSION} family) -@@ -1046,8 +1046,8 @@ case "${GLIBC_VERSION}" in +@@ -1013,8 +1013,8 @@ case "${GLIBC_VERSION}" in AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" @@ -146,7 +154,7 @@ index 8ab7f9b..9366dc7 100644 ;; darwin) AC_MSG_RESULT(Darwin) -@@ -1057,7 +1057,7 @@ case "${GLIBC_VERSION}" in +@@ -1024,7 +1024,7 @@ case "${GLIBC_VERSION}" in bionic) AC_MSG_RESULT(Bionic) AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) @@ -155,7 +163,7 @@ index 8ab7f9b..9366dc7 100644 ;; solaris) AC_MSG_RESULT(Solaris) -@@ -1079,11 +1079,11 @@ if test "$VGCONF_OS" != "solaris"; then +@@ -1051,11 +1051,11 @@ if test "$VGCONF_OS" != "solaris"; then # attempt to detect whether such libraries are installed on the # build machine (or even if any X facilities are present); just # add the suppressions antidisirregardless. @@ -171,5 +179,5 @@ index 8ab7f9b..9366dc7 100644 -- -2.6.2 +2.13.2.3.g44cd85c14 diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch new file mode 100644 index 000000000..1cb706254 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch @@ -0,0 +1,37 @@ +From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 01:06:11 -0700 +Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + none/tests/pth_atfork1.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c +index 34201ef..b7f5f2d 100644 +--- a/none/tests/pth_atfork1.c ++++ b/none/tests/pth_atfork1.c +@@ -18,7 +18,7 @@ + Boston, MA 02111-1307, USA. */ + + #include +-#if !defined(__APPLE__) && !defined(__sun) ++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) + # include + #endif + #include +@@ -27,7 +27,7 @@ + #include + #include + +-#if defined(__APPLE__) || defined(__sun) ++#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__)) + #include /* strerror */ + static void error (int status, int errnum, char* msg) + { +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch new file mode 100644 index 000000000..6176640e4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch @@ -0,0 +1,30 @@ +From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 01:07:59 -0700 +Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl + +similar to sun + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + helgrind/tests/tc20_verifywrap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c +index c110000..a311a49 100644 +--- a/helgrind/tests/tc20_verifywrap.c ++++ b/helgrind/tests/tc20_verifywrap.c +@@ -20,7 +20,7 @@ + + #if !defined(__APPLE__) + +-#if defined(__sun__) ++#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__)) + /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */ + # define __GLIBC_PREREQ + #else +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch new file mode 100644 index 000000000..05886c743 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch @@ -0,0 +1,32 @@ +From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 01:20:32 -0700 +Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding + offset to it + +Fixes +error: invalid use of undefined type 'struct __pthread' + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + drd/tests/pth_detached3.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c +index c02eef1..35d43a6 100644 +--- a/drd/tests/pth_detached3.c ++++ b/drd/tests/pth_detached3.c +@@ -21,7 +21,7 @@ int main(int argc, char** argv) + pthread_detach(thread); + + /* Invoke pthread_detach() with an invalid thread ID. */ +- pthread_detach(thread + 8); ++ pthread_detach((pthread_t*)(&thread + 8)); + + fprintf(stderr, "Finished.\n"); + +-- +2.13.1 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch new file mode 100644 index 000000000..db322398c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch @@ -0,0 +1,27 @@ +When checking if the compiler supports compressed debug sections we need to +actually link instead of just compile. Otherwise the compiler thinks that +they are supported, but gold does not support -gz=zlib. + +Upstream-Status: Backport (r16459) +Signed-off-by: Ross Burton + +--- a/configure.ac~ 2017-07-11 11:53:16.000000000 +0100 ++++ b/configure.ac 2017-07-11 18:16:13.674130483 +0100 +@@ -2119,7 +2119,7 @@ + safe_CFLAGS=$CFLAGS + CFLAGS="-g -gz=zlib" + +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ + return 0; + ]])], [ + ac_have_gz_zlib=yes +@@ -2139,7 +2139,7 @@ + safe_CFLAGS=$CFLAGS + CFLAGS="-g -gz=zlib-gnu" + +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ + return 0; + ]])], [ + ac_have_gz_zlib_gnu=yes diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch new file mode 100644 index 000000000..51259db00 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch @@ -0,0 +1,87 @@ +Backport a patch from upstream to fix test compilation for PPC where +system headers don't get included. + +Upstream-Status: Backport +Signed-off-by: Ross Burton + +r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines + +ppc64 doesn't compile test_isa_2_06_partx.c without VSX support + +The #ifdef HAS_VSX guard is wrongly placed. It makes the standard +include headers not be used. Causing a build failure. Fix by moving +the #ifdef HAS_VSX after the standard includes. + +Index: none/tests/ppc32/test_isa_2_06_part3.c +=================================================================== +--- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449) ++++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450) +@@ -20,17 +20,18 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#ifdef HAS_VSX +- + #include + #include + #include + #include + #include +-#include + #include + #include // getopt + ++#ifdef HAS_VSX ++ ++#include ++ + #ifndef __powerpc64__ + typedef uint32_t HWord_t; + #else +Index: none/tests/ppc32/test_isa_2_06_part1.c +=================================================================== +--- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449) ++++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450) +@@ -20,13 +20,14 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#ifdef HAS_VSX +- + #include + #include + #include + #include + #include ++ ++#ifdef HAS_VSX ++ + #include + + #ifndef __powerpc64__ +Index: none/tests/ppc32/test_isa_2_06_part2.c +=================================================================== +--- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449) ++++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450) +@@ -20,17 +20,18 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#ifdef HAS_VSX +- + #include + #include + #include + #include + #include +-#include + #include + #include // getopt + ++#ifdef HAS_VSX ++ ++#include ++ + #ifndef __powerpc64__ + typedef uint32_t HWord_t; + #else diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest index f9a72ec4a..447d33c8c 100755 --- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest @@ -2,11 +2,24 @@ # run-ptest - 'ptest' test infrastructure shell script that # wraps the valgrind regression script vg_regtest. -# Must be run in the /usr/lib/valgrind/ptest directory. # # Dave Lerner ############################################################### VALGRINDLIB=@libdir@/valgrind -tests/vg_regtest --all \ +LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" + +cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \ --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ - --yocto-ptest + --yocto-ptest 2>&1|tee ${LOG} + +passed=`grep PASS: ${LOG}|wc -l` +failed=`grep FAIL: ${LOG}|wc -l` +skipped=`grep SKIP: ${LOG}|wc -l` +all=$((passed + failed + skipped)) + +( echo "=== Test Summary ===" + echo "TOTAL: ${all}" + echo "PASSED: ${passed}" + echo "FAILED: ${failed}" + echo "SKIPPED: ${skipped}" +) | tee -a /${LOG} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb deleted file mode 100644 index 4f8cd3f52..000000000 --- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb +++ /dev/null @@ -1,127 +0,0 @@ -SUMMARY = "Valgrind memory debugger and instrumentation framework" -HOMEPAGE = "http://valgrind.org/" -BUGTRACKER = "http://valgrind.org/support/bug_reports.html" -LICENSE = "GPLv2 & GPLv2+ & BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \ - file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \ - file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" - -X11DEPENDS = "virtual/libx11" -DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ - " - -SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ - file://fixed-perl-path.patch \ - file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ - file://run-ptest \ - file://0002-remove-rpath.patch \ - file://0004-Fix-out-of-tree-builds.patch \ - file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ - file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ - file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ - file://avoid-neon-for-targets-which-don-t-support-it.patch \ - file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ -" -SRC_URI_append_libc-musl = "\ - file://0001-fix-build-for-musl-targets.patch \ -" -SRC_URI[md5sum] = "6eb03c0c10ea917013a7622e483d61bb" -SRC_URI[sha256sum] = "67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1" - -COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' - -# valgrind supports armv7 and above -COMPATIBLE_HOST_armv4 = 'null' -COMPATIBLE_HOST_armv5 = 'null' -COMPATIBLE_HOST_armv6 = 'null' - -# X32 isn't supported by valgrind at this time -COMPATIBLE_HOST_linux-gnux32 = 'null' - -# Disable for some MIPS variants -COMPATIBLE_HOST_mipsarchn32 = 'null' -COMPATIBLE_HOST_mipsarchr6 = 'null' - -inherit autotools ptest - -EXTRA_OECONF = "--enable-tls --without-mpicc" -EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" - -# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option -EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" - -EXTRA_OEMAKE = "-w" - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" - -# valgrind likes to control its own optimisation flags. It generally defaults -# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags -# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it -# which fixes build path issue in DWARF. -SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" - -CFLAGS_append_libc-uclibc = " -D__UCLIBC__ " - -do_install_append () { - install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ -} - -RDEPENDS_${PN} += "perl" - -# valgrind needs debug information for ld.so at runtime in order to -# redirect functions like strlen. -RRECOMMENDS_${PN} += "${TCLIBC}-dbg" - -RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob" -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" - -# One of the tests contains a bogus interpreter path on purpose. -# Skip file dependency check -SKIP_FILEDEPS_${PN}-ptest = '1' - -do_compile_ptest() { - oe_runmake check -} - -do_install_ptest() { - chmod +x ${B}/tests/vg_regtest - - # The test application binaries are not automatically installed. - # Grab them from the build directory. - # - # The regression tests require scripts and data files that are not - # copied to the build directory. They must be copied from the - # source directory. - saved_dir=$PWD - for parent_dir in ${S} ${B} ; do - cd $parent_dir - - # exclude shell or the package won't install - rm -rf none/tests/shell* 2>/dev/null - - subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests" - - # Get the vg test scripts, filters, and expected files - for dir in $subdirs ; do - find $dir | cpio -pvdu ${D}${PTEST_PATH} - done - cd $saved_dir - done - - # clean out build artifacts before building the rpm - find ${D}${PTEST_PATH} \ - \( -name "Makefile*" \ - -o -name "*.o" \ - -o -name "*.c" \ - -o -name "*.S" \ - -o -name "*.h" \) \ - -exec rm {} \; - - # needed by massif tests - cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print - - # handle multilib - sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest -} diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb new file mode 100644 index 000000000..25b412662 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb @@ -0,0 +1,153 @@ +SUMMARY = "Valgrind memory debugger and instrumentation framework" +HOMEPAGE = "http://valgrind.org/" +BUGTRACKER = "http://valgrind.org/support/bug_reports.html" +LICENSE = "GPLv2 & GPLv2+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \ + file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ + file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" + +X11DEPENDS = "virtual/libx11" +DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ + " + +SRC_URI = "ftp://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ + file://fixed-perl-path.patch \ + file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ + file://run-ptest \ + file://0002-remove-rpath.patch \ + file://0004-Fix-out-of-tree-builds.patch \ + file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ + file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ + file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ + file://avoid-neon-for-targets-which-don-t-support-it.patch \ + file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ + file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ + file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ + file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ + file://0002-context-APIs-are-not-available-on-musl.patch \ + file://0003-correct-include-directive-path-for-config.h.patch \ + file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ + file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ + file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \ + file://0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch \ + file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ + file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ + file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ + file://link-gz-tests.patch \ + file://ppc-headers.patch \ + " +SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369" +SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b" +UPSTREAM_CHECK_REGEX = "valgrind-(?P\d+(\.\d+)+)\.tar" + +COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' + +# valgrind supports armv7 and above +COMPATIBLE_HOST_armv4 = 'null' +COMPATIBLE_HOST_armv5 = 'null' +COMPATIBLE_HOST_armv6 = 'null' + +# X32 isn't supported by valgrind at this time +COMPATIBLE_HOST_linux-gnux32 = 'null' +COMPATIBLE_HOST_linux-muslx32 = 'null' + +# Disable for some MIPS variants +COMPATIBLE_HOST_mipsarchn32 = 'null' +COMPATIBLE_HOST_mipsarchr6 = 'null' + +inherit autotools ptest + +EXTRA_OECONF = "--enable-tls --without-mpicc" +EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" + +# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option +EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" +TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}" + +EXTRA_OEMAKE = "-w" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +# valgrind likes to control its own optimisation flags. It generally defaults +# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags +# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it +# which fixes build path issue in DWARF. +SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" + +def get_mcpu(d): + for arg in (d.getVar('TUNE_CCARGS') or '').split(): + if arg.startswith('-mcpu='): + return arg + else: + continue + return "" + +do_configure_prepend () { + rm -rf ${S}/config.h +} + +do_install_append () { + install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ +} + +TUNE = "${@strip_mcpu(d)}" + +RDEPENDS_${PN} += "perl" + +# valgrind needs debug information for ld.so at runtime in order to +# redirect functions like strlen. +RRECOMMENDS_${PN} += "${TCLIBC}-dbg" + +RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob" +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" + +# One of the tests contains a bogus interpreter path on purpose. +# Skip file dependency check +SKIP_FILEDEPS_${PN}-ptest = '1' + +do_compile_ptest() { + oe_runmake check +} + +do_install_ptest() { + chmod +x ${B}/tests/vg_regtest + + # The test application binaries are not automatically installed. + # Grab them from the build directory. + # + # The regression tests require scripts and data files that are not + # copied to the build directory. They must be copied from the + # source directory. + saved_dir=$PWD + for parent_dir in ${S} ${B} ; do + cd $parent_dir + + # exclude shell or the package won't install + rm -rf none/tests/shell* 2>/dev/null + + subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests" + + # Get the vg test scripts, filters, and expected files + for dir in $subdirs ; do + find $dir | cpio -pvdu ${D}${PTEST_PATH} + done + cd $saved_dir + done + + # clean out build artifacts before building the rpm + find ${D}${PTEST_PATH} \ + \( -name "Makefile*" \ + -o -name "*.o" \ + -o -name "*.c" \ + -o -name "*.S" \ + -o -name "*.h" \) \ + -exec rm {} \; + + # needed by massif tests + cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print + + # handle multilib + sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest +} -- cgit v1.2.3