summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-support
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/apr/apr-util/configfix.patch51
-rw-r--r--meta/recipes-support/apr/apr-util/configure_fixes.patch31
-rw-r--r--meta/recipes-support/apr/apr-util/run-ptest6
-rw-r--r--meta/recipes-support/apr/apr-util_1.5.3.bb67
-rw-r--r--meta/recipes-support/apr/apr/cleanup.patch43
-rw-r--r--meta/recipes-support/apr/apr/configfix.patch53
-rw-r--r--meta/recipes-support/apr/apr/configure_fixes.patch68
-rw-r--r--meta/recipes-support/apr/apr/run-ptest6
-rw-r--r--meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch48
-rw-r--r--meta/recipes-support/apr/apr_1.5.1.bb95
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.6.1.bb28
-rw-r--r--meta/recipes-support/atk/at-spi2-atk_2.12.1.bb19
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.12.0.bb20
-rw-r--r--meta/recipes-support/atk/atk_2.12.0.bb23
-rw-r--r--meta/recipes-support/atk/files/core_acinclude_m4.patch40
-rw-r--r--meta/recipes-support/attr/acl.inc39
-rw-r--r--meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch198
-rw-r--r--meta/recipes-support/attr/acl/add-missing-configure.ac.patch59
-rw-r--r--meta/recipes-support/attr/acl/run-ptest7
-rw-r--r--meta/recipes-support/attr/acl_2.2.52.bb9
-rw-r--r--meta/recipes-support/attr/attr.inc39
-rw-r--r--meta/recipes-support/attr/attr_2.4.47.bb10
-rw-r--r--meta/recipes-support/attr/ea-acl.inc58
-rw-r--r--meta/recipes-support/attr/files/attr-Missing-configure.ac.patch63
-rw-r--r--meta/recipes-support/attr/files/relative-libdir.patch25
-rw-r--r--meta/recipes-support/attr/files/run-ptest5
-rw-r--r--meta/recipes-support/bdwgc/bdwgc_7.4.2.bb41
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch37
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch43
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch39
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/fix-security.patch47
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/run-ptest5
-rw-r--r--meta/recipes-support/beecrypt/beecrypt_4.2.1.bb48
-rw-r--r--meta/recipes-support/boost/bjam-native_1.56.0.bb15
-rw-r--r--meta/recipes-support/boost/boost-1.56.0.inc19
-rw-r--r--meta/recipes-support/boost/boost.inc182
-rw-r--r--meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch412
-rw-r--r--meta/recipes-support/boost/boost/arm-intrinsics.patch55
-rw-r--r--meta/recipes-support/boost/boost_1.56.0.bb7
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch227
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch46
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch55
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch55
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch20
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates_20140325.bb77
-rw-r--r--meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
-rw-r--r--meta/recipes-support/consolekit/consolekit/sepbuildfix.patch19
-rw-r--r--meta/recipes-support/consolekit/consolekit_0.4.6.bb49
-rw-r--r--meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch22
-rw-r--r--meta/recipes-support/createrepo/createrepo/fix-native-install.patch163
-rw-r--r--meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch47
-rw-r--r--meta/recipes-support/createrepo/createrepo/recommends.patch71
-rwxr-xr-xmeta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py64
-rw-r--r--meta/recipes-support/createrepo/createrepo_0.4.11.bb46
-rw-r--r--meta/recipes-support/curl/curl/CVE-2014-3613.patch269
-rw-r--r--meta/recipes-support/curl/curl/CVE-2014-3620.patch69
-rw-r--r--meta/recipes-support/curl/curl/CVE-2014-3707.patch416
-rw-r--r--meta/recipes-support/curl/curl/CVE-2014-8150.patch29
-rw-r--r--meta/recipes-support/curl/curl/CVE-2015-3143.patch38
-rw-r--r--meta/recipes-support/curl/curl/CVE-2015-3144.patch45
-rw-r--r--meta/recipes-support/curl/curl/CVE-2015-3145.patch70
-rw-r--r--meta/recipes-support/curl/curl/CVE-2015-3153.patch90
-rw-r--r--meta/recipes-support/curl/curl/configure_ac.patch13
-rw-r--r--meta/recipes-support/curl/curl/pkgconfig_fix.patch32
-rw-r--r--meta/recipes-support/curl/curl_7.37.1.bb66
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch48
-rw-r--r--meta/recipes-support/db/db/fix-parallel-build.patch19
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb116
-rw-r--r--meta/recipes-support/db/db_6.0.30.bb115
-rw-r--r--meta/recipes-support/enchant/enchant_1.6.0.bb32
-rw-r--r--meta/recipes-support/gdbm/files/ptest.patch36
-rwxr-xr-xmeta/recipes-support/gdbm/files/run-ptest7
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch60
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.11.bb43
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.8.3.bb19
-rw-r--r--meta/recipes-support/gmp/gmp.inc29
-rw-r--r--meta/recipes-support/gmp/gmp/amd64.patch18
-rw-r--r--meta/recipes-support/gmp/gmp/append_user_provided_flags.patch52
-rw-r--r--meta/recipes-support/gmp/gmp/configure.patch222
-rw-r--r--meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch26
-rw-r--r--meta/recipes-support/gmp/gmp/use-includedir.patch15
-rw-r--r--meta/recipes-support/gmp/gmp_6.0.0.bb14
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch35
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb19
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch62
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch44
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch153
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch63
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch17
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch27
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch19
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch50
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch86
-rw-r--r--meta/recipes-support/gnupg/gnupg_1.4.7.bb102
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.0.26.bb39
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc49
-rw-r--r--meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch65
-rw-r--r--meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch67
-rw-r--r--meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch33
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.5.bb9
-rw-r--r--meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch14
-rw-r--r--meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch44
-rw-r--r--meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch28
-rw-r--r--meta/recipes-support/gnutls/libtasn1_4.0.bb22
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch39
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch56
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc10
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.4.3.bb42
-rw-r--r--meta/recipes-support/icu/icu.inc59
-rw-r--r--meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch28
-rw-r--r--meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch49
-rw-r--r--meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch29
-rw-r--r--meta/recipes-support/icu/icu_53.1.bb22
-rw-r--r--meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch158
-rw-r--r--meta/recipes-support/libassuan/libassuan_2.1.2.bb26
-rw-r--r--meta/recipes-support/libbsd/libbsd_0.7.0.bb21
-rw-r--r--meta/recipes-support/libcap/libcap.inc70
-rw-r--r--meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch39
-rw-r--r--meta/recipes-support/libcap/libcap_2.22.bb6
-rw-r--r--meta/recipes-support/libcheck/libcheck_0.9.14.bb24
-rw-r--r--meta/recipes-support/libcroco/libcroco_0.6.8.bb23
-rw-r--r--meta/recipes-support/libdaemon/libdaemon_0.14.bb16
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.2.2.bb13
-rw-r--r--meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch15
-rw-r--r--meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-support/libevent/libevent_2.0.21.bb26
-rw-r--r--meta/recipes-support/libexif/libexif_0.6.21.bb17
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch31
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch14
-rw-r--r--meta/recipes-support/libfm/libfm_1.1.2.2.bb25
-rw-r--r--meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch151
-rw-r--r--meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch71
-rw-r--r--meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch169
-rw-r--r--meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch32
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt.inc40
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb6
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch132
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.12.bb31
-rw-r--r--meta/recipes-support/libical/libical_1.0.0.bb13
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch50
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch26
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch5008
-rw-r--r--meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch50
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.11.1.bb34
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.14.bb51
-rw-r--r--meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch152
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.0.bb26
-rw-r--r--meta/recipes-support/libmpc/libmpc.inc7
-rw-r--r--meta/recipes-support/libmpc/libmpc_1.0.2.bb13
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pc-file.patch17
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch36
-rw-r--r--meta/recipes-support/libnl/libnl_3.2.25.bb43
-rw-r--r--meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch41
-rw-r--r--meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch19
-rw-r--r--meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch222
-rw-r--r--meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch24
-rw-r--r--meta/recipes-support/liboil/liboil_0.3.17.bb27
-rw-r--r--meta/recipes-support/libpcre/libpcre/Makefile183
-rw-r--r--meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch41
-rw-r--r--meta/recipes-support/libpcre/libpcre/pcre-cross.patch48
-rw-r--r--meta/recipes-support/libpcre/libpcre/run-ptest3
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.35.bb75
-rw-r--r--meta/recipes-support/libproxy/libproxy_0.4.11.bb35
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb29
-rw-r--r--meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch42
-rw-r--r--meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch81
-rw-r--r--meta/recipes-support/libunistring/libunistring/parallelmake.patch26
-rw-r--r--meta/recipes-support/libunistring/libunistring_0.9.3.bb32
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch2529
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch28
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch42
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch72
-rw-r--r--meta/recipes-support/libunwind/libunwind.inc31
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.1.bb11
-rw-r--r--meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch47
-rw-r--r--meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch11
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.8.4.bb20
-rw-r--r--meta/recipes-support/libusb/libusb-compat_0.1.5.bb37
-rw-r--r--meta/recipes-support/libusb/libusb1_1.0.19.bb34
-rw-r--r--meta/recipes-support/libxslt/libxslt/pkgconfig.patch118
-rw-r--r--meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch24
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.28.bb46
-rw-r--r--meta/recipes-support/lz4/lz4_svn.bb22
-rw-r--r--meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch70
-rw-r--r--meta/recipes-support/lzo/lzo/acinclude.m4358
-rw-r--r--meta/recipes-support/lzo/lzo_2.08.bb24
-rw-r--r--meta/recipes-support/lzop/lzop/acinclude.m4390
-rw-r--r--meta/recipes-support/lzop/lzop_1.03.bb26
-rw-r--r--meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch39
-rw-r--r--meta/recipes-support/mpfr/mpfr.inc6
-rw-r--r--meta/recipes-support/mpfr/mpfr_3.1.2.bb17
-rw-r--r--meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch18
-rw-r--r--meta/recipes-support/neon/neon_0.30.0.bb22
-rw-r--r--meta/recipes-support/nettle/nettle_2.7.1.bb26
-rw-r--r--meta/recipes-support/npth/npth_0.91.bb19
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch52
-rw-r--r--meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch67
-rw-r--r--meta/recipes-support/nspr/nspr/nspr.pc.in11
-rw-r--r--meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch26
-rw-r--r--meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--meta/recipes-support/nspr/nspr_4.10.7.bb172
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb29
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch81
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch92
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch18
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2013-1740.patch916
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2013-5606.patch48
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2014-1492.patch68
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2014-1544.patch41
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2014-1568.patch670
-rw-r--r--meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch110
-rw-r--r--meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch71
-rw-r--r--meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch26
-rw-r--r--meta/recipes-support/nss/files/nss.pc.in11
-rw-r--r--meta/recipes-support/nss/files/signlibs.sh20
-rw-r--r--meta/recipes-support/nss/nss.inc215
-rw-r--r--meta/recipes-support/nss/nss_3.15.1.bb9
-rw-r--r--meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch17
-rw-r--r--meta/recipes-support/ntp/files/ntp.conf14
-rwxr-xr-xmeta/recipes-support/ntp/files/ntpd62
-rwxr-xr-xmeta/recipes-support/ntp/files/ntpdate54
-rw-r--r--meta/recipes-support/ntp/files/ntpdate.default7
-rw-r--r--meta/recipes-support/ntp/files/openssl-check.patch59
-rw-r--r--meta/recipes-support/ntp/files/tickadj.c.patch32
-rw-r--r--meta/recipes-support/ntp/ntp.inc93
-rw-r--r--meta/recipes-support/ntp/ntp_4.2.6p5.bb7
-rw-r--r--meta/recipes-support/pinentry/pinentry_0.8.4.bb31
-rw-r--r--meta/recipes-support/popt/popt/disable_tests.patch21
-rw-r--r--meta/recipes-support/popt/popt/pkgconfig_fix.patch15
-rw-r--r--meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch21
-rw-r--r--meta/recipes-support/popt/popt_1.16.bb20
-rw-r--r--meta/recipes-support/ptest-runner/files/ptest-runner27
-rw-r--r--meta/recipes-support/ptest-runner/ptest-runner_1.0.bb22
-rw-r--r--meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch105
-rw-r--r--meta/recipes-support/pth/pth_2.0.7.bb31
-rw-r--r--meta/recipes-support/serf/serf/env.patch28
-rw-r--r--meta/recipes-support/serf/serf/norpath.patch42
-rw-r--r--meta/recipes-support/serf/serf_1.3.7.bb25
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info.inc36
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch23
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch33
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb7
-rw-r--r--meta/recipes-support/sqlite/sqlite3.inc34
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb21
-rw-r--r--meta/recipes-support/taglib/taglib_1.9.1.bb32
-rw-r--r--meta/recipes-support/user-creation/xuser-account_0.1.bb27
-rw-r--r--meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch14
-rw-r--r--meta/recipes-support/vte/vte.inc16
-rw-r--r--meta/recipes-support/vte/vte_0.28.2.bb10
252 files changed, 21991 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr-util/configfix.patch b/meta/recipes-support/apr/apr-util/configfix.patch
new file mode 100644
index 0000000000..dbb1148809
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/configfix.patch
@@ -0,0 +1,51 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-util-1.3.4/apu-config.in
4===================================================================
5--- apr-util-1.3.4.orig/apu-config.in 2009-01-12 17:08:06.000000000 +0000
6+++ apr-util-1.3.4/apu-config.in 2009-01-12 17:09:00.000000000 +0000
7@@ -134,14 +134,7 @@
8 exit 0
9 ;;
10 --includes)
11- if test "$location" = "installed"; then
12 flags="$flags -I$includedir $INCLUDES"
13- elif test "$location" = "source"; then
14- flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES"
15- else
16- # this is for VPATH builds
17- flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES"
18- fi
19 ;;
20 --ldflags)
21 flags="$flags $LDFLAGS"
22@@ -155,28 +148,10 @@
23 exit 0
24 ;;
25 --link-ld)
26- if test "$location" = "installed"; then
27- ### avoid using -L if libdir is a "standard" location like /usr/lib
28 flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
29- else
30- flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
31- fi
32 ;;
33 --link-libtool)
34- # If the LA_FILE exists where we think it should be, use it. If we're
35- # installed and the LA_FILE does not exist, assume to use -L/-l
36- # (the LA_FILE may not have been installed). If we're building ourselves,
37- # we'll assume that at some point the .la file be created.
38- if test -f "$LA_FILE"; then
39- flags="$flags $LA_FILE"
40- elif test "$location" = "installed"; then
41- ### avoid using -L if libdir is a "standard" location like /usr/lib
42- # Since the user is specifying they are linking with libtool, we
43- # *know* that -R will be recognized by libtool.
44- flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME"
45- else
46- flags="$flags $LA_FILE"
47- fi
48+ flags="$flags -l$APRUTIL_LIBNAME"
49 ;;
50 --apu-la-file)
51 if test -f "$LA_FILE"; then
diff --git a/meta/recipes-support/apr/apr-util/configure_fixes.patch b/meta/recipes-support/apr/apr-util/configure_fixes.patch
new file mode 100644
index 0000000000..91e244ce2c
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/configure_fixes.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-util-1.4.1/configure.in
4===================================================================
5--- apr-util-1.4.1.orig/configure.in 2009-12-18 03:15:19.000000000 +0800
6+++ apr-util-1.4.1/configure.in 2011-12-30 13:32:07.000000000 +0800
7@@ -8,15 +8,15 @@
8 AC_CONFIG_HEADER(include/private/apu_config.h)
9 AC_CONFIG_AUX_DIR(build)
10
11-sinclude(build/apu-conf.m4)
12-sinclude(build/apu-iconv.m4)
13-sinclude(build/apu-hints.m4)
14-sinclude(build/apr_common.m4)
15-sinclude(build/find_apr.m4)
16-sinclude(build/crypto.m4)
17-sinclude(build/dbm.m4)
18-sinclude(build/dbd.m4)
19-sinclude(build/dso.m4)
20+#sinclude(build/apu-conf.m4)
21+#sinclude(build/apu-iconv.m4)
22+#sinclude(build/apu-hints.m4)
23+#sinclude(build/apr_common.m4)
24+#sinclude(build/find_apr.m4)
25+#sinclude(build/crypto.m4)
26+#sinclude(build/dbm.m4)
27+#sinclude(build/dbd.m4)
28+#sinclude(build/dso.m4)
29
30 dnl Generate ./config.nice for reproducing runs of configure
31 dnl
diff --git a/meta/recipes-support/apr/apr-util/run-ptest b/meta/recipes-support/apr/apr-util/run-ptest
new file mode 100644
index 0000000000..ae19a1d11b
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/run-ptest
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3cd test
4./testall |sed \
5 -e 's|\(.*\): SUCCESS|PASS: \1|' \
6 -e 's|\(.*\): FAILED|FAIL: \1|'
diff --git a/meta/recipes-support/apr/apr-util_1.5.3.bb b/meta/recipes-support/apr/apr-util_1.5.3.bb
new file mode 100644
index 0000000000..063a787396
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util_1.5.3.bb
@@ -0,0 +1,67 @@
1SUMMARY = "Apache Portable Runtime (APR) companion library"
2HOMEPAGE = "http://apr.apache.org/"
3SECTION = "libs"
4DEPENDS = "apr expat gdbm"
5
6BBCLASSEXTEND = "native"
7
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=519e0a18e03f7c023070568c14b077bb \
10 file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
11
12SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
13 file://configfix.patch \
14 file://configure_fixes.patch \
15 file://run-ptest \
16"
17
18SRC_URI[md5sum] = "71a11d037240b292f824ba1eb537b4e3"
19SRC_URI[sha256sum] = "76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743"
20
21EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
22 --without-odbc \
23 --without-pgsql \
24 --with-dbm=gdbm \
25 --with-gdbm=${STAGING_DIR_HOST}${prefix} \
26 --without-sqlite2 \
27 --without-sqlite3 \
28 --with-expat=${STAGING_DIR_HOST}${prefix}"
29
30
31inherit autotools-brokensep lib_package binconfig
32
33OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
34
35do_configure_append() {
36 if [ "${CLASSOVERRIDE}" = "class-target" ]; then
37 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
38 fi
39}
40do_configure_prepend_class-native() {
41 cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${S}/build/rules.mk
42}
43do_configure_append_class-native() {
44 sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk
45 # sometimes there isn't SHELL
46 sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk
47}
48
49FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so"
50FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/apr_dbm_gdbm.so* ${libdir}/apr-util-1/apr_dbm_gdbm.la"
51FILES_${PN}-dbg += "${libdir}/apr-util-1/.debug/*"
52FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a"
53
54inherit ptest
55
56do_compile_ptest() {
57 cd ${S}/test
58 oe_runmake
59}
60
61do_install_ptest() {
62 t=${D}${PTEST_PATH}/test
63 mkdir $t
64 for i in testall data; do \
65 cp -r ${S}/test/$i $t; \
66 done
67}
diff --git a/meta/recipes-support/apr/apr/cleanup.patch b/meta/recipes-support/apr/apr/cleanup.patch
new file mode 100644
index 0000000000..b6784e015d
--- /dev/null
+++ b/meta/recipes-support/apr/apr/cleanup.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-1.4.2/build/buildcheck.sh
4===================================================================
5--- apr-1.4.2.orig/build/buildcheck.sh 2009-11-13 08:27:16.000000000 +0800
6+++ apr-1.4.2/build/buildcheck.sh 2010-11-26 15:44:00.000000000 +0800
7@@ -32,35 +32,4 @@
8 echo "buildconf: autoconf version $ac_version (ok)"
9 fi
10
11-# Sample libtool --version outputs:
12-# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
13-# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
14-# output is multiline from 1.5 onwards
15-
16-# Require libtool 1.4 or newer
17-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
18-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
19-if test -z "$lt_pversion"; then
20-echo "buildconf: libtool not found."
21-echo " You need libtool version 1.4 or newer installed"
22-echo " to build APR from SVN."
23-exit 1
24-fi
25-lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
26-IFS=.; set $lt_version; IFS=' '
27-lt_status="good"
28-if test "$1" = "1"; then
29- if test "$2" -lt "4"; then
30- lt_status="bad"
31- fi
32-fi
33-if test $lt_status = "good"; then
34- echo "buildconf: libtool version $lt_pversion (ok)"
35- exit 0
36-fi
37-
38-echo "buildconf: libtool version $lt_pversion found."
39-echo " You need libtool version 1.4 or newer installed"
40-echo " to build APR from SVN."
41-
42-exit 1
43+exit 0
diff --git a/meta/recipes-support/apr/apr/configfix.patch b/meta/recipes-support/apr/apr/configfix.patch
new file mode 100644
index 0000000000..605c4f632c
--- /dev/null
+++ b/meta/recipes-support/apr/apr/configfix.patch
@@ -0,0 +1,53 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-1.3.3/apr-config.in
4===================================================================
5--- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000
6+++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000
7@@ -152,14 +152,7 @@
8 flags="$flags $LDFLAGS"
9 ;;
10 --includes)
11- if test "$location" = "installed"; then
12 flags="$flags -I$includedir $EXTRA_INCLUDES"
13- elif test "$location" = "source"; then
14- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
15- else
16- # this is for VPATH builds
17- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
18- fi
19 ;;
20 --srcdir)
21 echo $APR_SOURCE_DIR
22@@ -181,29 +167,14 @@
23 exit 0
24 ;;
25 --link-ld)
26- if test "$location" = "installed"; then
27- ### avoid using -L if libdir is a "standard" location like /usr/lib
28- flags="$flags -L$libdir -l${APR_LIBNAME}"
29- else
30- ### this surely can't work since the library is in .libs?
31- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
32- fi
33+ flags="$flags -l${APR_LIBNAME}"
34 ;;
35 --link-libtool)
36 # If the LA_FILE exists where we think it should be, use it. If we're
37 # installed and the LA_FILE does not exist, assume to use -L/-l
38 # (the LA_FILE may not have been installed). If we're building ourselves,
39 # we'll assume that at some point the .la file be created.
40- if test -f "$LA_FILE"; then
41- flags="$flags $LA_FILE"
42- elif test "$location" = "installed"; then
43- ### avoid using -L if libdir is a "standard" location like /usr/lib
44- # Since the user is specifying they are linking with libtool, we
45- # *know* that -R will be recognized by libtool.
46- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
47- else
48- flags="$flags $LA_FILE"
49- fi
50+ flags="$flags -l${APR_LIBNAME}"
51 ;;
52 --shlib-path-var)
53 echo "$SHLIBPATH_VAR"
diff --git a/meta/recipes-support/apr/apr/configure_fixes.patch b/meta/recipes-support/apr/apr/configure_fixes.patch
new file mode 100644
index 0000000000..0514000599
--- /dev/null
+++ b/meta/recipes-support/apr/apr/configure_fixes.patch
@@ -0,0 +1,68 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-1.3.3/configure.in
4===================================================================
5--- apr-1.3.3.orig/configure.in
6+++ apr-1.3.3/configure.in
7@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
8 create_area])
9
10 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
11-AC_CHECK_FILE(/dev/zero)
12-
13-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
14-if test "$ac_cv_func_mmap" = "yes" &&
15- test "$ac_cv_file__dev_zero" = "yes"; then
16- AC_MSG_CHECKING(for mmap that can map /dev/zero)
17- AC_TRY_RUN([
18-#include <sys/types.h>
19-#include <sys/stat.h>
20-#include <fcntl.h>
21-#ifdef HAVE_SYS_MMAN_H
22-#include <sys/mman.h>
23-#endif
24- int main()
25- {
26- int fd;
27- void *m;
28- fd = open("/dev/zero", O_RDWR);
29- if (fd < 0) {
30- return 1;
31- }
32- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
33- if (m == (void *)-1) { /* aka MAP_FAILED */
34- return 2;
35- }
36- if (munmap(m, sizeof(void*)) < 0) {
37- return 3;
38- }
39- return 0;
40- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
41-
42- AC_MSG_RESULT($ac_cv_file__dev_zero)
43-fi
44
45 # Now we determine which one is our anonymous shmem preference.
46 haveshmgetanon="0"
47@@ -1518,13 +1485,14 @@ else
48 bigendian=0
49 fi
50
51-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
52-#include <sys/uio.h>],struct iovec,0)
53-if test "$ac_cv_sizeof_struct_iovec" = "0"; then
54- have_iovec=0
55-else
56- have_iovec=1
57-fi
58+#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
59+##include <sys/uio.h>],struct iovec,0)
60+#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
61+# have_iovec=0
62+#else
63+# have_iovec=1
64+#fi
65+have_iovec=1
66
67 AC_SUBST(voidp_size)
68 AC_SUBST(short_value)
diff --git a/meta/recipes-support/apr/apr/run-ptest b/meta/recipes-support/apr/apr/run-ptest
new file mode 100644
index 0000000000..ae19a1d11b
--- /dev/null
+++ b/meta/recipes-support/apr/apr/run-ptest
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3cd test
4./testall |sed \
5 -e 's|\(.*\): SUCCESS|PASS: \1|' \
6 -e 's|\(.*\): FAILED|FAIL: \1|'
diff --git a/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
new file mode 100644
index 0000000000..4bca38494b
--- /dev/null
+++ b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
@@ -0,0 +1,48 @@
1Makefile.in: fix cross compiling failed
2
3The tools/gen_test_char was invoked at build time,
4and it didn't work for the cross compiling, so we
5compile it with $BUILD_CC.
6
7Remove the 'tools' dir creation, it always existed.
8And it caused gen_test_char unexpected rebuilt at
9do_install time.
10
11Upstream-Status: inappropriate [oe specific]
12
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14---
15 Makefile.in | 10 ++--------
16 1 file changed, 2 insertions(+), 8 deletions(-)
17
18diff --git a/Makefile.in b/Makefile.in
19index 6f99733..5fe028f 100644
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@
23
24 CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
25 build/apr_rules.out tools/gen_test_char@EXEEXT@ \
26- tools/gen_test_char.o tools/gen_test_char.lo \
27 include/private/apr_escape_test_char.h
28 DISTCLEAN_TARGETS = config.cache config.log config.status \
29 include/apr.h include/arch/unix/apr_private.h \
30@@ -129,13 +128,8 @@ check: $(TARGET_LIB)
31 etags:
32 etags `find . -name '*.[ch]'`
33
34-make_tools_dir:
35- $(APR_MKDIR) tools
36-
37-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
38-tools/gen_test_char.lo: make_tools_dir
39-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
40- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
41+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
42+ $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@
43
44 include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
45 $(APR_MKDIR) include/private
46--
471.8.1.2
48
diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb
new file mode 100644
index 0000000000..a27b2338d1
--- /dev/null
+++ b/meta/recipes-support/apr/apr_1.5.1.bb
@@ -0,0 +1,95 @@
1SUMMARY = "Apache Portable Runtime (APR) library"
2HOMEPAGE = "http://apr.apache.org/"
3SECTION = "libs"
4DEPENDS = "util-linux"
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
8 file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
9
10BBCLASSEXTEND = "native"
11
12SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
13 file://configure_fixes.patch \
14 file://cleanup.patch \
15 file://configfix.patch \
16 file://run-ptest \
17 file://upgrade-and-fix-1.5.1.patch \
18"
19
20SRC_URI[md5sum] = "5486180ec5a23efb5cae6d4292b300ab"
21SRC_URI[sha256sum] = "e94abe431d4da48425fcccdb27b469bd0f8151488f82e5630a56f26590e198ac"
22
23inherit autotools-brokensep lib_package binconfig multilib_header ptest
24
25OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
26
27# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
28CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
29
30# Also suppress trying to use sctp.
31#
32CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
33
34do_configure_prepend() {
35 # Avoid absolute paths for grep since it causes failures
36 # when using sstate between different hosts with different
37 # install paths for grep.
38 export GREP="grep"
39
40 cd ${S}
41 ./buildconf
42}
43
44FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
45RDEPENDS_${PN}-dev += "bash"
46
47#for some reason, build/libtool.m4 handled by buildconf still be overwritten
48#when autoconf, so handle it again.
49do_configure_append() {
50 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
51 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
52}
53
54do_install_append() {
55 oe_multilib_header apr.h
56 install -d ${D}${datadir}/apr
57 cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool
58}
59
60SSTATE_SCAN_FILES += "apr_rules.mk libtool"
61
62SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
63
64apr_sysroot_preprocess () {
65 d=${SYSROOT_DESTDIR}${datadir}/apr
66 install -d $d/
67 cp ${S}/build/apr_rules.mk $d/
68 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
69 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
70 sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
71 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
72 cp ${S}/build/mkdir.sh $d/
73 cp ${S}/build/make_exports.awk $d/
74 cp ${S}/build/make_var_export.awk $d/
75}
76
77do_compile_ptest() {
78 cd ${S}/test
79 oe_runmake
80}
81
82do_install_ptest() {
83 t=${D}${PTEST_PATH}/test
84 mkdir -p $t/.libs
85 cp -r ${S}/test/data $t/
86 cp -r ${S}/test/.libs/*.so $t/.libs/
87 cp ${S}/test/proc_child $t/
88 cp ${S}/test/readchild $t/
89 cp ${S}/test/sockchild $t/
90 cp ${S}/test/sockperf $t/
91 cp ${S}/test/testall $t/
92 cp ${S}/test/tryread $t/
93}
94
95export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
new file mode 100644
index 0000000000..a4f0e140b2
--- /dev/null
+++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -0,0 +1,28 @@
1SUMMARY = "GNU Aspell spell-checker"
2SECTION = "console/utils"
3
4LICENSE = "LGPLv2 | LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
6
7PR = "r1"
8
9SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
10SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7"
11SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1"
12
13PACKAGECONFIG ??= ""
14PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
15
16PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
17
18RDEPENDS_${PN}-utils += "perl"
19
20FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
21FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
22FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
23FILES_${PN} = "${bindir}/aspell"
24FILES_libpspell = "${libdir}/libpspell.so.*"
25FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
26
27ARM_INSTRUCTION_SET = "arm"
28inherit autotools-brokensep gettext texinfo
diff --git a/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb b/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb
new file mode 100644
index 0000000000..4431c3d9eb
--- /dev/null
+++ b/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb
@@ -0,0 +1,19 @@
1SUMMARY = "AT-SPI 2 Toolkit Bridge"
2LICENSE = "LGPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
4
5MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6
7SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
8SRC_URI[md5sum] = "ae11df528f1f038987797f39c8357f81"
9SRC_URI[sha256sum] = "5fa9c527bdec028e06797563cd52d49bcf06f638549df983424d88db89bb1336"
10
11DEPENDS = "dbus glib-2.0 atk at-spi2-core"
12
13inherit autotools pkgconfig
14
15PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
16
17FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
18FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
19FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug"
diff --git a/meta/recipes-support/atk/at-spi2-core_2.12.0.bb b/meta/recipes-support/atk/at-spi2-core_2.12.0.bb
new file mode 100644
index 0000000000..e67155ccbd
--- /dev/null
+++ b/meta/recipes-support/atk/at-spi2-core_2.12.0.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
2LICENSE = "LGPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
4
5MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6
7SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
8 file://core_acinclude_m4.patch \
9 "
10
11SRC_URI[md5sum] = "b12ad0e0924706f5e7f51216241068ef"
12SRC_URI[sha256sum] = "db550edd98e53b4252521459c2dcaf0f3b060a9bad52489b9dbadbaedad3fb89"
13
14DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
15
16inherit autotools gtk-doc pkgconfig
17
18EXTRA_OECONF = "--disable-introspection --disable-xevie"
19
20FILES_${PN} += "${datadir}/dbus-1/services/*.service"
diff --git a/meta/recipes-support/atk/atk_2.12.0.bb b/meta/recipes-support/atk/atk_2.12.0.bb
new file mode 100644
index 0000000000..9112bbb6c2
--- /dev/null
+++ b/meta/recipes-support/atk/atk_2.12.0.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Accessibility toolkit for GNOME"
2HOMEPAGE = "http://live.gnome.org/GAP/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4SECTION = "x11/libs"
5
6LICENSE = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
8 file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \
9 file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7"
10
11DEPENDS = "glib-2.0"
12
13inherit gnomebase gtk-doc
14
15GNOME_COMPRESS_TYPE = "xz"
16
17SRC_URI[archive.md5sum] = "930238dec55fdbf8eda9975b44f07b76"
18SRC_URI[archive.sha256sum] = "48a8431974639c5a59c24fcd3ece1a19709872d5dfe78907524d9f5e9993f18f"
19
20BBCLASSEXTEND = "native"
21
22EXTRA_OECONF = "--disable-glibtest \
23 --disable-introspection"
diff --git a/meta/recipes-support/atk/files/core_acinclude_m4.patch b/meta/recipes-support/atk/files/core_acinclude_m4.patch
new file mode 100644
index 0000000000..29c538e2c3
--- /dev/null
+++ b/meta/recipes-support/atk/files/core_acinclude_m4.patch
@@ -0,0 +1,40 @@
1at-spi2-core: fix alignof m4 macro
2
3DBIND_CHECK_ALIGNOF does not work when cross-compiling, so we modify
4it to use AC_CHECK_ALIGNOF.
5
6Upstream-Status: Pending
7
8Signed-off-by: joe.slater@windriver.com
9
10
11--- a/acinclude.m4
12+++ b/acinclude.m4
13@@ -2,7 +2,26 @@
14 # type alignment test #
15 #######################
16
17-AC_DEFUN([DBIND_CHECK_ALIGNOF],
18+AC_DEFUN([DBIND_CHECK_ALIGNOF],[
19+AC_CHECK_ALIGNOF($1,[
20+#include <stdio.h>
21+#include <stdlib.h>
22+#define DBUS_API_SUBJECT_TO_CHANGE
23+#include <dbus/dbus.h>
24+typedef struct {char s1;} dbind_struct;
25+typedef void *dbind_pointer;
26+])
27+
28+dnl Note that we substitute for names like @DBIND_ALIGNOF_DBIND_STRUCT@, but
29+dnl we #define names like ALIGNOF_DBIND_STRUCT in config.h!
30+dnl
31+AC_SUBST(translit(dbind_alignof_$1, [a-z *], [A-Z_P]),[$ac_cv_alignof_$1])
32+
33+])
34+
35+dnl The following does not work for cross-compilation.
36+dnl
37+AC_DEFUN([xDBIND_CHECK_ALIGNOF],
38 [changequote(<<, >>)dnl
39 dnl The name to #define.
40 define(<<AC_TYPE_NAME>>,
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
new file mode 100644
index 0000000000..bc9fd6dda3
--- /dev/null
+++ b/meta/recipes-support/attr/acl.inc
@@ -0,0 +1,39 @@
1SUMMARY = "Utilities for managing POSIX Access Control Lists"
2HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LICENSE_${PN} = "GPLv2+"
7LICENSE_lib${BPN} = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
9 file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
10
11DEPENDS = "attr"
12SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
13 file://run-ptest \
14 file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
15"
16
17require ea-acl.inc
18
19# avoid RPATH hardcode to staging dir
20do_configure_append() {
21 sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
22 ${S}/config.status
23}
24
25# libdir should point to .la
26do_install_append() {
27 sed -i ${D}${libdir}/libacl.la -e \
28 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
29}
30
31inherit ptest
32
33do_install_ptest() {
34 tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - )
35 mkdir ${D}${PTEST_PATH}/include
36 cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
37}
38
39RDEPENDS_${PN}-ptest = "bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
diff --git a/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch b/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
new file mode 100644
index 0000000000..cf765fdbb8
--- /dev/null
+++ b/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
@@ -0,0 +1,198 @@
1acl: fix the order of expected output of getfacl
2
3The result of getfacl is sorted by user id.
4In Centos or RHEL, bin user id is 1 and daemon user id is 2.
5But in our image, bin user id is 2 and daemon user id is 1.
6The patch fixes this issue to make ptest pass.
7
8Upstream-Status: Inappropriate [embedded specific]
9
10Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
11---
12 test/misc.test | 38 +++++++++++++++++++-------------------
13 1 file changed, 19 insertions(+), 19 deletions(-)
14
15diff --git a/test/misc.test b/test/misc.test
16index 6e98053..53ae5b0 100644
17--- a/test/misc.test
18+++ b/test/misc.test
19@@ -79,8 +79,8 @@ Multiple users
20
21 $ getfacl --omit-header f
22 > user::rw-
23- > user:bin:rw-
24 > user:daemon:r--
25+ > user:bin:rw-
26 > group::r--
27 > mask::rw-
28 > other::r--
29@@ -94,8 +94,8 @@ Multiple groups
30
31 $ getfacl --omit-header f
32 > user::rw-
33- > user:bin:rw-
34 > user:daemon:r--
35+ > user:bin:rw-
36 > group::r--
37 > group:daemon:r--
38 > group:users:rw-
39@@ -111,8 +111,8 @@ Remove one group
40
41 $ getfacl --omit-header f
42 > user::rw-
43- > user:bin:rw-
44 > user:daemon:r--
45+ > user:bin:rw-
46 > group::r--
47 > group:daemon:r--
48 > mask::rw-
49@@ -146,8 +146,8 @@ Default ACL
50
51 $ getfacl --omit-header d
52 > user::rwx
53- > user:bin:rwx
54 > user:daemon:rw-
55+ > user:bin:rwx
56 > group::r-x
57 > mask::rwx
58 > other::---
59@@ -236,16 +236,16 @@ Add some users and groups
60
61 $ getfacl --omit-header d/d
62 > user::rwx
63- > user:bin:rwx #effective:r-x
64 > user:daemon:r-x
65+ > user:bin:rwx #effective:r-x
66 > group::r-x
67 > group:daemon:rwx #effective:r-x
68 > group:users:r-x
69 > mask::r-x
70 > other::---
71 > default:user::rwx
72- > default:user:bin:rwx #effective:r-x
73 > default:user:daemon:r-x
74+ > default:user:bin:rwx #effective:r-x
75 > default:group::r-x
76 > default:mask::r-x
77 > default:other::---
78@@ -262,16 +262,16 @@ Symlink in directory with default ACL?
79
80 $ getfacl --omit-header d/l
81 > user::rwx
82- > user:bin:rwx #effective:r-x
83 > user:daemon:r-x
84+ > user:bin:rwx #effective:r-x
85 > group::r-x
86 > group:daemon:rwx #effective:r-x
87 > group:users:r-x
88 > mask::r-x
89 > other::---
90 > default:user::rwx
91- > default:user:bin:rwx #effective:r-x
92 > default:user:daemon:r-x
93+ > default:user:bin:rwx #effective:r-x
94 > default:group::r-x
95 > default:mask::r-x
96 > default:other::---
97@@ -287,16 +287,16 @@ Does mask manipulation work?
98
99 $ getfacl --omit-header d/d
100 > user::rwx
101- > user:bin:r-x
102 > user:daemon:r-x
103+ > user:bin:r-x
104 > group::r-x
105 > group:daemon:r-x
106 > group:users:r-x
107 > mask::r-x
108 > other::---
109 > default:user::rwx
110- > default:user:bin:rwx #effective:r-x
111 > default:user:daemon:r-x
112+ > default:user:bin:rwx #effective:r-x
113 > default:group::r-x
114 > default:mask::r-x
115 > default:other::---
116@@ -308,16 +308,16 @@ Does mask manipulation work?
117
118 $ getfacl --omit-header d/d
119 > user::rwx
120- > user:bin:r-x
121 > user:daemon:r-x
122+ > user:bin:r-x
123 > group::r-x
124 > group:daemon:r-x
125 > group:users:r-x
126 > mask::r-x
127 > other::---
128 > default:user::rwx
129- > default:user:bin:rwx
130 > default:user:daemon:r-x
131+ > default:user:bin:rwx
132 > default:group::r-x
133 > default:mask::rwx
134 > default:other::---
135@@ -333,8 +333,8 @@ Remove the default ACL
136
137 $ getfacl --omit-header d
138 > user::rwx
139- > user:bin:rwx
140 > user:daemon:rw-
141+ > user:bin:rwx
142 > group::r-x
143 > mask::rwx
144 > other::---
145@@ -373,14 +373,14 @@ Now, chmod should change the group_obj entry
146
147 $ getfacl --omit-header d
148 > user::rwx
149- > user:bin:r-x
150 > user:daemon:rwx
151+ > user:bin:r-x
152 > group::rwx
153 > mask::rwx
154 > other::r-x
155 > default:user::rwx
156- > default:user:bin:r-x
157 > default:user:daemon:rwx
158+ > default:user:bin:r-x
159 > default:group::rwx
160 > default:mask::rwx
161 > default:other::r-x
162@@ -392,14 +392,14 @@ Now, chmod should change the group_obj entry
163
164 $ getfacl --omit-header d
165 > user::rwx
166- > user:bin:r-x
167 > user:daemon:rwx #effective:r-x
168+ > user:bin:r-x
169 > group::rwx #effective:r-x
170 > mask::r-x
171 > other::---
172 > default:user::rwx
173- > default:user:bin:r-x
174 > default:user:daemon:rwx
175+ > default:user:bin:r-x
176 > default:group::rwx
177 > default:mask::rwx
178 > default:other::r-x
179@@ -411,14 +411,14 @@ Now, chmod should change the group_obj entry
180
181 $ getfacl --omit-header d
182 > user::rwx
183- > user:bin:r-x
184 > user:daemon:rwx #effective:r-x
185+ > user:bin:r-x
186 > group::rwx #effective:r-x
187 > mask::r-x
188 > other::---
189 > default:user::rwx
190- > default:user:bin:r-x
191 > default:user:daemon:rwx
192+ > default:user:bin:r-x
193 > default:group::rwx
194 > default:mask::rwx
195 > default:other::r-x
196--
1971.7.9.5
198
diff --git a/meta/recipes-support/attr/acl/add-missing-configure.ac.patch b/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
new file mode 100644
index 0000000000..eb6979fa3c
--- /dev/null
+++ b/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
@@ -0,0 +1,59 @@
1Upstream-Status: Backport [configure.ac is missing from tarball]
2
3Signed-off-by: Saul Wold <sgw@linux.intel.com>
4
5Index: acl-2.2.52/configure.ac
6===================================================================
7--- /dev/null
8+++ acl-2.2.52/configure.ac
9@@ -0,0 +1,50 @@
10+
11+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
12+#
13+# This program is free software: you can redistribute it and/or modify it
14+# under the terms of the GNU General Public License as published by
15+# the Free Software Foundation, either version 2 of the License, or
16+# (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU General Public License for more details.
22+#
23+# You should have received a copy of the GNU General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+AC_INIT(include/acl.h)
27+AC_CONFIG_AUX_DIR([.])
28+AC_CONFIG_MACRO_DIR([m4])
29+AC_CONFIG_HEADER(include/config.h)
30+AC_PREFIX_DEFAULT(/usr)
31+
32+AC_PROG_LIBTOOL
33+
34+AC_ARG_ENABLE(shared,
35+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
36+ enable_shared=yes)
37+AC_SUBST(enable_shared)
38+
39+AC_ARG_ENABLE(gettext,
40+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
41+ enable_gettext=yes)
42+AC_SUBST(enable_gettext)
43+
44+AC_ARG_ENABLE(lib64,
45+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
46+ enable_lib64=no)
47+AC_SUBST(enable_lib64)
48+
49+AC_PACKAGE_GLOBALS(acl)
50+AC_PACKAGE_UTILITIES(acl)
51+AC_PACKAGE_NEED_ATTR_XATTR_H
52+AC_PACKAGE_NEED_ATTR_ERROR_H
53+AC_MULTILIB($enable_lib64)
54+AC_PACKAGE_NEED_GETXATTR_LIBATTR
55+AC_MANUAL_FORMAT
56+
57+AC_FUNC_GCC_VISIBILITY
58+
59+AC_OUTPUT(include/builddefs)
diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest
new file mode 100644
index 0000000000..3b31cc99af
--- /dev/null
+++ b/meta/recipes-support/attr/acl/run-ptest
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3gpasswd -a daemon bin
4make -C test -k tests root-tests |sed \
5 -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
6 -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
7gpasswd -d daemon bin
diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
new file mode 100644
index 0000000000..ecdbdb6b79
--- /dev/null
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -0,0 +1,9 @@
1require acl.inc
2
3SRC_URI += "file://add-missing-configure.ac.patch"
4
5SRC_URI[md5sum] = "a61415312426e9c2212bd7dc7929abda"
6SRC_URI[sha256sum] = "179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23"
7
8
9BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
new file mode 100644
index 0000000000..28c750f987
--- /dev/null
+++ b/meta/recipes-support/attr/attr.inc
@@ -0,0 +1,39 @@
1SUMMARY = "Utilities for manipulating filesystem extended attributes"
2HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
3SECTION = "libs"
4
5DEPENDS = "ncurses virtual/libintl"
6
7LICENSE = "LGPLv2.1+ & GPLv2+"
8LICENSE_${PN} = "GPLv2+"
9LICENSE_lib${BPN} = "LGPLv2.1+"
10LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
11 file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
12 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
13
14SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.src.tar.gz \
15 file://run-ptest \
16"
17
18require ea-acl.inc
19
20# libdir should point to .la
21do_install_append() {
22 sed -i ${D}${libdir}/libattr.la -e \
23 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
24}
25
26inherit ptest
27
28do_install_ptest() {
29 tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - )
30 mkdir ${D}${PTEST_PATH}/include
31 for i in builddefs buildmacros buildrules; \
32 do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
33 done
34 sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
35}
36
37RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
38
39BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/meta/recipes-support/attr/attr_2.4.47.bb b/meta/recipes-support/attr/attr_2.4.47.bb
new file mode 100644
index 0000000000..ad40c9b72a
--- /dev/null
+++ b/meta/recipes-support/attr/attr_2.4.47.bb
@@ -0,0 +1,10 @@
1require attr.inc
2
3# configure.ac was missing from the release tarball. This should be fixed in
4# future releases of attr, remove this when updating the recipe.
5SRC_URI_append += "file://attr-Missing-configure.ac.patch"
6
7SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
8SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
9
10BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
new file mode 100644
index 0000000000..72f623e593
--- /dev/null
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -0,0 +1,58 @@
1# this build system is mostly shared by attr and acl
2
3SRC_URI += "file://relative-libdir.patch;striplevel=0 \
4 "
5
6inherit autotools-brokensep gettext
7
8# the package comes with a custom config.h.in, it cannot be
9# overwritten by autoheader
10export AUTOHEADER = "true"
11EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
12EXTRA_OECONF_append_class-native = " --enable-gettext=no"
13
14EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
15
16do_install () {
17 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
18}
19
20PACKAGES =+ "lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-doc"
21
22FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
23
24FILES_lib${BPN}-dev = "${includedir} \
25 ${libdir}/lib*${SOLIBSDEV} \
26 ${libdir}/lib*.la \
27 ${base_libdir}/lib*${SOLIBSDEV} \
28 ${base_libdir}/lib*.la"
29
30FILES_lib${BPN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a"
31
32FILES_lib${BPN}-doc = "${mandir}/man2 \
33 ${mandir}/man3"
34
35BBCLASSEXTEND = "native"
36# Only append ldflags for target recipe and if USE_NLS is enabled
37LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
38EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
39
40fix_symlink () {
41 if test "${libdir}" = "${base_libdir}" ; then
42 return
43 fi
44 # Remove bad symlinks & create the correct symlinks
45 if test -L ${libdir}/lib${BPN}.so ; then
46 rm -rf ${libdir}/lib${BPN}.so
47 ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so
48 fi
49 if test -L ${base_libdir}/lib${BPN}.a ; then
50 rm -rf ${base_libdir}/lib${BPN}.a
51 ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a
52 fi
53 if test -L ${base_libdir}/lib${BPN}.la ; then
54 rm -rf ${base_libdir}/lib${BPN}.la
55 ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la
56 fi
57}
58SSTATEPOSTINSTFUNCS_class-native += "fix_symlink"
diff --git a/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch b/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch
new file mode 100644
index 0000000000..20fcc3cee7
--- /dev/null
+++ b/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch
@@ -0,0 +1,63 @@
1Subject: [PATCH] attr: Missing configure.ac
2
3Upstream-Status: Backport [Upstream released tarball missing this file]
4Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
5---
6 configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
7 1 file changed, 48 insertions(+)
8 create mode 100644 configure.ac
9
10diff --git a/configure.ac b/configure.ac
11new file mode 100644
12index 0000000..b966d0e
13--- /dev/null
14+++ b/configure.ac
15@@ -0,0 +1,48 @@
16+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
17+#
18+# This program is free software: you can redistribute it and/or modify it
19+# under the terms of the GNU General Public License as published by
20+# the Free Software Foundation, either version 2 of the License, or
21+# (at your option) any later version.
22+#
23+# This program is distributed in the hope that it will be useful,
24+# but WITHOUT ANY WARRANTY; without even the implied warranty of
25+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+# GNU General Public License for more details.
27+#
28+# You should have received a copy of the GNU General Public License
29+# along with this program. If not, see <http://www.gnu.org/licenses/>.
30+#
31+AC_INIT(include/attributes.h)
32+AC_CONFIG_AUX_DIR([.])
33+AC_CONFIG_MACRO_DIR([m4])
34+AC_CONFIG_HEADER(include/config.h)
35+AC_PREFIX_DEFAULT(/usr)
36+
37+AC_PROG_LIBTOOL
38+
39+AC_ARG_ENABLE(shared,
40+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
41+ enable_shared=yes)
42+AC_SUBST(enable_shared)
43+
44+AC_ARG_ENABLE(gettext,
45+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
46+ enable_gettext=yes)
47+AC_SUBST(enable_gettext)
48+
49+AC_ARG_ENABLE(lib64,
50+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
51+ enable_lib64=no)
52+AC_SUBST(enable_lib64)
53+
54+AC_PACKAGE_GLOBALS(attr)
55+AC_PACKAGE_UTILITIES(attr)
56+AC_MANUAL_FORMAT
57+AC_MULTILIB($enable_lib64)
58+
59+AC_C_CONST
60+AC_TYPE_MODE_T
61+AC_FUNC_ALLOCA
62+
63+AC_OUTPUT(include/builddefs)
diff --git a/meta/recipes-support/attr/files/relative-libdir.patch b/meta/recipes-support/attr/files/relative-libdir.patch
new file mode 100644
index 0000000000..b72bf184d6
--- /dev/null
+++ b/meta/recipes-support/attr/files/relative-libdir.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Pending
2
3use relative path in symbolic links, or it fails in staging
4sed expression from udev
5
67/29/2010 - created by Qing He <qing.he@intel.com>
7
8diff -u include.orig/buildmacros include/buildmacros
9--- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800
10+++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800
11@@ -88,9 +88,11 @@
12 ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
13 ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
14 if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
15- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
16- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
17- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
18+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
19+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
20+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
21+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
22+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
23 fi
24 else
25 INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
diff --git a/meta/recipes-support/attr/files/run-ptest b/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 0000000000..a6c6867f2d
--- /dev/null
+++ b/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3make -C test -k tests root-tests |sed \
4 -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
5 -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
diff --git a/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
new file mode 100644
index 0000000000..23ec95419c
--- /dev/null
+++ b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
@@ -0,0 +1,41 @@
1SUMMARY = "A garbage collector for C and C++"
2
3DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
4 used as a garbage collecting replacement for C malloc or C++ new. It allows\
5 you to allocate memory basically as you normally would, without explicitly\
6 deallocating memory that is no longer useful. The collector automatically\
7 recycles memory when it determines that it can no longer be otherwise\
8 accessed.\
9 The collector is also used by a number of programming language\
10 implementations that either use C as intermediate code, want to facilitate\
11 easier interoperation with C libraries, or just prefer the simple collector\
12 interface.\
13 Alternatively, the garbage collector may be used as a leak detector for C\
14 or C++ programs, though that is not its primary goal.\
15 Empirically, this collector works with most unmodified C programs, simply\
16 by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
17 calls, and removing free calls."
18
19HOMEPAGE = "http://www.hboehm.info/gc/"
20SECTION = "devel"
21LICENSE = "MIT"
22LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
23
24SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz"
25
26SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
27SRC_URI[sha256sum] = "63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2"
28FILES_${PN}-doc = "/usr/share"
29
30REAL_PV = "${@[d.getVar('PV',1)[:-1], d.getVar('PV',1)][(d.getVar('PV',1)[-1]).isdigit()]}"
31S = "${WORKDIR}/gc-${REAL_PV}"
32
33ARM_INSTRUCTION_SET = "arm"
34
35inherit autotools pkgconfig
36
37# by default use external libatomic-ops
38PACKAGECONFIG ??= "libatomic-ops"
39PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomics-ops"
40
41BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
new file mode 100644
index 0000000000..4737d9c430
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
@@ -0,0 +1,34 @@
1Add config option --with-dev-dsp.
2
3Upstream-Status: Pending
4
5Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
6---
7--- a/configure.ac
8+++ b/configure.ac
9@@ -106,6 +106,16 @@ AC_ARG_WITH(python,[ --with-python[[=AR
10 fi
11 ])
12
13+AC_ARG_WITH(dev-dsp,[ --with-dev-dsp enables dev/dsp for entropy producing. auto for auto-detecting dev/dep on host. [[default=no]]],[
14+ if test "$withval" = yes; then
15+ AC_DEFINE([HAVE_DEV_DSP], 1)
16+ else
17+ if test "$withval" = auto; then
18+ ac_detect_dev_dsp=yes
19+ fi
20+ fi
21+ ],[ac_detect_dev_dsp=no])
22+
23 # Check for expert mode
24 if test "$ac_enable_expert_mode" = yes; then
25 BEE_EXPERT_MODE
26@@ -464,7 +474,7 @@ linux*)
27 ac_cv_have_dev_dsp=no
28 fi
29 ])
30- if test "$ac_cv_have_dev_dsp" = yes; then
31+ if test "$ac_cv_have_dev_dsp" = yes && test "$ac_detect_dev_dsp" = yes; then
32 AC_DEFINE([HAVE_DEV_DSP], 1)
33 fi
34 ;;
diff --git a/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
new file mode 100644
index 0000000000..3e5513fce9
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
@@ -0,0 +1,37 @@
1beecrypt: enable ptest support
2
3Upstream-Status: Inappropriate [embedded specific]
4
5Add install-ptest rules.
6
7Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
8---
9 Makefile.am | 3 +++
10 tests/Makefile.am | 3 +++
11 2 files changed, 6 insertions(+)
12
13diff --git a/Makefile.am b/Makefile.am
14index b7e7869..5076f59 100644
15--- a/Makefile.am
16+++ b/Makefile.am
17@@ -73,3 +73,6 @@ DISTCLEANFILES = mpopt.s blowfishopt.s sha1opt.s
18
19 bench:
20 (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench)
21+
22+install-ptest:
23+ (cd tests && $(MAKE) $(AM_MAKEFLAGS) check_PROGRAMS)
24diff --git a/tests/Makefile.am b/tests/Makefile.am
25index 1604e5e..d8db8d8 100644
26--- a/tests/Makefile.am
27+++ b/tests/Makefile.am
28@@ -101,3 +101,6 @@ bench: benchme benchrsa benchhf benchbc
29 ./benchbc AES 128
30 ./benchbc Blowfish 128
31 ./benchbc Blowfish 128
32+
33+check_PROGRAMS:
34+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
35--
361.8.1.2
37
diff --git a/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch b/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
new file mode 100644
index 0000000000..91b1fa6ef5
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
@@ -0,0 +1,43 @@
1We are unable to run code at configure time in a cross environemnt, but as we
2control the build we can be fairly certain this dependency is met.
3
4Upstream-Status: Inappropriate [embedded specific]
5
6JL 05/07/10
7Index: beecrypt-4.2.1/configure.ac
8===================================================================
9--- beecrypt-4.2.1.orig/configure.ac 2010-11-26 17:12:25.000000000 +0800
10+++ beecrypt-4.2.1/configure.ac 2010-11-26 17:12:30.000000000 +0800
11@@ -292,32 +292,6 @@
12 # Predefines and checks for C++ API support
13 AH_TEMPLATE([CPPGLUE],[Define to 1 if you want to include the C++ code])
14
15-if test "$ac_with_cplusplus" = yes; then
16- AC_MSG_CHECKING([for IBM's ICU library version >= 2.8])
17- AC_LANG_PUSH(C)
18- AC_RUN_IFELSE([
19- AC_LANG_PROGRAM([[#include <unicode/uversion.h>]],[[
20- #if U_ICU_VERSION_MAJOR_NUM < 2
21- exit(1);
22- #elif U_ICU_VERSION_MAJOR_NUM == 2
23- # if U_ICU_VERSION_MINOR_NUM < 8
24- exit(1);
25- # else
26- exit(0);
27- # endif
28- #else
29- exit(0);
30- #endif
31- ]])],[
32- AC_MSG_RESULT([yes])
33- ],[
34- AC_MSG_RESULT([no])
35- AC_MSG_WARN([disabling cplusplus])
36- ac_with_cplusplus=no
37- ])
38- AC_LANG_POP(C)
39-fi
40-
41 AM_CONDITIONAL([WITH_CPLUSPLUS],[test "$ac_with_cplusplus" = yes])
42
43 if test "$ac_with_cplusplus" = yes ; then
diff --git a/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch b/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
new file mode 100644
index 0000000000..8144e39be0
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
@@ -0,0 +1,39 @@
1
2gcc-4.7 seems to be stricter about some things, so follow
3the suggestion from the error/note information.
4
5 ../../x86_64-linux-libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..
6 x86_64-linux-libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -isyst
7 In file included from ../../include/beecrypt/c++/util/Hashtable.h:42:0,
8 from ../../include/beecrypt/c++/util/Properties.h:36,
9 from Properties.cxx:25:
10 ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
11 Properties.cxx:228:1: required from here
12 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
13 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
14 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
15 ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
16 Properties.cxx:228:1: required from here
17 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
18 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
19 ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
20
21
22Upstream-Status: Pending
23
24Signed-off-by: Saul Wold <sgw@linux.intel.com>
25
26
27Index: beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
28===================================================================
29--- beecrypt-4.2.1.orig/include/beecrypt/c++/util/AbstractSet.h
30+++ beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
31@@ -56,7 +56,7 @@ namespace beecrypt {
32 if (c->size() != size())
33 return false;
34
35- return containsAll(*c);
36+ return this->containsAll(*c);
37 }
38 return false;
39 }
diff --git a/meta/recipes-support/beecrypt/beecrypt/fix-security.patch b/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
new file mode 100644
index 0000000000..6cb0c00205
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
@@ -0,0 +1,47 @@
1Fix visibility of various C++ functions, inspired by a similar patch in the Fink
2project:
3http://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg75742.html
4
5JL 05/07/10
6
7Upstream-Status: Pending
8
9Index: beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h
10===================================================================
11--- beecrypt-4.2.1.orig/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:22:57.000000000 +0800
12+++ beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:23:01.000000000 +0800
13@@ -147,13 +147,13 @@
14 mutable bytearray* enc;
15
16 BeeCertificate();
17- BeeCertificate(InputStream& in) throw (IOException);
18
19 void encodeTBS(DataOutputStream& out) const throw (IOException);
20
21 bytearray* encodeTBS() const throw (CertificateEncodingException);
22
23 public:
24+ BeeCertificate(InputStream& in) throw (IOException);
25 BeeCertificate(const BeeCertificate&) throw (CloneNotSupportedException);
26 virtual ~BeeCertificate();
27
28Index: beecrypt-4.2.1/include/beecrypt/c++/security/Security.h
29===================================================================
30--- beecrypt-4.2.1.orig/include/beecrypt/c++/security/Security.h 2010-11-26 17:20:55.000000000 +0800
31+++ beecrypt-4.2.1/include/beecrypt/c++/security/Security.h 2010-11-26 17:21:36.000000000 +0800
32@@ -61,7 +61,6 @@
33 friend class SecureRandom;
34 friend class Signature;
35
36- private:
37 struct spi
38 {
39 Object* cspi;
40@@ -76,6 +75,7 @@
41 static spi* getSpi(const String& algo, const String& type, const Provider&) throw (NoSuchAlgorithmException);
42 static spi* getFirstSpi(const String& type);
43
44+ private:
45 static const String& getKeyStoreDefault();
46
47 static bool _init;
diff --git a/meta/recipes-support/beecrypt/beecrypt/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest
new file mode 100644
index 0000000000..2ee294d991
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3cd tests
4for i in `ls`; do ./$i; if [ $? -eq 0 ]; then echo "PASS: $i"; \
5 else echo "FAIL: $i"; fi; done
diff --git a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
new file mode 100644
index 0000000000..1e626f154c
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
@@ -0,0 +1,48 @@
1# Beecrypt OE build file
2# Copyright (C) 2004-2005, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5SUMMARY = "A general-purpose cryptography library"
6HOMEPAGE = "http://sourceforge.net/projects/beecrypt"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
9 file://disable-icu-check.patch \
10 file://fix-security.patch \
11 file://fix-for-gcc-4.7.patch \
12 file://run-ptest \
13 file://beecrypt-enable-ptest-support.patch \
14 file://add-option-dev-dsp.patch \
15 "
16
17SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
18SRC_URI[sha256sum] = "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d"
19
20LICENSE = "GPLv2 & LGPLv2.1"
21LIC_FILES_CHKSUM = "file://COPYING;md5=9894370afd5dfe7d02b8d14319e729a1 \
22 file://COPYING.LIB;md5=dcf3c825659e82539645da41a7908589 \
23 file://include/beecrypt/beecrypt.h;endline=20;md5=47a93eef539aac237eef86297a4d71c1"
24
25PR = "r3"
26
27inherit autotools multilib_header ptest
28acpaths=""
29
30do_install_append() {
31 oe_multilib_header beecrypt/gnu.h
32}
33
34EXTRA_OECONF = "--without-python --enable-shared --enable-static --disable-openmp --with-java=no"
35
36PACKAGECONFIG ??= ""
37PACKAGECONFIG[cplusplus] = "--with-cplusplus,--without-cplusplus,icu"
38
39FILES_${PN} = "${sysconfdir} ${libdir}/*.so.* ${libdir}/${BPN}/*.so.*"
40FILES_${PN}-dev += "${libdir}/${BPN}/*.so ${libdir}/${BPN}/*.la"
41FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
42
43BBCLASSEXTEND = "native nativesdk"
44
45do_install_ptest () {
46 mkdir ${D}${PTEST_PATH}/tests
47 cp -r ${B}/tests/.libs/test* ${D}${PTEST_PATH}/tests
48}
diff --git a/meta/recipes-support/boost/bjam-native_1.56.0.bb b/meta/recipes-support/boost/bjam-native_1.56.0.bb
new file mode 100644
index 0000000000..d85d1a96cb
--- /dev/null
+++ b/meta/recipes-support/boost/bjam-native_1.56.0.bb
@@ -0,0 +1,15 @@
1include boost-${PV}.inc
2
3SUMMARY = "Portable Boost.Jam build tool for boost"
4SECTION = "devel"
5
6inherit native
7
8do_compile() {
9 ./bootstrap.sh --with-toolset=gcc
10}
11
12do_install() {
13 install -d ${D}${bindir}/
14 install -c -m 755 bjam ${D}${bindir}/
15}
diff --git a/meta/recipes-support/boost/boost-1.56.0.inc b/meta/recipes-support/boost/boost-1.56.0.inc
new file mode 100644
index 0000000000..24c32b4c6f
--- /dev/null
+++ b/meta/recipes-support/boost/boost-1.56.0.inc
@@ -0,0 +1,19 @@
1# The Boost web site provides free peer-reviewed portable
2# C++ source libraries. The emphasis is on libraries which
3# work well with the C++ Standard Library. The libraries are
4# intended to be widely useful, and are in regular use by
5# thousands of programmers across a broad spectrum of applications.
6HOMEPAGE = "http://www.boost.org/"
7LICENSE = "BSL-1.0 & MIT & Python-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
9
10BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}"
11BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
12BOOST_P = "boost_${BOOST_VER}"
13
14SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
15
16SRC_URI[md5sum] = "a744cf167b05d72335f27c88115f211d"
17SRC_URI[sha256sum] = "134732acaf3a6e7eba85988118d943f0fa6b7f0850f65131fff89823ad30ff1d"
18
19S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
new file mode 100644
index 0000000000..069b1c8eab
--- /dev/null
+++ b/meta/recipes-support/boost/boost.inc
@@ -0,0 +1,182 @@
1SUMMARY = "Free peer-reviewed portable C++ source libraries"
2SECTION = "libs"
3DEPENDS = "bjam-native zlib bzip2"
4
5ARM_INSTRUCTION_SET = "arm"
6
7BOOST_LIBS = "\
8 date_time \
9 filesystem \
10 graph \
11 iostreams \
12 program_options \
13 regex \
14 serialization \
15 signals \
16 system \
17 test \
18 thread \
19 "
20
21# optional boost-python library
22PACKAGECONFIG ??= ""
23PACKAGECONFIG[python] = ",,python"
24BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}"
25inherit python-dir
26PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
27
28# Make a package for each library, plus -dev
29PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
30python __anonymous () {
31 packages = []
32 extras = []
33 for lib in d.getVar('BOOST_LIBS', True).split( ):
34 pkg = "boost-%s" % lib.replace("_", "-")
35 extras.append("--with-%s" % lib)
36 packages.append(pkg)
37 if not d.getVar("FILES_%s" % pkg, True):
38 d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
39 d.setVar("BOOST_PACKAGES", " ".join(packages))
40 d.setVar("BJAM_EXTRA", " ".join(extras))
41}
42
43# Override the contents of specific packages
44FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
45 ${libdir}/libboost_wserialization*.so.*"
46FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
47 ${libdir}/libboost_unit_test_framework*.so.*"
48
49# -dev last to pick up the remaining stuff
50PACKAGES += "${PN}-dev ${PN}-staticdev"
51FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so"
52FILES_${PN}-staticdev = "${libdir}/libboost_*.a"
53
54# "boost" is a metapackage which pulls in all boost librabries
55PACKAGES += "${PN}"
56RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
57RRECOMMENDS_${PN}_class-native = ""
58ALLOW_EMPTY_${PN} = "1"
59
60# to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
61TARGET_CC_ARCH += " ${LDFLAGS}"
62
63# Oh yippee, a new build system, it's sooo cooool I could eat my own
64# foot. inlining=on lets the compiler choose, I think. At least this
65# stuff is documented...
66# NOTE: if you leave <debug-symbols>on then in a debug build the build sys
67# objcopy will be invoked, and that won't work. Building debug apparently
68# requires hacking gcc-tools.jam
69#
70# Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
71# Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
72# standing there, waiting, but the truely terrifying thing is what they carry
73# in their hands. At first sight each seems to bear the same thing, but it is
74# not so for the forms in their grasp are ever so slightly different one from
75# the other. Each is twisted in some grotesque way from the other to make each
76# an unspeakable perversion impossible to perceive without the onset of madness.
77# True insanity awaits anyone who perceives all of these horrors together.
78#
79# Quotation marks, there might be an easier way to do this, but I can't find
80# it. The problem is that the user.hpp configuration file must receive a
81# pre-processor macro defined as the appropriate string - complete with "'s
82# around it. (<> is a possibility here but the danger to that is that the
83# failure case interprets the < and > as shell redirections, creating
84# random files in the source tree.)
85#
86#bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
87#do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
88SQD = '"'
89EQD = '\"'
90#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
91BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
92
93BJAM_TOOLS = "--ignore-site-config \
94 '-sTOOLS=gcc' \
95 '-sGCC=${CC} '${BJAM_CONF} \
96 '-sGXX=${CXX} '${BJAM_CONF} \
97 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
98 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
99 '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \
100 '-sPYTHON_VERSION=${PYTHON_BASEVERSION}' \
101 '-sPYTHON_ROOT=${PYTHON_ROOT}' \
102 '--layout=system' \
103 "
104
105# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater paralelism causes bjam to segfault or to ignore -j
106# https://svn.boost.org/trac/boost/ticket/7634
107def get_boost_parallel_make(bb, d):
108 pm = d.getVar('PARALLEL_MAKE', True)
109 if pm:
110 # look for '-j' and throw other options (e.g. '-l') away
111 # because they might have different meaning in bjam
112 pm = pm.split()
113 while pm:
114 v = None
115 opt = pm.pop(0)
116 if opt == '-j':
117 v = pm.pop(0)
118 elif opt.startswith('-j'):
119 v = opt[2:].strip()
120 else:
121 v = None
122
123 if v:
124 v = min(64, int(v))
125 return '-j' + str(v)
126
127 return ""
128
129BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
130BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
131 ${BJAM_TOOLS} \
132 -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
133 --builddir=${S}/${TARGET_SYS} \
134 --disable-icu \
135 ${BJAM_EXTRA}'
136
137# Native compilation of bzip2 isn't working
138BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
139
140do_boostconfig() {
141 cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
142
143 # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
144 if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/example/user-config.jam
145 then
146 echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
147 fi
148
149 echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
150
151 CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
152 sed -i '/^using python/d' project-config.jam
153}
154
155addtask do_boostconfig after do_patch before do_configure
156
157do_compile() {
158 set -ex
159 bjam ${BJAM_OPTS} --prefix=${prefix} \
160 --exec-prefix=${exec_prefix} \
161 --libdir=${libdir} \
162 --includedir=${includedir}
163}
164
165do_install() {
166 set -ex
167 bjam ${BJAM_OPTS} \
168 --libdir=${D}${libdir} \
169 --includedir=${D}${includedir} \
170 install
171 for lib in ${BOOST_LIBS}; do
172 if [ -e ${D}${libdir}/libboost_${lib}.a ]; then
173 ln -s libboost_${lib}.a ${D}${libdir}/libboost_${lib}-mt.a
174 fi
175 if [ -e ${D}${libdir}/libboost_${lib}.so ]; then
176 ln -s libboost_${lib}.so ${D}${libdir}/libboost_${lib}-mt.so
177 fi
178 done
179
180}
181
182BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch b/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch
new file mode 100644
index 0000000000..feece81532
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch
@@ -0,0 +1,412 @@
1From 415db7054723291042e4ff1ffa8fdd5bc8b07163 Mon Sep 17 00:00:00 2001
2From: Andrey Semashev <andrey.semashev@gmail.com>
3Date: Sat, 27 Sep 2014 20:40:09 +0400
4Subject: [PATCH] Added support for extending operations to GCC atomic backend.
5
6Fix for #10446. Some platforms (e.g. Raspberry Pi) only support atomic ops of some particular size but not less. Use extending arithmetic operations for these platforms. Also, make sure bools are always treated as 8-bit values, even if the actual type is larger. This makes its use in atomic<>, atomic_flag and lock pool more consistent.
7
8Upstream-Status: Backport [https://svn.boost.org/trac/boost/ticket/10446]
9Signed-off-by: Peter A. Bigot <pab@pabigot.com>
10
11---
12 include/boost/atomic/capabilities.hpp | 1 +
13 include/boost/atomic/detail/atomic_template.hpp | 2 +-
14 include/boost/atomic/detail/caps_gcc_atomic.hpp | 82 +++++------
15 include/boost/atomic/detail/ops_gcc_atomic.hpp | 184 +++++++++++++++++++++---
16 4 files changed, 206 insertions(+), 63 deletions(-)
17
18diff --git a/include/boost/atomic/capabilities.hpp b/include/boost/atomic/capabilities.hpp
19index 658dd22..05bbb0f 100644
20--- a/include/boost/atomic/capabilities.hpp
21+++ b/include/boost/atomic/capabilities.hpp
22@@ -142,6 +142,7 @@
23 #define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE
24
25 #ifndef BOOST_ATOMIC_BOOL_LOCK_FREE
26+// We store bools in 1-byte storage in all backends
27 #define BOOST_ATOMIC_BOOL_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
28 #endif
29
30diff --git a/include/boost/atomic/detail/atomic_template.hpp b/include/boost/atomic/detail/atomic_template.hpp
31index 4fd6d79..bc3922a 100644
32--- a/include/boost/atomic/detail/atomic_template.hpp
33+++ b/include/boost/atomic/detail/atomic_template.hpp
34@@ -234,7 +234,7 @@ class base_atomic< bool, int >
35 {
36 private:
37 typedef bool value_type;
38- typedef atomics::detail::operations< storage_size_of< value_type >::value, false > operations;
39+ typedef atomics::detail::operations< 1u, false > operations;
40
41 protected:
42 typedef value_type value_arg_type;
43diff --git a/include/boost/atomic/detail/caps_gcc_atomic.hpp b/include/boost/atomic/detail/caps_gcc_atomic.hpp
44index 8299ad0..f4e7a70 100644
45--- a/include/boost/atomic/detail/caps_gcc_atomic.hpp
46+++ b/include/boost/atomic/detail/caps_gcc_atomic.hpp
47@@ -29,66 +29,48 @@
48 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
49 #endif
50
51-#if __GCC_ATOMIC_BOOL_LOCK_FREE == 2
52-#define BOOST_ATOMIC_FLAG_LOCK_FREE 2
53-#else
54-#define BOOST_ATOMIC_FLAG_LOCK_FREE 0
55-#endif
56-#if __GCC_ATOMIC_CHAR_LOCK_FREE == 2
57-#define BOOST_ATOMIC_CHAR_LOCK_FREE 2
58-#else
59-#define BOOST_ATOMIC_CHAR_LOCK_FREE 0
60-#endif
61-#if __GCC_ATOMIC_CHAR16_T_LOCK_FREE == 2
62-#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2
63-#else
64-#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 0
65-#endif
66-#if __GCC_ATOMIC_CHAR32_T_LOCK_FREE == 2
67-#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2
68+#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT))
69+#define BOOST_ATOMIC_INT128_LOCK_FREE 2
70 #else
71-#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 0
72+#define BOOST_ATOMIC_INT128_LOCK_FREE 0
73 #endif
74-#if __GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2
75-#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2
76+
77+#if __GCC_ATOMIC_LLONG_LOCK_FREE == 2
78+#define BOOST_ATOMIC_LLONG_LOCK_FREE 2
79 #else
80-#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0
81+#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT128_LOCK_FREE
82 #endif
83-#if __GCC_ATOMIC_SHORT_LOCK_FREE == 2
84-#define BOOST_ATOMIC_SHORT_LOCK_FREE 2
85+
86+#if __GCC_ATOMIC_LONG_LOCK_FREE == 2
87+#define BOOST_ATOMIC_LONG_LOCK_FREE 2
88 #else
89-#define BOOST_ATOMIC_SHORT_LOCK_FREE 0
90+#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE
91 #endif
92+
93 #if __GCC_ATOMIC_INT_LOCK_FREE == 2
94 #define BOOST_ATOMIC_INT_LOCK_FREE 2
95 #else
96-#define BOOST_ATOMIC_INT_LOCK_FREE 0
97-#endif
98-#if __GCC_ATOMIC_LONG_LOCK_FREE == 2
99-#define BOOST_ATOMIC_LONG_LOCK_FREE 2
100-#else
101-#define BOOST_ATOMIC_LONG_LOCK_FREE 0
102+#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE
103 #endif
104-#if __GCC_ATOMIC_LLONG_LOCK_FREE == 2
105-#define BOOST_ATOMIC_LLONG_LOCK_FREE 2
106+
107+#if __GCC_ATOMIC_SHORT_LOCK_FREE == 2
108+#define BOOST_ATOMIC_SHORT_LOCK_FREE 2
109 #else
110-#define BOOST_ATOMIC_LLONG_LOCK_FREE 0
111+#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE
112 #endif
113-#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT))
114-#define BOOST_ATOMIC_INT128_LOCK_FREE 2
115+
116+#if __GCC_ATOMIC_CHAR_LOCK_FREE == 2
117+#define BOOST_ATOMIC_CHAR_LOCK_FREE 2
118 #else
119-#define BOOST_ATOMIC_INT128_LOCK_FREE 0
120+#define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE
121 #endif
122+
123 #if __GCC_ATOMIC_POINTER_LOCK_FREE == 2
124 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
125 #else
126 #define BOOST_ATOMIC_POINTER_LOCK_FREE 0
127 #endif
128-#if __GCC_ATOMIC_BOOL_LOCK_FREE == 2
129-#define BOOST_ATOMIC_BOOL_LOCK_FREE 2
130-#else
131-#define BOOST_ATOMIC_BOOL_LOCK_FREE 0
132-#endif
133+
134
135 #define BOOST_ATOMIC_INT8_LOCK_FREE BOOST_ATOMIC_CHAR_LOCK_FREE
136
137@@ -128,6 +110,24 @@
138 #define BOOST_ATOMIC_INT64_LOCK_FREE 0
139 #endif
140
141+
142+#if __GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2
143+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2
144+#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8
145+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
146+#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4
147+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
148+#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2
149+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
150+#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1
151+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
152+#else
153+#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0
154+#endif
155+
156+#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
157+#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
158+
159 #define BOOST_ATOMIC_THREAD_FENCE 2
160 #define BOOST_ATOMIC_SIGNAL_FENCE 2
161
162diff --git a/include/boost/atomic/detail/ops_gcc_atomic.hpp b/include/boost/atomic/detail/ops_gcc_atomic.hpp
163index 2297791..2e4c37b 100644
164--- a/include/boost/atomic/detail/ops_gcc_atomic.hpp
165+++ b/include/boost/atomic/detail/ops_gcc_atomic.hpp
166@@ -24,6 +24,15 @@
167 #include <boost/atomic/detail/ops_cas_based.hpp>
168 #endif
169
170+#if __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE || __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE ||\
171+ __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE || __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE ||\
172+ __GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE || __GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE ||\
173+ __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE
174+// There are platforms where we need to use larger storage types
175+#include <boost/atomic/detail/int_sizes.hpp>
176+#include <boost/atomic/detail/ops_extending_cas_based.hpp>
177+#endif
178+
179 #ifdef BOOST_HAS_PRAGMA_ONCE
180 #pragma once
181 #endif
182@@ -154,73 +163,206 @@ struct gcc_atomic_operations
183 }
184 };
185
186-#if BOOST_ATOMIC_INT8_LOCK_FREE > 0
187+#if BOOST_ATOMIC_INT128_LOCK_FREE > 0
188+#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
189+
190+// Workaround for clang bug: http://llvm.org/bugs/show_bug.cgi?id=19149
191+// Clang 3.4 does not implement 128-bit __atomic* intrinsics even though it defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
192 template< bool Signed >
193-struct operations< 1u, Signed > :
194- public gcc_atomic_operations< typename make_storage_type< 1u, Signed >::type >
195+struct operations< 16u, Signed > :
196+ public cas_based_operations< gcc_dcas_x86_64< Signed > >
197 {
198 };
199+
200+#else
201+
202+template< bool Signed >
203+struct operations< 16u, Signed > :
204+ public gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >
205+{
206+};
207+
208+#endif
209 #endif
210
211-#if BOOST_ATOMIC_INT16_LOCK_FREE > 0
212+
213+#if BOOST_ATOMIC_INT64_LOCK_FREE > 0
214+#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B)
215+
216+// Workaround for clang bug http://llvm.org/bugs/show_bug.cgi?id=19355
217 template< bool Signed >
218-struct operations< 2u, Signed > :
219- public gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type >
220+struct operations< 8u, Signed > :
221+ public cas_based_operations< gcc_dcas_x86< Signed > >
222+{
223+};
224+
225+#elif (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\
226+ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\
227+ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\
228+ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\
229+ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE)
230+
231+#define BOOST_ATOMIC_DETAIL_INT64_EXTENDED
232+
233+template< bool Signed >
234+struct operations< 8u, Signed > :
235+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 8u, Signed >
236 {
237 };
238+
239+#else
240+
241+template< bool Signed >
242+struct operations< 8u, Signed > :
243+ public gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >
244+{
245+};
246+
247+#endif
248 #endif
249
250 #if BOOST_ATOMIC_INT32_LOCK_FREE > 0
251+#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\
252+ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\
253+ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\
254+ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\
255+ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE)
256+
257+#define BOOST_ATOMIC_DETAIL_INT32_EXTENDED
258+
259+#if !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED)
260+
261+template< bool Signed >
262+struct operations< 4u, Signed > :
263+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 4u, Signed >
264+{
265+};
266+
267+#else // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED)
268+
269+template< bool Signed >
270+struct operations< 4u, Signed > :
271+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 4u, Signed >
272+{
273+};
274+
275+#endif // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED)
276+
277+#else
278+
279 template< bool Signed >
280 struct operations< 4u, Signed > :
281 public gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >
282 {
283 };
284+
285+#endif
286 #endif
287
288-#if BOOST_ATOMIC_INT64_LOCK_FREE > 0
289-#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B)
290+#if BOOST_ATOMIC_INT16_LOCK_FREE > 0
291+#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\
292+ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\
293+ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\
294+ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\
295+ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE)
296+
297+#define BOOST_ATOMIC_DETAIL_INT16_EXTENDED
298+
299+#if !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED)
300
301-// Workaround for clang bug http://llvm.org/bugs/show_bug.cgi?id=19355
302 template< bool Signed >
303-struct operations< 8u, Signed > :
304- public cas_based_operations< gcc_dcas_x86< Signed > >
305+struct operations< 2u, Signed > :
306+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 2u, Signed >
307+{
308+};
309+
310+#elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED)
311+
312+template< bool Signed >
313+struct operations< 2u, Signed > :
314+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 2u, Signed >
315 {
316 };
317
318 #else
319
320 template< bool Signed >
321-struct operations< 8u, Signed > :
322- public gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >
323+struct operations< 2u, Signed > :
324+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 2u, Signed >
325+{
326+};
327+
328+#endif
329+
330+#else
331+
332+template< bool Signed >
333+struct operations< 2u, Signed > :
334+ public gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type >
335 {
336 };
337
338 #endif
339 #endif
340
341-#if BOOST_ATOMIC_INT128_LOCK_FREE > 0
342-#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
343+#if BOOST_ATOMIC_INT8_LOCK_FREE > 0
344+#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\
345+ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\
346+ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\
347+ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\
348+ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ||\
349+ (__GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE) ||\
350+ (__GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE)
351+
352+#if !defined(BOOST_ATOMIC_DETAIL_INT16_EXTENDED)
353
354-// Workaround for clang bug: http://llvm.org/bugs/show_bug.cgi?id=19149
355-// Clang 3.4 does not implement 128-bit __atomic* intrinsics even though it defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
356 template< bool Signed >
357-struct operations< 16u, Signed > :
358- public cas_based_operations< gcc_dcas_x86_64< Signed > >
359+struct operations< 1u, Signed > :
360+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type >, 1u, Signed >
361+{
362+};
363+
364+#elif !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED)
365+
366+template< bool Signed >
367+struct operations< 1u, Signed > :
368+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 1u, Signed >
369+{
370+};
371+
372+#elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED)
373+
374+template< bool Signed >
375+struct operations< 1u, Signed > :
376+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 1u, Signed >
377 {
378 };
379
380 #else
381
382 template< bool Signed >
383-struct operations< 16u, Signed > :
384- public gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >
385+struct operations< 1u, Signed > :
386+ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 1u, Signed >
387+{
388+};
389+
390+#endif
391+
392+#else
393+
394+template< bool Signed >
395+struct operations< 1u, Signed > :
396+ public gcc_atomic_operations< typename make_storage_type< 1u, Signed >::type >
397 {
398 };
399
400 #endif
401 #endif
402
403+#undef BOOST_ATOMIC_DETAIL_INT16_EXTENDED
404+#undef BOOST_ATOMIC_DETAIL_INT32_EXTENDED
405+#undef BOOST_ATOMIC_DETAIL_INT64_EXTENDED
406+
407 BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
408 {
409 __atomic_thread_fence(atomics::detail::convert_memory_order_to_gcc(order));
410--
4111.8.5.5
412
diff --git a/meta/recipes-support/boost/boost/arm-intrinsics.patch b/meta/recipes-support/boost/boost/arm-intrinsics.patch
new file mode 100644
index 0000000000..fe85c69a82
--- /dev/null
+++ b/meta/recipes-support/boost/boost/arm-intrinsics.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Backport
2
38/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com>
4
5diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp
6index b6359b5..78b1cc2 100644
7--- a/boost/smart_ptr/detail/atomic_count_sync.hpp
8+++ b/boost/smart_ptr/detail/atomic_count_sync.hpp
9@@ -33,17 +33,46 @@ public:
10
11 long operator++()
12 {
13+#ifdef __ARM_ARCH_7A__
14+ int v1, tmp;
15+ asm volatile ("1: \n\t"
16+ "ldrex %0, %1 \n\t"
17+ "add %0 ,%0, #1 \n\t"
18+ "strex %2, %0, %1 \n\t"
19+ "cmp %2, #0 \n\t"
20+ "bne 1b \n\t"
21+ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
22+ );
23+#else
24 return __sync_add_and_fetch( &value_, 1 );
25+#endif
26 }
27
28 long operator--()
29 {
30+#ifdef __ARM_ARCH_7A__
31+ int v1, tmp;
32+ asm volatile ("1: \n\t"
33+ "ldrex %0, %1 \n\t"
34+ "sub %0 ,%0, #1 \n\t"
35+ "strex %2, %0, %1 \n\t"
36+ "cmp %2, #0 \n\t"
37+ "bne 1b \n\t"
38+ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
39+ );
40+ return value_;
41+#else
42 return __sync_add_and_fetch( &value_, -1 );
43+#endif
44 }
45
46 operator long() const
47 {
48+#if __ARM_ARCH_7A__
49+ return value_;
50+#else
51 return __sync_fetch_and_add( &value_, 0 );
52+#endif
53 }
54
55 private:
diff --git a/meta/recipes-support/boost/boost_1.56.0.bb b/meta/recipes-support/boost/boost_1.56.0.bb
new file mode 100644
index 0000000000..dcc77bb87e
--- /dev/null
+++ b/meta/recipes-support/boost/boost_1.56.0.bb
@@ -0,0 +1,7 @@
1include boost-${PV}.inc
2include boost.inc
3
4SRC_URI += "\
5 file://arm-intrinsics.patch \
6 file://0001-Added-support-for-extending-operations-to-GCC-atomic.patch;striplevel=2 \
7"
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch
new file mode 100644
index 0000000000..19fa6bf654
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch
@@ -0,0 +1,227 @@
1From 9d9b795cf1066eb62db3cb5bb5cf56bdf7159b98 Mon Sep 17 00:00:00 2001
2From: Michael Shuler <michael@pbandjelly.org>
3Date: Sat, 12 Apr 2014 07:56:56 -0500
4Subject: [PATCH] Update mozilla/certdata.txt to version 1.98
5
6This update only removes an untrusted cert for "Bogus kuix.de", which was
7used for testing by mozilla.
8
9Upstream-Status: Backport
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11
12---
13 mozilla/certdata.txt | 182 ---------------------------------------------------
14 mozilla/nssckbi.h | 4 +-
15 2 files changed, 2 insertions(+), 184 deletions(-)
16
17diff --git a/mozilla/certdata.txt b/mozilla/certdata.txt
18index ae9cbc7..ca4c66b 100644
19--- a/mozilla/certdata.txt
20+++ b/mozilla/certdata.txt
21@@ -21686,188 +21686,6 @@ CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
22 CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
23
24 #
25-# Certificate "Bogus kuix.de"
26-#
27-# Issuer: CN=UTN-USERFirst-Hardware,OU=http://www.usertrust.com,O=The USERTRUST Network,L=Salt Lake City,ST=UT,C=US
28-# Serial Number:72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0
29-# Subject: CN=kuix.de,OU=Comodo Trial SSL,OU=TEST USE ONLY - NO WARRANTY ATTACHED,OU=For Testing Purposes Only,O=Kai Engert,STREET=Test Street,L=Test City,ST=Test State,postalCode=12345,C=DE
30-# Not Valid Before: Thu Mar 17 00:00:00 2011
31-# Not Valid After : Sat Apr 16 23:59:59 2011
32-# Fingerprint (MD5): F7:5F:98:BC:D8:64:0C:16:E5:AE:EE:AA:00:F6:1F:07
33-# Fingerprint (SHA1): 82:61:4B:EC:97:48:15:DE:CC:9A:CC:6E:84:21:71:79:B2:64:20:40
34-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
35-CKA_TOKEN CK_BBOOL CK_TRUE
36-CKA_PRIVATE CK_BBOOL CK_FALSE
37-CKA_MODIFIABLE CK_BBOOL CK_FALSE
38-CKA_LABEL UTF8 "Bogus kuix.de"
39-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
40-CKA_SUBJECT MULTILINE_OCTAL
41-\060\201\361\061\013\060\011\006\003\125\004\006\023\002\104\105
42-\061\016\060\014\006\003\125\004\021\023\005\061\062\063\064\065
43-\061\023\060\021\006\003\125\004\010\023\012\124\145\163\164\040
44-\123\164\141\164\145\061\022\060\020\006\003\125\004\007\023\011
45-\124\145\163\164\040\103\151\164\171\061\024\060\022\006\003\125
46-\004\011\023\013\124\145\163\164\040\123\164\162\145\145\164\061
47-\023\060\021\006\003\125\004\012\023\012\113\141\151\040\105\156
48-\147\145\162\164\061\042\060\040\006\003\125\004\013\023\031\106
49-\157\162\040\124\145\163\164\151\156\147\040\120\165\162\160\157
50-\163\145\163\040\117\156\154\171\061\055\060\053\006\003\125\004
51-\013\023\044\124\105\123\124\040\125\123\105\040\117\116\114\131
52-\040\055\040\116\117\040\127\101\122\122\101\116\124\131\040\101
53-\124\124\101\103\110\105\104\061\031\060\027\006\003\125\004\013
54-\023\020\103\157\155\157\144\157\040\124\162\151\141\154\040\123
55-\123\114\061\020\060\016\006\003\125\004\003\023\007\153\165\151
56-\170\056\144\145
57-END
58-CKA_ID UTF8 "0"
59-CKA_ISSUER MULTILINE_OCTAL
60-\060\201\227\061\013\060\011\006\003\125\004\006\023\002\125\123
61-\061\013\060\011\006\003\125\004\010\023\002\125\124\061\027\060
62-\025\006\003\125\004\007\023\016\123\141\154\164\040\114\141\153
63-\145\040\103\151\164\171\061\036\060\034\006\003\125\004\012\023
64-\025\124\150\145\040\125\123\105\122\124\122\125\123\124\040\116
65-\145\164\167\157\162\153\061\041\060\037\006\003\125\004\013\023
66-\030\150\164\164\160\072\057\057\167\167\167\056\165\163\145\162
67-\164\162\165\163\164\056\143\157\155\061\037\060\035\006\003\125
68-\004\003\023\026\125\124\116\055\125\123\105\122\106\151\162\163
69-\164\055\110\141\162\144\167\141\162\145
70-END
71-CKA_SERIAL_NUMBER MULTILINE_OCTAL
72-\002\020\162\003\041\005\305\014\010\127\075\216\245\060\116\376
73-\350\260
74-END
75-CKA_VALUE MULTILINE_OCTAL
76-\060\202\005\154\060\202\004\124\240\003\002\001\002\002\020\162
77-\003\041\005\305\014\010\127\075\216\245\060\116\376\350\260\060
78-\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\201
79-\227\061\013\060\011\006\003\125\004\006\023\002\125\123\061\013
80-\060\011\006\003\125\004\010\023\002\125\124\061\027\060\025\006
81-\003\125\004\007\023\016\123\141\154\164\040\114\141\153\145\040
82-\103\151\164\171\061\036\060\034\006\003\125\004\012\023\025\124
83-\150\145\040\125\123\105\122\124\122\125\123\124\040\116\145\164
84-\167\157\162\153\061\041\060\037\006\003\125\004\013\023\030\150
85-\164\164\160\072\057\057\167\167\167\056\165\163\145\162\164\162
86-\165\163\164\056\143\157\155\061\037\060\035\006\003\125\004\003
87-\023\026\125\124\116\055\125\123\105\122\106\151\162\163\164\055
88-\110\141\162\144\167\141\162\145\060\036\027\015\061\061\060\063
89-\061\067\060\060\060\060\060\060\132\027\015\061\061\060\064\061
90-\066\062\063\065\071\065\071\132\060\201\361\061\013\060\011\006
91-\003\125\004\006\023\002\104\105\061\016\060\014\006\003\125\004
92-\021\023\005\061\062\063\064\065\061\023\060\021\006\003\125\004
93-\010\023\012\124\145\163\164\040\123\164\141\164\145\061\022\060
94-\020\006\003\125\004\007\023\011\124\145\163\164\040\103\151\164
95-\171\061\024\060\022\006\003\125\004\011\023\013\124\145\163\164
96-\040\123\164\162\145\145\164\061\023\060\021\006\003\125\004\012
97-\023\012\113\141\151\040\105\156\147\145\162\164\061\042\060\040
98-\006\003\125\004\013\023\031\106\157\162\040\124\145\163\164\151
99-\156\147\040\120\165\162\160\157\163\145\163\040\117\156\154\171
100-\061\055\060\053\006\003\125\004\013\023\044\124\105\123\124\040
101-\125\123\105\040\117\116\114\131\040\055\040\116\117\040\127\101
102-\122\122\101\116\124\131\040\101\124\124\101\103\110\105\104\061
103-\031\060\027\006\003\125\004\013\023\020\103\157\155\157\144\157
104-\040\124\162\151\141\154\040\123\123\114\061\020\060\016\006\003
105-\125\004\003\023\007\153\165\151\170\056\144\145\060\201\237\060
106-\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003\201
107-\215\000\060\201\211\002\201\201\000\270\252\216\365\227\107\007
108-\137\345\170\166\156\223\153\216\337\113\074\333\231\057\161\123
109-\051\156\245\363\044\117\110\045\043\100\001\354\012\025\013\354
110-\156\310\236\046\043\146\373\351\333\330\050\205\041\117\036\337
111-\173\114\345\143\301\013\262\142\126\224\123\313\277\234\241\115
112-\331\207\305\151\110\074\261\277\245\150\122\041\035\172\334\224
113-\117\104\156\107\045\035\237\234\222\322\067\035\371\133\133\262
114-\335\076\030\327\363\207\146\255\243\364\316\217\321\157\360\271
115-\264\357\261\352\025\143\012\316\201\002\003\001\000\001\243\202
116-\001\332\060\202\001\326\060\037\006\003\125\035\043\004\030\060
117-\026\200\024\241\162\137\046\033\050\230\103\225\135\007\067\325
118-\205\226\235\113\322\303\105\060\035\006\003\125\035\016\004\026
119-\004\024\100\217\071\046\234\114\206\043\231\306\121\011\246\346
120-\362\301\376\247\366\267\060\016\006\003\125\035\017\001\001\377
121-\004\004\003\002\005\240\060\014\006\003\125\035\023\001\001\377
122-\004\002\060\000\060\035\006\003\125\035\045\004\026\060\024\006
123-\010\053\006\001\005\005\007\003\001\006\010\053\006\001\005\005
124-\007\003\002\060\106\006\003\125\035\040\004\077\060\075\060\073
125-\006\014\053\006\001\004\001\262\061\001\002\001\003\004\060\053
126-\060\051\006\010\053\006\001\005\005\007\002\001\026\035\150\164
127-\164\160\163\072\057\057\163\145\143\165\162\145\056\143\157\155
128-\157\144\157\056\143\157\155\057\103\120\123\060\173\006\003\125
129-\035\037\004\164\060\162\060\070\240\066\240\064\206\062\150\164
130-\164\160\072\057\057\143\162\154\056\143\157\155\157\144\157\143
131-\141\056\143\157\155\057\125\124\116\055\125\123\105\122\106\151
132-\162\163\164\055\110\141\162\144\167\141\162\145\056\143\162\154
133-\060\066\240\064\240\062\206\060\150\164\164\160\072\057\057\143
134-\162\154\056\143\157\155\157\144\157\056\156\145\164\057\125\124
135-\116\055\125\123\105\122\106\151\162\163\164\055\110\141\162\144
136-\167\141\162\145\056\143\162\154\060\161\006\010\053\006\001\005
137-\005\007\001\001\004\145\060\143\060\073\006\010\053\006\001\005
138-\005\007\060\002\206\057\150\164\164\160\072\057\057\143\162\164
139-\056\143\157\155\157\144\157\143\141\056\143\157\155\057\125\124
140-\116\101\144\144\124\162\165\163\164\123\145\162\166\145\162\103
141-\101\056\143\162\164\060\044\006\010\053\006\001\005\005\007\060
142-\001\206\030\150\164\164\160\072\057\057\157\143\163\160\056\143
143-\157\155\157\144\157\143\141\056\143\157\155\060\037\006\003\125
144-\035\021\004\030\060\026\202\007\153\165\151\170\056\144\145\202
145-\013\167\167\167\056\153\165\151\170\056\144\145\060\015\006\011
146-\052\206\110\206\367\015\001\001\005\005\000\003\202\001\001\000
147-\216\141\036\046\036\242\331\031\320\360\324\275\211\371\352\222
148-\021\171\152\136\173\174\237\176\071\163\011\126\121\346\206\124
149-\307\155\106\166\122\312\152\250\064\300\140\076\003\316\263\311
150-\110\227\321\237\246\241\152\017\376\167\321\036\020\263\127\200
151-\251\006\046\204\246\373\172\067\023\316\204\314\167\171\011\056
152-\342\104\276\037\254\167\156\167\106\101\333\260\262\151\221\164
153-\321\200\226\141\061\014\057\012\317\265\320\334\010\055\353\366
154-\165\202\336\212\056\272\075\007\220\140\071\126\203\341\202\312
155-\043\254\337\343\317\115\160\127\301\270\267\223\232\355\334\213
156-\336\112\240\125\050\002\253\103\014\124\227\150\030\242\353\071
157-\341\271\374\277\163\200\144\063\022\173\207\140\002\347\076\160
158-\311\207\312\251\066\074\005\361\006\136\161\012\016\012\066\231
159-\260\207\347\151\132\261\240\060\116\175\141\130\313\306\250\226
160-\200\136\175\301\052\377\233\112\112\353\051\147\212\017\157\346
161-\031\355\202\317\201\127\341\044\255\242\321\372\332\024\227\260
162-\154\174\107\306\327\224\021\041\354\326\132\322\335\217\177\221
163-END
164-
165-# Trust for Certificate "Bogus kuix.de"
166-# Issuer: CN=UTN-USERFirst-Hardware,OU=http://www.usertrust.com,O=The USERTRUST Network,L=Salt Lake City,ST=UT,C=US
167-# Serial Number:72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0
168-# Subject: CN=kuix.de,OU=Comodo Trial SSL,OU=TEST USE ONLY - NO WARRANTY ATTACHED,OU=For Testing Purposes Only,O=Kai Engert,STREET=Test Street,L=Test City,ST=Test State,postalCode=12345,C=DE
169-# Not Valid Before: Thu Mar 17 00:00:00 2011
170-# Not Valid After : Sat Apr 16 23:59:59 2011
171-# Fingerprint (MD5): F7:5F:98:BC:D8:64:0C:16:E5:AE:EE:AA:00:F6:1F:07
172-# Fingerprint (SHA1): 82:61:4B:EC:97:48:15:DE:CC:9A:CC:6E:84:21:71:79:B2:64:20:40
173-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
174-CKA_TOKEN CK_BBOOL CK_TRUE
175-CKA_PRIVATE CK_BBOOL CK_FALSE
176-CKA_MODIFIABLE CK_BBOOL CK_FALSE
177-CKA_LABEL UTF8 "Bogus kuix.de"
178-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
179-\202\141\113\354\227\110\025\336\314\232\314\156\204\041\161\171
180-\262\144\040\100
181-END
182-CKA_CERT_MD5_HASH MULTILINE_OCTAL
183-\367\137\230\274\330\144\014\026\345\256\356\252\000\366\037\007
184-END
185-CKA_ISSUER MULTILINE_OCTAL
186-\060\201\227\061\013\060\011\006\003\125\004\006\023\002\125\123
187-\061\013\060\011\006\003\125\004\010\023\002\125\124\061\027\060
188-\025\006\003\125\004\007\023\016\123\141\154\164\040\114\141\153
189-\145\040\103\151\164\171\061\036\060\034\006\003\125\004\012\023
190-\025\124\150\145\040\125\123\105\122\124\122\125\123\124\040\116
191-\145\164\167\157\162\153\061\041\060\037\006\003\125\004\013\023
192-\030\150\164\164\160\072\057\057\167\167\167\056\165\163\145\162
193-\164\162\165\163\164\056\143\157\155\061\037\060\035\006\003\125
194-\004\003\023\026\125\124\116\055\125\123\105\122\106\151\162\163
195-\164\055\110\141\162\144\167\141\162\145
196-END
197-CKA_SERIAL_NUMBER MULTILINE_OCTAL
198-\002\020\162\003\041\005\305\014\010\127\075\216\245\060\116\376
199-\350\260
200-END
201-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
202-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
203-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
204-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
205-
206-#
207 # Certificate "Go Daddy Root Certificate Authority - G2"
208 #
209 # Issuer: CN=Go Daddy Root Certificate Authority - G2,O="GoDaddy.com, Inc.",L=Scottsdale,ST=Arizona,C=US
210diff --git a/mozilla/nssckbi.h b/mozilla/nssckbi.h
211index fe89ed3..ba43e70 100644
212--- a/mozilla/nssckbi.h
213+++ b/mozilla/nssckbi.h
214@@ -45,8 +45,8 @@
215 * of the comment in the CK_VERSION type definition.
216 */
217 #define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1
218-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 97
219-#define NSS_BUILTINS_LIBRARY_VERSION "1.97"
220+#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 98
221+#define NSS_BUILTINS_LIBRARY_VERSION "1.98"
222
223 /* These version numbers detail the semantic changes to the ckfw engine. */
224 #define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1
225--
2261.8.3.1
227
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
new file mode 100644
index 0000000000..bf027233d1
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
@@ -0,0 +1,46 @@
1Upstream-Status: Pending
2
3From 111e905fe931da1a3800accfc675cc01c8ee080c Mon Sep 17 00:00:00 2001
4From: Ulf Samuelsson <ulf@emagii.com>
5Date: Tue, 28 Feb 2012 06:42:58 +0100
6Subject: [PATCH] update-ca-certificates: remove c rehash
7
8Updated earlier patch to apply clean on 2012-02-12
9Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
10---
11 sbin/update-ca-certificates | 20 ++++++++++----------
12 1 files changed, 10 insertions(+), 10 deletions(-)
13
14diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
15index 5375950..c567e3d 100755
16--- a/sbin/update-ca-certificates
17+++ b/sbin/update-ca-certificates
18@@ -132,16 +132,16 @@ rm -f "$CERTBUNDLE"
19 ADDED_CNT=$(wc -l < "$ADDED")
20 REMOVED_CNT=$(wc -l < "$REMOVED")
21
22-if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
23-then
24- # only run if set of files has changed
25- if [ "$verbose" = 0 ]
26- then
27- c_rehash . > /dev/null
28- else
29- c_rehash .
30- fi
31-fi
32+#if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
33+#then
34+# # only run if set of files has changed
35+# if [ "$verbose" = 0 ]
36+# then
37+# c_rehash . > /dev/null
38+# else
39+# c_rehash .
40+# fi
41+#fi
42
43 chmod 0644 "$TEMPBUNDLE"
44 mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
45--
461.7.4.1
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch b/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
new file mode 100644
index 0000000000..f4c84fea44
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Pending
2
3From 724cb153ca0f607fb38b3a8db3ebb2742601cd81 Mon Sep 17 00:00:00 2001
4From: Andreas Oberritter <obi@opendreambox.org>
5Date: Tue, 19 Mar 2013 17:14:33 +0100
6Subject: [PATCH 2/2] update-ca-certificates: use $SYSROOT
7
8Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
9---
10 sbin/update-ca-certificates | 14 +++++++-------
11 1 file changed, 7 insertions(+), 7 deletions(-)
12
13diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
14index c567e3d..923b68a 100755
15--- a/sbin/update-ca-certificates
16+++ b/sbin/update-ca-certificates
17@@ -37,11 +37,11 @@ do
18 shift
19 done
20
21-CERTSCONF=/etc/ca-certificates.conf
22-CERTSDIR=/usr/share/ca-certificates
23-LOCALCERTSDIR=/usr/local/share/ca-certificates
24+CERTSCONF=$SYSROOT/etc/ca-certificates.conf
25+CERTSDIR=$SYSROOT/usr/share/ca-certificates
26+LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
27 CERTBUNDLE=ca-certificates.crt
28-ETCCERTSDIR=/etc/ssl/certs
29+ETCCERTSDIR=$SYSROOT/etc/ssl/certs
30
31 cleanup() {
32 rm -f "$TEMPBUNDLE"
33@@ -64,9 +64,9 @@ add() {
34 PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
35 -e 's/[()]/=/g' \
36 -e 's/,/_/g').pem"
37- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
38+ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
39 then
40- ln -sf "$CERT" "$PEM"
41+ ln -sf "${CERT##$SYSROOT}" "$PEM"
42 echo +$PEM >> "$ADDED"
43 fi
44 cat "$CERT" >> "$TEMPBUNDLE"
45@@ -148,7 +148,7 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
46
47 echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
48
49-HOOKSDIR=/etc/ca-certificates/update.d
50+HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
51 echo -n "Running hooks in $HOOKSDIR...."
52 VERBOSE_ARG=
53 [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
54--
551.7.10.4
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch
new file mode 100644
index 0000000000..7e0ee4cd24
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Pending
2
3update-ca-certificates: find SYSROOT relative to its own location
4
5This makes the script relocatable.
6
7--- ca-certificates-20130119.orig/sbin/update-ca-certificates
8+++ ca-certificates-20130119/sbin/update-ca-certificates
9@@ -37,11 +37,44 @@ do
10 shift
11 done
12
13-CERTSCONF=$SYSROOT/etc/ca-certificates.conf
14+if [ -z "$SYSROOT" ]; then
15+ local_which () {
16+ if [ $# -lt 1 ]; then
17+ return 1
18+ fi
19+
20+ (
21+ IFS=:
22+ for entry in $PATH; do
23+ if [ -x "$entry/$1" ]; then
24+ echo "$entry/$1"
25+ exit 0
26+ fi
27+ done
28+ exit 1
29+ )
30+ }
31+
32+ case "$0" in
33+ */*)
34+ sbindir=$(cd ${0%/*} && pwd)
35+ ;;
36+ *)
37+ sbindir=$(cd $(dirname $(local_which $0)) && pwd)
38+ ;;
39+ esac
40+ prefix=${sbindir%/*}
41+ SYSROOT=${prefix%/*}
42+ if [ ! -d "$SYSROOT/usr/share/ca-certificates" ]; then
43+ SYSROOT=
44+ fi
45+fi
46+
47 CERTSDIR=$SYSROOT/usr/share/ca-certificates
48+CERTSCONF=$SYSROOT/etc/ca-certificates.conf
49+ETCCERTSDIR=$SYSROOT/etc/ssl/certs
50 LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
51 CERTBUNDLE=ca-certificates.crt
52-ETCCERTSDIR=$SYSROOT/etc/ssl/certs
53
54 cleanup() {
55 rm -f "$TEMPBUNDLE"
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch b/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
new file mode 100644
index 0000000000..a113fa8b15
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Pending
2
3Let us alter the install destination of the script via SBINDIR
4
5--- ca-certificates-20130119.orig/sbin/Makefile
6+++ ca-certificates-20130119/sbin/Makefile
7@@ -3,9 +3,12 @@
8 #
9 #
10
11+SBINDIR = /usr/sbin
12+
13 all:
14
15 clean:
16
17 install:
18- install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/
19+ install -d $(DESTDIR)$(SBINDIR)
20+ install -m755 update-ca-certificates $(DESTDIR)$(SBINDIR)/
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb b/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb
new file mode 100644
index 0000000000..a277036cfb
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb
@@ -0,0 +1,77 @@
1SUMMARY = "Common CA certificates"
2DESCRIPTION = "This package includes PEM files of CA certificates to allow \
3SSL-based applications to check for the authenticity of SSL connections. \
4This derived from Debian's CA Certificates."
5HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
6SECTION = "misc"
7LICENSE = "GPL-2.0+ & MPL-2.0"
8LIC_FILES_CHKSUM = "file://debian/copyright;md5=0ee6c253e6406c76bfe261deaf5a60b5"
9
10# This is needed to ensure we can run the postinst at image creation time
11DEPENDS = "ca-certificates-native"
12DEPENDS_class-native = ""
13
14# tag: debian/20140325 + 2
15SRCREV = "1ce8e63dcfea6b9258da356dc023895e6f694144"
16
17SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
18 file://0001-update-ca-certificates-remove-c-rehash.patch \
19 file://0002-update-ca-certificates-use-SYSROOT.patch \
20 file://default-sysroot.patch \
21 file://sbindir.patch"
22
23SRC_URI += "file://0001-Update-mozilla-certdata.txt-to-version-1.98.patch"
24
25S = "${WORKDIR}/git"
26
27inherit allarch
28
29EXTRA_OEMAKE = "\
30 'CERTSDIR=${datadir}/ca-certificates' \
31 'SBINDIR=${sbindir}' \
32"
33
34do_install () {
35 install -d ${D}${datadir}/ca-certificates \
36 ${D}${sysconfdir}/ssl/certs \
37 ${D}${sysconfdir}/ca-certificates/update.d
38 oe_runmake 'DESTDIR=${D}' install
39
40 install -d ${D}${mandir}/man8
41 install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
42
43 install -d ${D}${sysconfdir}
44 {
45 echo "# Lines starting with # will be ignored"
46 echo "# Lines starting with ! will remove certificate on next update"
47 echo "#"
48 find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
49 sed 's,^${D}${datadir}/ca-certificates/,,'
50 } >${D}${sysconfdir}/ca-certificates.conf
51}
52
53do_install_append_class-target () {
54 sed -i -e 's,/etc/,${sysconfdir}/,' \
55 -e 's,/usr/share/,${datadir}/,' \
56 -e 's,/usr/local,${prefix}/local,' \
57 ${D}${sbindir}/update-ca-certificates \
58 ${D}${mandir}/man8/update-ca-certificates.8
59}
60
61pkg_postinst_${PN} () {
62 SYSROOT="$D" update-ca-certificates
63}
64
65CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
66
67# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
68CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
69do_install_append_class-nativesdk () {
70 SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates
71}
72
73do_install_append_class-native () {
74 SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
75}
76
77BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 0000000000..ad879d466b
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Pending
2
3--- ConsoleKit-0.4.6.orig/configure.ac
4+++ ConsoleKit-0.4.6/configure.ac
5@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
6 gthread-2.0 >= $GLIB_REQUIRED_VERSION
7 )
8
9-PKG_CHECK_MODULES(POLKIT,
10- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
11- have_polkit=yes,
12- have_polkit=no)
13+AC_ARG_WITH([polkit],
14+ [AS_HELP_STRING([--with-polkit],
15+ [support PolicyKit @<:@default=check@:>@])],
16+ [],
17+ [with_polkit=check])
18+
19+AS_IF([test "x$with_polkit" != xno],
20+ [PKG_CHECK_MODULES(POLKIT,
21+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
22+ have_polkit=yes,
23+ [if test "x$with_polkit" != xcheck; then
24+ AC_MSG_FAILURE(
25+ [--with-polkit was given, but test for polkit failed])
26+ else
27+ have_polkit=no
28+ fi
29+ ])])
30+
31 if test "x$have_polkit" = "xyes" ; then
32 AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
33 fi
diff --git a/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch b/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch
new file mode 100644
index 0000000000..f2f9b9c682
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch
@@ -0,0 +1,19 @@
1Fix builds in the case of seprate source from the build directory.
2
3RP 2013/4/17
4
5Upstream-Status: Pending
6
7Index: pam-ck-connector/Makefile.am
8===================================================================
9--- consolekit/pam-ck-connector.orig/Makefile.am 2010-09-03 13:54:31.000000000 +0000
10+++ consolekit/pam-ck-connector/Makefile.am 2013-04-17 09:06:49.093524918 +0000
11@@ -4,7 +4,7 @@
12
13 INCLUDES = \
14 $(LIBDBUS_CFLAGS) \
15- -I$(top_builddir)/libck-connector \
16+ -I$(top_srcdir)/libck-connector \
17 $(NULL)
18
19 pamlibdir = $(PAM_MODULE_DIR)
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
new file mode 100644
index 0000000000..dfbd11c2d1
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -0,0 +1,49 @@
1SUMMARY = "Framework for defining and tracking users, login sessions, and seats"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ConsoleKit"
3BUGTRACKER = "https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit"
4
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3"
8
9DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
10RDEPENDS_${PN} += "base-files"
11
12inherit autotools pkgconfig
13
14SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
15 file://sepbuildfix.patch \
16 file://add-polkit-configure-argument.patch \
17"
18
19SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
20SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
21
22S = "${WORKDIR}/ConsoleKit-${PV}"
23
24PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
26
27PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
28PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
29PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
30
31FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
32 ${libdir}/ConsoleKit ${systemd_unitdir} ${base_libdir} \
33 ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
34FILES_${PN}-dbg += "${base_libdir}/security/.debug"
35
36PACKAGES =+ "pam-plugin-ck-connector"
37FILES_pam-plugin-ck-connector += "${base_libdir}/security/*.so"
38RDEPENDS_pam-plugin-ck-connector += "${PN}"
39
40do_install_append() {
41 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
42 install -d ${D}${sysconfdir}/tmpfiles.d
43 echo "d ${localstatedir}/log/ConsoleKit - - - -" \
44 > ${D}${sysconfdir}/tmpfiles.d/consolekit.conf
45 fi
46
47 # Remove /var/run from package as console-kit-daemon will populate it on startup
48 rm -fr "${D}${localstatedir}/run"
49}
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
new file mode 100644
index 0000000000..bc7200d072
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
@@ -0,0 +1,22 @@
1dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
2
3RPM5 no longer has a switch to disable signature validation. (Due to security
4validation concerns.)
5
6Upstream-Status: Inappropriate [other]
7 createrepo does not support RPM5 upstream
8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10
11diff -u createrepo-0.4.11.orig/dumpMetadata.py createrepo-0.4.11/dumpMetadata.py
12--- createrepo-0.4.11.orig/dumpMetadata.py 2012-06-05 10:12:55.687964222 -0500
13+++ createrepo-0.4.11/dumpMetadata.py 2012-06-05 10:40:08.154060600 -0500
14@@ -92,7 +92,7 @@
15 fdno = package # let's assume this is an fdno and go with it :)
16 except OSError:
17 raise MDError, "Error opening file"
18- ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
19+ ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
20 try:
21 hdr = ts.hdrFromFdno(fdno)
22 except rpm.error:
diff --git a/meta/recipes-support/createrepo/createrepo/fix-native-install.patch b/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
new file mode 100644
index 0000000000..d8202a4f7c
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
@@ -0,0 +1,163 @@
1Upstream-Status: Inappropriate [configuration]
2
3Date: Jan 31, 2011
4
5There are two fixes:
6 1. -native needs to customize prefix
7 2. needs to change python reference in binaries
8
9Signed-off-by: Qing He <qing.he@intel.com>
10
11diff --git a/Makefile b/Makefile
12index b2d1a32..3c3639f 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -3,22 +3,22 @@ VERSION = 0.4.11
16 SHELL = /bin/sh
17 top_srcdir = .
18 srcdir = .
19-prefix = /usr
20-exec_prefix = ${prefix}
21-
22-bindir = ${exec_prefix}/bin
23-sbindir = ${exec_prefix}/sbin
24-libexecdir = ${exec_prefix}/libexec
25-datadir = ${prefix}/share
26-sysconfdir = ${prefix}/etc
27-sharedstatedir = ${prefix}/com
28-localstatedir = ${prefix}/var
29-libdir = ${exec_prefix}/lib
30-infodir = ${prefix}/info
31+prefix ?= /usr
32+exec_prefix ?= ${prefix}
33+
34+bindir ?= ${exec_prefix}/bin
35+sbindir ?= ${exec_prefix}/sbin
36+libexecdir ?= ${exec_prefix}/libexec
37+datadir ?= ${prefix}/share
38+sysconfdir ?= ${prefix}/etc
39+sharedstatedir ?= ${prefix}/com
40+localstatedir ?= ${prefix}/var
41+libdir ?= ${exec_prefix}/lib
42+infodir ?= ${prefix}/info
43 docdir =
44-includedir = ${prefix}/include
45+includedir ?= ${prefix}/include
46 oldincludedir = /usr/include
47-mandir = ${prefix}/share/man
48+mandir ?= ${prefix}/share/man
49
50 pkgdatadir = $(datadir)/$(PACKAGE)
51 pkglibdir = $(libdir)/$(PACKAGE)
52diff --git a/bin/Makefile b/bin/Makefile
53index 52c1f50..e30610e 100644
54--- a/bin/Makefile
55+++ b/bin/Makefile
56@@ -1,22 +1,22 @@
57 SHELL = /bin/sh
58 top_srcdir = ..
59 srcdir = ../bin
60-prefix = /usr
61-exec_prefix = ${prefix}
62-
63-bindir = ${exec_prefix}/bin
64-sbindir = ${exec_prefix}/sbin
65-libexecdir = ${exec_prefix}/libexec
66-datadir = ${prefix}/share
67-sysconfdir = ${prefix}/etc
68-sharedstatedir = ${prefix}/com
69-localstatedir = ${prefix}/var
70-libdir = ${exec_prefix}/lib
71-infodir = ${prefix}/info
72+prefix ?= /usr
73+exec_prefix ?= ${prefix}
74+
75+bindir ?= ${exec_prefix}/bin
76+sbindir ?= ${exec_prefix}/sbin
77+libexecdir ?= ${exec_prefix}/libexec
78+datadir ?= ${prefix}/share
79+sysconfdir ?= ${prefix}/etc
80+sharedstatedir ?= ${prefix}/com
81+localstatedir ?= ${prefix}/var
82+libdir ?= ${exec_prefix}/lib
83+infodir ?= ${prefix}/info
84 docdir =
85-includedir = ${prefix}/include
86+includedir ?= ${prefix}/include
87 oldincludedir = /usr/include
88-mandir = ${prefix}/man
89+mandir ?= ${prefix}/man
90
91 pkgdatadir = $(datadir)/$(PACKAGE)
92 pkglibdir = $(libdir)/$(PACKAGE)
93@@ -40,8 +40,11 @@ all: $(srcdir)/$(PACKAGE)
94
95
96 install: all installdirs
97- $(INSTALL_BIN) $(srcdir)/$(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
98- $(INSTALL_BIN) $(srcdir)/modifyrepo $(DESTDIR)$(bindir)/modifyrepo
99+ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/$(PACKAGE) > $(srcdir)/$(PACKAGE).tmp
100+ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/modifyrepo > $(srcdir)/modifyrepo.tmp
101+ $(INSTALL_BIN) $(srcdir)/$(PACKAGE).tmp $(DESTDIR)$(bindir)/$(PACKAGE)
102+ $(INSTALL_BIN) $(srcdir)/modifyrepo.tmp $(DESTDIR)$(bindir)/modifyrepo
103+ rm -f $(srcdir)/$(PACKAGE).tmp $(srcdir)/modifyrepo.tmp
104
105
106 uninstall:
107diff --git a/bin/createrepo b/bin/createrepo
108index b0de515..eaacb39 100755
109--- a/bin/createrepo
110+++ b/bin/createrepo
111@@ -1,2 +1,2 @@
112 #!/bin/sh
113-exec /usr/share/createrepo/genpkgmetadata.py "$@"
114+exec @DATADIR@/createrepo/genpkgmetadata.py "$@"
115diff --git a/bin/modifyrepo b/bin/modifyrepo
116index c9732d8..6f7c1d4 100755
117--- a/bin/modifyrepo
118+++ b/bin/modifyrepo
119@@ -1,2 +1,2 @@
120 #!/bin/sh
121-exec /usr/share/createrepo/modifyrepo.py "$@"
122+exec @DATADIR@/createrepo/modifyrepo.py "$@"
123diff --git a/docs/Makefile b/docs/Makefile
124index 0a41179..e128c85 100644
125--- a/docs/Makefile
126+++ b/docs/Makefile
127@@ -1,22 +1,22 @@
128 SHELL = /bin/sh
129 top_srcdir = ..
130 srcdir = ../docs
131-prefix = /usr
132-exec_prefix = ${prefix}
133-
134-bindir = ${exec_prefix}/bin
135-sbindir = ${exec_prefix}/sbin
136-libexecdir = ${exec_prefix}/libexec
137-datadir = ${prefix}/share
138-sysconfdir = ${prefix}/etc
139-sharedstatedir = ${prefix}/com
140-localstatedir = ${prefix}/var
141-libdir = ${exec_prefix}/lib
142-infodir = ${prefix}/info
143+prefix ?= /usr
144+exec_prefix ?= ${prefix}
145+
146+bindir ?= ${exec_prefix}/bin
147+sbindir ?= ${exec_prefix}/sbin
148+libexecdir ?= ${exec_prefix}/libexec
149+datadir ?= ${prefix}/share
150+sysconfdir ?= ${prefix}/etc
151+sharedstatedir ?= ${prefix}/com
152+localstatedir ?= ${prefix}/var
153+libdir ?= ${exec_prefix}/lib
154+infodir ?= ${prefix}/info
155 docdir =
156-includedir = ${prefix}/include
157+includedir ?= ${prefix}/include
158 oldincludedir = /usr/include
159-mandir = ${datadir}/man
160+mandir ?= ${datadir}/man
161
162 pkgdatadir = $(datadir)/$(PACKAGE)
163 pkglibdir = $(libdir)/$(PACKAGE)
diff --git a/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
new file mode 100644
index 0000000000..80205a1507
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
@@ -0,0 +1,47 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2
3Python interpreter should be use from PATH - native python - and not the one from
4host.
5
6Upstream-Status: Inappropriate [configuration]
7
8Index: createrepo-0.4.11/genpkgmetadata.py
9===================================================================
10--- createrepo-0.4.11.orig/genpkgmetadata.py 2012-04-10 17:14:05.278649384 +0300
11+++ createrepo-0.4.11/genpkgmetadata.py 2012-04-10 17:14:22.290648886 +0300
12@@ -1,4 +1,4 @@
13-#!/usr/bin/python -t
14+#! /usr/bin/env python
15 # primary functions and glue for generating the repository metadata
16 #
17
18Index: createrepo-0.4.11/modifyrepo.py
19===================================================================
20--- createrepo-0.4.11.orig/modifyrepo.py 2012-04-10 17:14:09.106649272 +0300
21+++ createrepo-0.4.11/modifyrepo.py 2012-04-10 17:14:27.818648725 +0300
22@@ -1,4 +1,4 @@
23-#!/usr/bin/env python
24+#! /usr/bin/env python
25 # $Id$
26 #
27 # This tools is used to insert arbitrary metadata into an RPM repository.
28Index: createrepo-0.4.11/dumpMetadata.py
29===================================================================
30--- createrepo-0.4.11.orig/dumpMetadata.py 2012-04-10 17:19:23.874640068 +0300
31+++ createrepo-0.4.11/dumpMetadata.py 2012-04-10 17:19:34.502639756 +0300
32@@ -1,4 +1,4 @@
33-#!/usr/bin/python -t
34+#! /usr/bin/env python
35 # base classes and functions for dumping out package Metadata
36 #
37 # This program is free software; you can redistribute it and/or modify
38Index: createrepo-0.4.11/readMetadata.py
39===================================================================
40--- createrepo-0.4.11.orig/readMetadata.py 2012-04-10 17:19:19.626640193 +0300
41+++ createrepo-0.4.11/readMetadata.py 2012-04-10 17:19:40.198639590 +0300
42@@ -1,4 +1,4 @@
43-#!/usr/bin/python -t
44+#! /usr/bin/env python
45
46 # This program is free software; you can redistribute it and/or modify
47 # it under the terms of the GNU General Public License as published by
diff --git a/meta/recipes-support/createrepo/createrepo/recommends.patch b/meta/recipes-support/createrepo/createrepo/recommends.patch
new file mode 100644
index 0000000000..dc5de2b5b0
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/recommends.patch
@@ -0,0 +1,71 @@
1createrepo: implement recommends support
2
3Record against the corresponding requires entry in the output metadata
4if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
5(indicating it is a recommendation, rather than a hard dependency).
6
7Upstream-Status: Pending
8
9Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
10
11diff --git a/dumpMetadata.py b/dumpMetadata.py
12index 70bb2d8..e40e8ac 100644
13--- a/dumpMetadata.py
14+++ b/dumpMetadata.py
15@@ -319,6 +319,23 @@ class RpmMetaData:
16 reqs.append(0)
17 return reqs
18
19+ def _checkMissingOk(self, flags):
20+ reqs=[]
21+ if flags is None:
22+ return reqs
23+
24+ if type(flags) is not types.ListType:
25+ flags = [flags]
26+ for flag in flags:
27+ newflag = flag
28+ if flag is not None:
29+ newflag = flag & rpm.RPMSENSE_MISSINGOK
30+ if newflag:
31+ reqs.append(1)
32+ else:
33+ reqs.append(0)
34+ return reqs
35+
36
37 def _correctVersion(self, vers):
38 returnvers = []
39@@ -537,9 +554,10 @@ class RpmMetaData:
40 tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
41 flags = self._correctFlags(tmpflags)
42 prereq = self._checkPreReq(tmpflags)
43+ missingok = self._checkMissingOk(tmpflags)
44 ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
45 if names is not None:
46- lst = zip(names, flags, ver, prereq)
47+ lst = zip(names, flags, ver, prereq, missingok)
48 return self._uniq(lst)
49
50 def obsoletesList(self):
51@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
52 depsList = rpmObj.depsList()
53 if len(depsList) > 0:
54 rpconode = format.newChild(formatns, 'requires', None)
55- for (name, flags, (e,v,r), prereq) in depsList:
56+ for (name, flags, (e,v,r), prereq, missingok) in depsList:
57 entry = rpconode.newChild(formatns, 'entry', None)
58 entry.newProp('name', name)
59 if flags != 0:
60@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
61 entry.newProp('rel', str(r))
62 if prereq == 1:
63 entry.newProp('pre', str(prereq))
64+ if missingok:
65+ entry.newProp('missingok', '1')
66
67 for file in rpmObj.usefulFiles():
68 files = format.newChild(None, 'file', None)
69--
701.7.9.5
71
diff --git a/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
new file mode 100755
index 0000000000..a5b61bade7
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
@@ -0,0 +1,64 @@
1#!/usr/bin/env python
2#
3# This script generates a solution database for a directory containing rpm packages
4# but tries to be efficient about this, only doing so when the packages have changed
5# in some way.
6#
7# It is assumed something already went through and removed all the solvedb.done stamp files
8# in advance.
9#
10# First argument - the rpm binary to use
11# Subsequent arguments - paths to process solution databases for
12#
13
14import sys, os
15import hashlib
16import stat
17import subprocess
18
19if len(sys.argv) < 1:
20 print("Error, rpm command not specified")
21 sys.exit(1)
22
23if len(sys.argv) < 2:
24 print("Error, no paths specified")
25 sys.exit(1)
26
27paths = sys.argv[2:]
28
29for path in paths:
30 if os.path.exists(path + "/solvedb.done"):
31 continue
32 data = ""
33 manifest = []
34 for root, dirs, files in os.walk(path):
35 for file in files:
36 f = os.path.join(root, file)
37 if f.startswith(path + "/" + "solvedb"):
38 continue
39 data = data + str(os.stat(f)[stat.ST_MTIME])
40 manifest.append(f)
41 checksum = hashlib.md5(data).hexdigest()
42
43 if os.path.exists(path + "/solvedb.checksum") and open(path + "/solvedb.checksum", "r").read() == checksum:
44 open(path + "/solvedb.done", "w")
45 continue
46
47 if os.path.exists(path + "/solvedb"):
48 subprocess.call("rm -rf %s" % (path + "/solvedb"), shell=True)
49 os.mkdir(path + "/solvedb")
50 m = open(path + "/solvedb/manifest", "w")
51 m.write("# Dynamically generated solve manifest\n")
52 for f in manifest:
53 m.write(f + "\n")
54 m.close()
55
56 cmd = sys.argv[1] + ' -i --replacepkgs --replacefiles --oldpackage -D "_dbpath ' + path + '/solvedb" --justdb \
57 --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
58 --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \
59 ' + path + '/solvedb/manifest'
60 subprocess.call(cmd, shell=True)
61
62 open(path + "/solvedb.checksum", "w").write(checksum)
63 open(path + "/solvedb.done", "w")
64
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
new file mode 100644
index 0000000000..49b45fc3b8
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -0,0 +1,46 @@
1SUMMARY = "Creates metadata indexes for RPM package repositories"
2HOMEPAGE = "http://createrepo.baseurl.org/"
3
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
6
7DEPENDS_class-native += "libxml2-native rpm-native"
8RDEPENDS_${PN}_class-target = "libxml2-python"
9
10PR = "r9"
11
12SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \
13 file://fix-native-install.patch \
14 file://python-scripts-should-use-interpreter-from-env.patch \
15 file://createrepo-rpm549.patch \
16 file://recommends.patch \
17 file://rpm-createsolvedb.py \
18 "
19
20SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
21SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b"
22
23BBCLASSEXTEND = "native"
24
25do_install () {
26 oe_runmake -e 'DESTDIR=${D}' install
27 install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
28}
29
30# Wrap the python script since the native python is
31# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
32# find it since it is not in PATH.
33do_install_append_class-native () {
34 # Not all the python scripts should be wrapped since some of
35 # them are modules (be imported).
36 for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
37 ${D}${datadir}/createrepo/modifyrepo.py \
38 ${D}${bindir}/rpm-createsolvedb.py ; do
39 sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
40 done
41
42 create_wrapper ${D}/${bindir}/createrepo \
43 RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
44 RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
45 RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
46}
diff --git a/meta/recipes-support/curl/curl/CVE-2014-3613.patch b/meta/recipes-support/curl/curl/CVE-2014-3613.patch
new file mode 100644
index 0000000000..3e2fee0413
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2014-3613.patch
@@ -0,0 +1,269 @@
1From 545e322cc8c383ccdfb4ad85a1634c2b719a1adf Mon Sep 17 00:00:00 2001
2From: Tim Ruehsen <tim.ruehsen@gmx.de>
3Date: Tue, 19 Aug 2014 21:01:28 +0200
4Subject: [PATCH] cookies: only use full host matches for hosts used as IP
5 address
6
7By not detecting and rejecting domain names for partial literal IP
8addresses properly when parsing received HTTP cookies, libcurl can be
9fooled to both send cookies to wrong sites and to allow arbitrary sites
10to set cookies for others.
11
12CVE-2014-3613
13
14Bug: http://curl.haxx.se/docs/adv_20140910A.html
15
16Upstream-Status: Backport
17
18Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
19---
20 lib/cookie.c | 50 ++++++++++++++++++++++++++++++++++++++----------
21 tests/data/test1105 | 3 +--
22 tests/data/test31 | 55 +++++++++++++++++++++++++++--------------------------
23 tests/data/test8 | 3 ++-
24 4 files changed, 71 insertions(+), 40 deletions(-)
25
26diff --git a/lib/cookie.c b/lib/cookie.c
27index 0590643..46904ac 100644
28--- a/lib/cookie.c
29+++ b/lib/cookie.c
30@@ -93,10 +93,11 @@ Example set of cookies:
31 #include "curl_memory.h"
32 #include "share.h"
33 #include "strtoofft.h"
34 #include "rawstr.h"
35 #include "curl_memrchr.h"
36+#include "inet_pton.h"
37
38 /* The last #include file should be: */
39 #include "memdebug.h"
40
41 static void freecookie(struct Cookie *co)
42@@ -317,10 +318,32 @@ static void remove_expired(struct CookieInfo *cookies)
43 }
44 co = nx;
45 }
46 }
47
48+/*
49+ * Return true if the given string is an IP(v4|v6) address.
50+ */
51+static bool isip(const char *domain)
52+{
53+ struct in_addr addr;
54+#ifdef ENABLE_IPV6
55+ struct in6_addr addr6;
56+#endif
57+
58+ if(Curl_inet_pton(AF_INET, domain, &addr)
59+#ifdef ENABLE_IPV6
60+ || Curl_inet_pton(AF_INET6, domain, &addr6)
61+#endif
62+ ) {
63+ /* domain name given as IP address */
64+ return TRUE;
65+ }
66+
67+ return FALSE;
68+}
69+
70 /****************************************************************************
71 *
72 * Curl_cookie_add()
73 *
74 * Add a single cookie line to the cookie keeping object.
75@@ -437,28 +460,31 @@ Curl_cookie_add(struct SessionHandle *data,
76 badcookie = TRUE; /* out of memory bad */
77 break;
78 }
79 }
80 else if(Curl_raw_equal("domain", name)) {
81+ bool is_ip;
82+
83 /* Now, we make sure that our host is within the given domain,
84 or the given domain is not valid and thus cannot be set. */
85
86 if('.' == whatptr[0])
87 whatptr++; /* ignore preceding dot */
88
89- if(!domain || tailmatch(whatptr, domain)) {
90- const char *tailptr=whatptr;
91- if(tailptr[0] == '.')
92- tailptr++;
93- strstore(&co->domain, tailptr); /* don't prefix w/dots
94- internally */
95+ is_ip = isip(domain ? domain : whatptr);
96+
97+ if(!domain
98+ || (is_ip && !strcmp(whatptr, domain))
99+ || (!is_ip && tailmatch(whatptr, domain))) {
100+ strstore(&co->domain, whatptr);
101 if(!co->domain) {
102 badcookie = TRUE;
103 break;
104 }
105- co->tailmatch=TRUE; /* we always do that if the domain name was
106- given */
107+ if(!is_ip)
108+ co->tailmatch=TRUE; /* we always do that if the domain name was
109+ given */
110 }
111 else {
112 /* we did not get a tailmatch and then the attempted set domain
113 is not a domain to which the current host belongs. Mark as
114 bad. */
115@@ -966,17 +992,21 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
116 struct Cookie *newco;
117 struct Cookie *co;
118 time_t now = time(NULL);
119 struct Cookie *mainco=NULL;
120 size_t matches = 0;
121+ bool is_ip;
122
123 if(!c || !c->cookies)
124 return NULL; /* no cookie struct or no cookies in the struct */
125
126 /* at first, remove expired cookies */
127 remove_expired(c);
128
129+ /* check if host is an IP(v4|v6) address */
130+ is_ip = isip(host);
131+
132 co = c->cookies;
133
134 while(co) {
135 /* only process this cookie if it is not expired or had no expire
136 date AND that if the cookie requires we're secure we must only
137@@ -984,12 +1014,12 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
138 if((!co->expires || (co->expires > now)) &&
139 (co->secure?secure:TRUE)) {
140
141 /* now check if the domain is correct */
142 if(!co->domain ||
143- (co->tailmatch && tailmatch(co->domain, host)) ||
144- (!co->tailmatch && Curl_raw_equal(host, co->domain)) ) {
145+ (co->tailmatch && !is_ip && tailmatch(co->domain, host)) ||
146+ ((!co->tailmatch || is_ip) && Curl_raw_equal(host, co->domain)) ) {
147 /* the right part of the host matches the domain stuff in the
148 cookie data */
149
150 /* now check the left part of the path with the cookies path
151 requirement */
152diff --git a/tests/data/test1105 b/tests/data/test1105
153index 25f194c..9564775 100644
154--- a/tests/data/test1105
155+++ b/tests/data/test1105
156@@ -57,10 +57,9 @@ userid=myname&password=mypassword
157 # Netscape HTTP Cookie File
158 # http://curl.haxx.se/docs/http-cookies.html
159 # This file was generated by libcurl! Edit at your own risk.
160
161 127.0.0.1 FALSE /we/want/ FALSE 0 foobar name
162-.127.0.0.1 TRUE "/silly/" FALSE 0 mismatch this
163-.0.0.1 TRUE / FALSE 0 partmatch present
164+127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this
165 </file>
166 </verify>
167 </testcase>
168diff --git a/tests/data/test31 b/tests/data/test31
169index 38af83b..dfcac04 100644
170--- a/tests/data/test31
171+++ b/tests/data/test31
172@@ -49,11 +49,12 @@ Set-Cookie: nodomainnovalue
173 Set-Cookie: nodomain=value; expires=Fri Feb 2 11:56:27 GMT 2035
174 Set-Cookie: novalue; domain=reallysilly
175 Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
176 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030
177 Set-Cookie: magic=yessir; path=/silly/; HttpOnly
178-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
179+Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad;
180+Set-Cookie: partialip=nono; domain=.0.0.1;
181
182 boo
183 </data>
184 </reply>
185
186@@ -93,36 +94,36 @@ Accept: */*
187 <file name="log/jar31.txt" mode="text">
188 # Netscape HTTP Cookie File
189 # http://curl.haxx.se/docs/http-cookies.html
190 # This file was generated by libcurl! Edit at your own risk.
191
192-.127.0.0.1 TRUE /silly/ FALSE 0 ismatch this
193-.127.0.0.1 TRUE /overwrite FALSE 0 overwrite this2
194-.127.0.0.1 TRUE /secure1/ TRUE 0 sec1value secure1
195-.127.0.0.1 TRUE /secure2/ TRUE 0 sec2value secure2
196-.127.0.0.1 TRUE /secure3/ TRUE 0 sec3value secure3
197-.127.0.0.1 TRUE /secure4/ TRUE 0 sec4value secure4
198-.127.0.0.1 TRUE /secure5/ TRUE 0 sec5value secure5
199-.127.0.0.1 TRUE /secure6/ TRUE 0 sec6value secure6
200-.127.0.0.1 TRUE /secure7/ TRUE 0 sec7value secure7
201-.127.0.0.1 TRUE /secure8/ TRUE 0 sec8value secure8
202-.127.0.0.1 TRUE /secure9/ TRUE 0 secure very1
203-#HttpOnly_.127.0.0.1 TRUE /p1/ FALSE 0 httpo1 value1
204-#HttpOnly_.127.0.0.1 TRUE /p2/ FALSE 0 httpo2 value2
205-#HttpOnly_.127.0.0.1 TRUE /p3/ FALSE 0 httpo3 value3
206-#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httpo4 value4
207-#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httponly myvalue1
208-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec myvalue2
209-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec2 myvalue3
210-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec3 myvalue4
211-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec4 myvalue5
212-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec5 myvalue6
213-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec6 myvalue7
214-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec7 myvalue8
215-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec8 myvalue9
216-.127.0.0.1 TRUE / FALSE 0 partmatch present
217+127.0.0.1 FALSE /silly/ FALSE 0 ismatch this
218+127.0.0.1 FALSE /overwrite FALSE 0 overwrite this2
219+127.0.0.1 FALSE /secure1/ TRUE 0 sec1value secure1
220+127.0.0.1 FALSE /secure2/ TRUE 0 sec2value secure2
221+127.0.0.1 FALSE /secure3/ TRUE 0 sec3value secure3
222+127.0.0.1 FALSE /secure4/ TRUE 0 sec4value secure4
223+127.0.0.1 FALSE /secure5/ TRUE 0 sec5value secure5
224+127.0.0.1 FALSE /secure6/ TRUE 0 sec6value secure6
225+127.0.0.1 FALSE /secure7/ TRUE 0 sec7value secure7
226+127.0.0.1 FALSE /secure8/ TRUE 0 sec8value secure8
227+127.0.0.1 FALSE /secure9/ TRUE 0 secure very1
228+#HttpOnly_127.0.0.1 FALSE /p1/ FALSE 0 httpo1 value1
229+#HttpOnly_127.0.0.1 FALSE /p2/ FALSE 0 httpo2 value2
230+#HttpOnly_127.0.0.1 FALSE /p3/ FALSE 0 httpo3 value3
231+#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httpo4 value4
232+#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httponly myvalue1
233+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec myvalue2
234+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec2 myvalue3
235+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec3 myvalue4
236+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec4 myvalue5
237+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec5 myvalue6
238+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec6 myvalue7
239+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec7 myvalue8
240+#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec8 myvalue9
241+127.0.0.1 FALSE / FALSE 0 partmatch present
242 127.0.0.1 FALSE /we/want/ FALSE 2054030187 nodomain value
243 #HttpOnly_127.0.0.1 FALSE /silly/ FALSE 0 magic yessir
244-.0.0.1 TRUE /we/want/ FALSE 0 blexp yesyes
245+127.0.0.1 FALSE /we/want/ FALSE 0 blexp yesyes
246 </file>
247 </verify>
248 </testcase>
249diff --git a/tests/data/test8 b/tests/data/test8
250index 4d54541..030fd55 100644
251--- a/tests/data/test8
252+++ b/tests/data/test8
253@@ -40,11 +40,12 @@ Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/";
254 Set-Cookie: partmatch=present; domain=.0.0.1; path=/w;
255 Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey;
256 Set-Cookie: cookie=yes; path=/we;
257 Set-Cookie: cookie=perhaps; path=/we/want;
258 Set-Cookie: nocookie=yes; path=/WE;
259-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
260+Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad;
261+Set-Cookie: partialip=nono; domain=.0.0.1;
262
263 </file>
264 <precheck>
265 perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
266 </precheck>
267--
2682.1.0
269
diff --git a/meta/recipes-support/curl/curl/CVE-2014-3620.patch b/meta/recipes-support/curl/curl/CVE-2014-3620.patch
new file mode 100644
index 0000000000..d11f1908af
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2014-3620.patch
@@ -0,0 +1,69 @@
1From fd7ae600adf23a9a1ed619165c5058bdec216e9c Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Tue, 19 Aug 2014 21:11:20 +0200
4Subject: [PATCH] cookies: reject incoming cookies set for TLDs
5
6Test 61 was modified to verify this.
7
8CVE-2014-3620
9
10Reported-by: Tim Ruehsen
11URL: http://curl.haxx.se/docs/adv_20140910B.html
12
13Upstream-Status: Backport
14
15Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
16---
17 lib/cookie.c | 6 ++++++
18 tests/data/test61 | 1 +
19 2 files changed, 7 insertions(+)
20
21diff --git a/lib/cookie.c b/lib/cookie.c
22index 46904ac..375485f 100644
23--- a/lib/cookie.c
24+++ b/lib/cookie.c
25@@ -461,19 +461,25 @@ Curl_cookie_add(struct SessionHandle *data,
26 break;
27 }
28 }
29 else if(Curl_raw_equal("domain", name)) {
30 bool is_ip;
31+ const char *dotp;
32
33 /* Now, we make sure that our host is within the given domain,
34 or the given domain is not valid and thus cannot be set. */
35
36 if('.' == whatptr[0])
37 whatptr++; /* ignore preceding dot */
38
39 is_ip = isip(domain ? domain : whatptr);
40
41+ /* check for more dots */
42+ dotp = strchr(whatptr, '.');
43+ if(!dotp)
44+ domain=":";
45+
46 if(!domain
47 || (is_ip && !strcmp(whatptr, domain))
48 || (!is_ip && tailmatch(whatptr, domain))) {
49 strstore(&co->domain, whatptr);
50 if(!co->domain) {
51diff --git a/tests/data/test61 b/tests/data/test61
52index d2de279..e6dbbb9 100644
53--- a/tests/data/test61
54+++ b/tests/data/test61
55@@ -21,10 +21,11 @@ Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 2 11:56:27 GMT 2
56 SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
57 Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure
58 Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure
59 Set-Cookie: test5=name; domain=anything.com; path=/ ; secure
60 Set-Cookie: fake=fooledyou; domain=..com; path=/;
61+Set-Cookie: supercookie=fooledyou; domain=.com; path=/;^M
62 Content-Length: 4
63
64 boo
65 </data>
66 </reply>
67--
682.1.0
69
diff --git a/meta/recipes-support/curl/curl/CVE-2014-3707.patch b/meta/recipes-support/curl/curl/CVE-2014-3707.patch
new file mode 100644
index 0000000000..7ff38a65e8
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2014-3707.patch
@@ -0,0 +1,416 @@
1From 3696fc1ba79d9b34660c44150be5e93ecf87dd9e Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Fri, 17 Oct 2014 12:59:32 +0200
4Subject: [PATCH] curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of
5 bounds
6
7When duplicating a handle, the data to post was duplicated using
8strdup() when it could be binary and contain zeroes and it was not even
9zero terminated! This caused read out of bounds crashes/segfaults.
10
11Since the lib/strdup.c file no longer is easily shared with the curl
12tool with this change, it now uses its own version instead.
13
14Bug: http://curl.haxx.se/docs/adv_20141105.html
15CVE: CVE-2014-3707
16Reported-By: Symeon Paraschoudis
17---
18 lib/formdata.c | 52 +++++++++-------------------------------------------
19 lib/strdup.c | 32 +++++++++++++++++++++++++++-----
20 lib/strdup.h | 3 ++-
21 lib/url.c | 22 +++++++++++++++++-----
22 lib/urldata.h | 11 +++++++++--
23 src/Makefile.inc | 4 ++--
24 src/tool_setup.h | 5 ++---
25 src/tool_strdup.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
26 src/tool_strdup.h | 30 ++++++++++++++++++++++++++++++
27 9 files changed, 145 insertions(+), 61 deletions(-)
28 create mode 100644 src/tool_strdup.c
29 create mode 100644 src/tool_strdup.h
30
31Index: curl-7.37.1/lib/formdata.c
32===================================================================
33--- curl-7.37.1.orig/lib/formdata.c
34+++ curl-7.37.1/lib/formdata.c
35@@ -36,6 +36,7 @@
36 #include "strequal.h"
37 #include "curl_memory.h"
38 #include "sendf.h"
39+#include "strdup.h"
40
41 #define _MPRINTF_REPLACE /* use our functions only */
42 #include <curl/mprintf.h>
43@@ -214,46 +215,6 @@ static const char *ContentTypeForFilenam
44
45 /***************************************************************************
46 *
47- * memdup()
48- *
49- * Copies the 'source' data to a newly allocated buffer buffer (that is
50- * returned). Uses buffer_length if not null, else uses strlen to determine
51- * the length of the buffer to be copied
52- *
53- * Returns the new pointer or NULL on failure.
54- *
55- ***************************************************************************/
56-static char *memdup(const char *src, size_t buffer_length)
57-{
58- size_t length;
59- bool add = FALSE;
60- char *buffer;
61-
62- if(buffer_length)
63- length = buffer_length;
64- else if(src) {
65- length = strlen(src);
66- add = TRUE;
67- }
68- else
69- /* no length and a NULL src pointer! */
70- return strdup("");
71-
72- buffer = malloc(length+add);
73- if(!buffer)
74- return NULL; /* fail */
75-
76- memcpy(buffer, src, length);
77-
78- /* if length unknown do null termination */
79- if(add)
80- buffer[length] = '\0';
81-
82- return buffer;
83-}
84-
85-/***************************************************************************
86- *
87 * FormAdd()
88 *
89 * Stores a formpost parameter and builds the appropriate linked list.
90@@ -682,9 +643,12 @@ CURLFORMcode FormAdd(struct curl_httppos
91 (form == first_form) ) {
92 /* Note that there's small risk that form->name is NULL here if the
93 app passed in a bad combo, so we better check for that first. */
94- if(form->name)
95+ if(form->name) {
96 /* copy name (without strdup; possibly contains null characters) */
97- form->name = memdup(form->name, form->namelength);
98+ form->name = Curl_memdup(form->name, form->namelength?
99+ form->namelength:
100+ strlen(form->name)+1);
101+ }
102 if(!form->name) {
103 return_value = CURL_FORMADD_MEMORY;
104 break;
105@@ -695,7 +659,7 @@ CURLFORMcode FormAdd(struct curl_httppos
106 HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
107 HTTPPOST_CALLBACK)) ) {
108 /* copy value (without strdup; possibly contains null characters) */
109- form->value = memdup(form->value, form->contentslength);
110+ form->value = Curl_memdup(form->value, form->contentslength);
111 if(!form->value) {
112 return_value = CURL_FORMADD_MEMORY;
113 break;
114Index: curl-7.37.1/lib/strdup.c
115===================================================================
116--- curl-7.37.1.orig/lib/strdup.c
117+++ curl-7.37.1/lib/strdup.c
118@@ -5,7 +5,7 @@
119 * | (__| |_| | _ <| |___
120 * \___|\___/|_| \_\_____|
121 *
122- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
123+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
124 *
125 * This software is licensed as described in the file COPYING, which
126 * you should have received as part of this distribution. The terms
127@@ -19,12 +19,12 @@
128 * KIND, either express or implied.
129 *
130 ***************************************************************************/
131-/*
132- * This file is 'mem-include-scan' clean. See test 1132.
133- */
134 #include "curl_setup.h"
135-
136 #include "strdup.h"
137+#include "curl_memory.h"
138+
139+/* The last #include file should be: */
140+#include "memdebug.h"
141
142 #ifndef HAVE_STRDUP
143 char *curlx_strdup(const char *str)
144@@ -50,3 +50,25 @@ char *curlx_strdup(const char *str)
145
146 }
147 #endif
148+
149+/***************************************************************************
150+ *
151+ * Curl_memdup(source, length)
152+ *
153+ * Copies the 'source' data to a newly allocated buffer (that is
154+ * returned). Copies 'length' bytes.
155+ *
156+ * Returns the new pointer or NULL on failure.
157+ *
158+ ***************************************************************************/
159+char *Curl_memdup(const char *src, size_t length)
160+{
161+ char *buffer = malloc(length);
162+ if(!buffer)
163+ return NULL; /* fail */
164+
165+ memcpy(buffer, src, length);
166+
167+ /* if length unknown do null termination */
168+ return buffer;
169+}
170Index: curl-7.37.1/lib/strdup.h
171===================================================================
172--- curl-7.37.1.orig/lib/strdup.h
173+++ curl-7.37.1/lib/strdup.h
174@@ -7,7 +7,7 @@
175 * | (__| |_| | _ <| |___
176 * \___|\___/|_| \_\_____|
177 *
178- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
179+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
180 *
181 * This software is licensed as described in the file COPYING, which
182 * you should have received as part of this distribution. The terms
183@@ -26,5 +26,6 @@
184 #ifndef HAVE_STRDUP
185 extern char *curlx_strdup(const char *str);
186 #endif
187+char *Curl_memdup(const char *src, size_t buffer_length);
188
189 #endif /* HEADER_CURL_STRDUP_H */
190Index: curl-7.37.1/lib/url.c
191===================================================================
192--- curl-7.37.1.orig/lib/url.c
193+++ curl-7.37.1/lib/url.c
194@@ -125,6 +125,7 @@ int curl_win32_idn_to_ascii(const char *
195 #include "multihandle.h"
196 #include "pipeline.h"
197 #include "dotdot.h"
198+#include "strdup.h"
199
200 #define _MPRINTF_REPLACE /* use our functions only */
201 #include <curl/mprintf.h>
202@@ -270,8 +271,9 @@ void Curl_freeset(struct SessionHandle *
203 {
204 /* Free all dynamic strings stored in the data->set substructure. */
205 enum dupstring i;
206- for(i=(enum dupstring)0; i < STRING_LAST; i++)
207+ for(i=(enum dupstring)0; i < STRING_LAST; i++) {
208 Curl_safefree(data->set.str[i]);
209+ }
210
211 if(data->change.referer_alloc) {
212 Curl_safefree(data->change.referer);
213@@ -356,14 +358,24 @@ CURLcode Curl_dupset(struct SessionHandl
214 memset(dst->set.str, 0, STRING_LAST * sizeof(char *));
215
216 /* duplicate all strings */
217- for(i=(enum dupstring)0; i< STRING_LAST; i++) {
218+ for(i=(enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) {
219 r = setstropt(&dst->set.str[i], src->set.str[i]);
220 if(r != CURLE_OK)
221- break;
222+ return r;
223 }
224
225- /* If a failure occurred, freeing has to be performed externally. */
226- return r;
227+ /* duplicate memory areas pointed to */
228+ i = STRING_COPYPOSTFIELDS;
229+ if(src->set.postfieldsize && src->set.str[i]) {
230+ /* postfieldsize is curl_off_t, Curl_memdup() takes a size_t ... */
231+ dst->set.str[i] = Curl_memdup(src->set.str[i], src->set.postfieldsize);
232+ if(!dst->set.str[i])
233+ return CURLE_OUT_OF_MEMORY;
234+ /* point to the new copy */
235+ dst->set.postfields = dst->set.str[i];
236+ }
237+
238+ return CURLE_OK;
239 }
240
241 /*
242Index: curl-7.37.1/lib/urldata.h
243===================================================================
244--- curl-7.37.1.orig/lib/urldata.h
245+++ curl-7.37.1/lib/urldata.h
246@@ -1359,7 +1359,6 @@ enum dupstring {
247 STRING_KRB_LEVEL, /* krb security level */
248 STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find
249 $HOME/.netrc */
250- STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */
251 STRING_PROXY, /* proxy to use */
252 STRING_SET_RANGE, /* range, if used */
253 STRING_SET_REFERER, /* custom string for the HTTP referer field */
254@@ -1401,7 +1400,15 @@ enum dupstring {
255
256 STRING_BEARER, /* <bearer>, if used */
257
258- /* -- end of strings -- */
259+ /* -- end of zero-terminated strings -- */
260+
261+ STRING_LASTZEROTERMINATED,
262+
263+ /* -- below this are pointers to binary data that cannot be strdup'ed.
264+ Each such pointer must be added manually to Curl_dupset() --- */
265+
266+ STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */
267+
268 STRING_LAST /* not used, just an end-of-list marker */
269 };
270
271Index: curl-7.37.1/src/Makefile.inc
272===================================================================
273--- curl-7.37.1.orig/src/Makefile.inc
274+++ curl-7.37.1/src/Makefile.inc
275@@ -11,7 +11,6 @@
276 # the official API, but we re-use the code here to avoid duplication.
277 CURLX_CFILES = \
278 ../lib/strtoofft.c \
279- ../lib/strdup.c \
280 ../lib/rawstr.c \
281 ../lib/nonblock.c \
282 ../lib/warnless.c
283@@ -19,7 +18,6 @@ CURLX_CFILES = \
284 CURLX_HFILES = \
285 ../lib/curl_setup.h \
286 ../lib/strtoofft.h \
287- ../lib/strdup.h \
288 ../lib/rawstr.h \
289 ../lib/nonblock.h \
290 ../lib/warnless.h
291@@ -55,6 +53,7 @@ CURL_CFILES = \
292 tool_panykey.c \
293 tool_paramhlp.c \
294 tool_parsecfg.c \
295+ tool_strdup.c \
296 tool_setopt.c \
297 tool_sleep.c \
298 tool_urlglob.c \
299@@ -99,6 +98,7 @@ CURL_HFILES = \
300 tool_setopt.h \
301 tool_setup.h \
302 tool_sleep.h \
303+ tool_strdup.h \
304 tool_urlglob.h \
305 tool_util.h \
306 tool_version.h \
307Index: curl-7.37.1/src/tool_setup.h
308===================================================================
309--- curl-7.37.1.orig/src/tool_setup.h
310+++ curl-7.37.1/src/tool_setup.h
311@@ -7,7 +7,7 @@
312 * | (__| |_| | _ <| |___
313 * \___|\___/|_| \_\_____|
314 *
315- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
316+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
317 *
318 * This software is licensed as described in the file COPYING, which
319 * you should have received as part of this distribution. The terms
320@@ -67,8 +67,7 @@
321 #endif
322
323 #ifndef HAVE_STRDUP
324-# include "strdup.h"
325-# define strdup(ptr) curlx_strdup(ptr)
326+# include "tool_strdup.h"
327 #endif
328
329 #endif /* HEADER_CURL_TOOL_SETUP_H */
330Index: curl-7.37.1/src/tool_strdup.c
331===================================================================
332--- /dev/null
333+++ curl-7.37.1/src/tool_strdup.c
334@@ -0,0 +1,47 @@
335+/***************************************************************************
336+ * _ _ ____ _
337+ * Project ___| | | | _ \| |
338+ * / __| | | | |_) | |
339+ * | (__| |_| | _ <| |___
340+ * \___|\___/|_| \_\_____|
341+ *
342+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
343+ *
344+ * This software is licensed as described in the file COPYING, which
345+ * you should have received as part of this distribution. The terms
346+ * are also available at http://curl.haxx.se/docs/copyright.html.
347+ *
348+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
349+ * copies of the Software, and permit persons to whom the Software is
350+ * furnished to do so, under the terms of the COPYING file.
351+ *
352+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
353+ * KIND, either express or implied.
354+ *
355+ ***************************************************************************/
356+#include "strdup.h"
357+
358+#ifndef HAVE_STRDUP
359+char *strdup(const char *str)
360+{
361+ size_t len;
362+ char *newstr;
363+
364+ if(!str)
365+ return (char *)NULL;
366+
367+ len = strlen(str);
368+
369+ if(len >= ((size_t)-1) / sizeof(char))
370+ return (char *)NULL;
371+
372+ newstr = malloc((len+1)*sizeof(char));
373+ if(!newstr)
374+ return (char *)NULL;
375+
376+ memcpy(newstr,str,(len+1)*sizeof(char));
377+
378+ return newstr;
379+
380+}
381+#endif
382Index: curl-7.37.1/src/tool_strdup.h
383===================================================================
384--- /dev/null
385+++ curl-7.37.1/src/tool_strdup.h
386@@ -0,0 +1,30 @@
387+#ifndef HEADER_TOOL_STRDUP_H
388+#define HEADER_TOOL_STRDUP_H
389+/***************************************************************************
390+ * _ _ ____ _
391+ * Project ___| | | | _ \| |
392+ * / __| | | | |_) | |
393+ * | (__| |_| | _ <| |___
394+ * \___|\___/|_| \_\_____|
395+ *
396+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
397+ *
398+ * This software is licensed as described in the file COPYING, which
399+ * you should have received as part of this distribution. The terms
400+ * are also available at http://curl.haxx.se/docs/copyright.html.
401+ *
402+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
403+ * copies of the Software, and permit persons to whom the Software is
404+ * furnished to do so, under the terms of the COPYING file.
405+ *
406+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
407+ * KIND, either express or implied.
408+ *
409+ ***************************************************************************/
410+#include "tool_setup.h"
411+
412+#ifndef HAVE_STRDUP
413+extern char *strdup(const char *str);
414+#endif
415+
416+#endif /* HEADER_TOOL_STRDUP_H */
diff --git a/meta/recipes-support/curl/curl/CVE-2014-8150.patch b/meta/recipes-support/curl/curl/CVE-2014-8150.patch
new file mode 100644
index 0000000000..9a0828076c
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2014-8150.patch
@@ -0,0 +1,29 @@
1From 4e2ac2afa94f014a2a015c48c678e2367a63ae82 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 25 Dec 2014 23:55:03 +0100
4Subject: [PATCH] url-parsing: reject CRLFs within URLs
5
6Bug: http://curl.haxx.se/docs/adv_20150108B.html
7Reported-by: Andrey Labunets
8---
9 lib/url.c | 7 +++++++
10 1 file changed, 7 insertions(+)
11
12Index: curl-7.37.1/lib/url.c
13===================================================================
14--- curl-7.37.1.orig/lib/url.c
15+++ curl-7.37.1/lib/url.c
16@@ -3756,6 +3756,13 @@ static CURLcode parseurlandfillconn(stru
17
18 *prot_missing = FALSE;
19
20+ /* We might pass the entire URL into the request so we need to make sure
21+ * there are no bad characters in there.*/
22+ if(strpbrk(data->change.url, "\r\n")) {
23+ failf(data, "Illegal characters found in URL");
24+ return CURLE_URL_MALFORMAT;
25+ }
26+
27 /*************************************************************
28 * Parse the URL.
29 *
diff --git a/meta/recipes-support/curl/curl/CVE-2015-3143.patch b/meta/recipes-support/curl/curl/CVE-2015-3143.patch
new file mode 100644
index 0000000000..745e9456f3
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2015-3143.patch
@@ -0,0 +1,38 @@
1From d7d1bc8f08eea1a85ab0d794bc1561659462d937 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 16 Apr 2015 13:26:46 +0200
4Subject: [PATCH] ConnectionExists: for NTLM re-use, require credentials to
5 match
6
7Upstream-Status: Backport
8
9CVE-2015-3143
10
11Bug: http://curl.haxx.se/docs/adv_20150422A.html
12Reported-by: Paras Sethia
13Signed-off-by: Daniel Stenberg <daniel@haxx.se>
14Signed-off-by: Maxin B. John <maxin.john@enea.com>
15---
16 lib/url.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/lib/url.c b/lib/url.c
20index 018bb88..ee3d176 100644
21--- a/lib/url.c
22+++ b/lib/url.c
23@@ -3207,11 +3207,11 @@ ConnectionExists(struct SessionHandle *data,
24 strcmp(check->localdev, needle->localdev))
25 continue;
26 }
27
28 if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
29- wantNTLMhttp) {
30+ (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
31 /* This protocol requires credentials per connection or is HTTP+NTLM,
32 so verify that we're using the same name and password as well */
33 if(!strequal(needle->user, check->user) ||
34 !strequal(needle->passwd, check->passwd)) {
35 /* one of them was different */
36--
372.1.4
38
diff --git a/meta/recipes-support/curl/curl/CVE-2015-3144.patch b/meta/recipes-support/curl/curl/CVE-2015-3144.patch
new file mode 100644
index 0000000000..ca6d7448a1
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2015-3144.patch
@@ -0,0 +1,45 @@
1From 6218ded6001ea330e589f92b6b2fa12777752b5d Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 16 Apr 2015 23:52:04 +0200
4Subject: [PATCH] fix_hostname: zero length host name caused -1 index offset
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Backport
10
11If a URL is given with a zero-length host name, like in "http://:80" or
12just ":80", `fix_hostname()` will index the host name pointer with a -1
13offset (as it blindly assumes a non-zero length) and both read and
14assign that address.
15
16CVE-2015-3144
17
18Bug: http://curl.haxx.se/docs/adv_20150422D.html
19Reported-by: Hanno Böck
20Signed-off-by: Daniel Stenberg <daniel@haxx.se>
21Signed-off-by: Maxin B. John <maxin.john@enea.com>
22---
23 lib/url.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/lib/url.c b/lib/url.c
27index ee3d176..f033dbc 100644
28--- a/lib/url.c
29+++ b/lib/url.c
30@@ -3625,11 +3625,11 @@ static void fix_hostname(struct SessionHandle *data,
31
32 /* set the name we use to display the host name */
33 host->dispname = host->name;
34
35 len = strlen(host->name);
36- if(host->name[len-1] == '.')
37+ if(len && (host->name[len-1] == '.'))
38 /* strip off a single trailing dot if present, primarily for SNI but
39 there's no use for it */
40 host->name[len-1]=0;
41
42 if(!is_ASCII_name(host->name)) {
43--
442.1.4
45
diff --git a/meta/recipes-support/curl/curl/CVE-2015-3145.patch b/meta/recipes-support/curl/curl/CVE-2015-3145.patch
new file mode 100644
index 0000000000..15a998289e
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2015-3145.patch
@@ -0,0 +1,70 @@
1From ea595c516bc936a514753597aa6c59fd6eb0765e Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 16 Apr 2015 16:37:40 +0200
4Subject: [PATCH] cookie: cookie parser out of boundary memory access
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Backport
10
11The internal libcurl function called sanitize_cookie_path() that cleans
12up the path element as given to it from a remote site or when read from
13a file, did not properly validate the input. If given a path that
14consisted of a single double-quote, libcurl would index a newly
15allocated memory area with index -1 and assign a zero to it, thus
16destroying heap memory it wasn't supposed to.
17
18CVE-2015-3145
19
20Bug: http://curl.haxx.se/docs/adv_20150422C.html
21Reported-by: Hanno Böck
22Signed-off-by: Daniel Stenberg <daniel@haxx.se>
23Signed-off-by: Maxin B. John <maxin.john@enea.com>
24---
25 lib/cookie.c | 12 +++++++-----
26 1 file changed, 7 insertions(+), 5 deletions(-)
27
28diff --git a/lib/cookie.c b/lib/cookie.c
29index 0864f6b..0127926 100644
30--- a/lib/cookie.c
31+++ b/lib/cookie.c
32@@ -223,15 +223,18 @@ static char *sanitize_cookie_path(const char *cookie_path)
33 char *new_path = strdup(cookie_path);
34 if(!new_path)
35 return NULL;
36
37 /* some stupid site sends path attribute with '"'. */
38+ len = strlen(new_path);
39 if(new_path[0] == '\"') {
40- memmove((void *)new_path, (const void *)(new_path + 1), strlen(new_path));
41+ memmove((void *)new_path, (const void *)(new_path + 1), len);
42+ len--;
43 }
44- if(new_path[strlen(new_path) - 1] == '\"') {
45- new_path[strlen(new_path) - 1] = 0x0;
46+ if(len && (new_path[len - 1] == '\"')) {
47+ new_path[len - 1] = 0x0;
48+ len--;
49 }
50
51 /* RFC6265 5.2.4 The Path Attribute */
52 if(new_path[0] != '/') {
53 /* Let cookie-path be the default-path. */
54@@ -239,12 +242,11 @@ static char *sanitize_cookie_path(const char *cookie_path)
55 new_path = strdup("/");
56 return new_path;
57 }
58
59 /* convert /hoge/ to /hoge */
60- len = strlen(new_path);
61- if(1 < len && new_path[len - 1] == '/') {
62+ if(len && new_path[len - 1] == '/') {
63 new_path[len - 1] = 0x0;
64 }
65
66 return new_path;
67 }
68--
692.1.4
70
diff --git a/meta/recipes-support/curl/curl/CVE-2015-3153.patch b/meta/recipes-support/curl/curl/CVE-2015-3153.patch
new file mode 100644
index 0000000000..089020a842
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2015-3153.patch
@@ -0,0 +1,90 @@
1From 69a2e8d7ec581695a62527cb2252e7350f314ffa Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 23 Apr 2015 15:58:21 +0200
4Subject: [PATCH] CURLOPT_HEADEROPT: default to separate
5
6Make the HTTP headers separated by default for improved security and
7reduced risk for information leakage.
8
9Bug: http://curl.haxx.se/docs/adv_20150429.html
10Reported-by: Yehezkel Horowitz, Oren Souroujon
11---
12 docs/libcurl/opts/CURLOPT_HEADEROPT.3 | 12 ++++++------
13 lib/url.c | 1 +
14 tests/data/test1527 | 2 +-
15 tests/data/test287 | 2 +-
16 tests/libtest/lib1527.c | 1 +
17 5 files changed, 10 insertions(+), 8 deletions(-)
18
19Index: curl-7.37.1/docs/libcurl/opts/CURLOPT_HEADEROPT.3
20===================================================================
21--- curl-7.37.1.orig/docs/libcurl/opts/CURLOPT_HEADEROPT.3
22+++ curl-7.37.1/docs/libcurl/opts/CURLOPT_HEADEROPT.3
23@@ -5,7 +5,7 @@
24 .\" * | (__| |_| | _ <| |___
25 .\" * \___|\___/|_| \_\_____|
26 .\" *
27-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
28+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
29 .\" *
30 .\" * This software is licensed as described in the file COPYING, which
31 .\" * you should have received as part of this distribution. The terms
32@@ -44,7 +44,7 @@ headers. When doing CONNECT, libcurl wil
33 headers only do the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to
34 the server.
35 .SH DEFAULT
36-CURLHEADER_UNIFIED
37+CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then)
38 .SH PROTOCOLS
39 HTTP
40 .SH EXAMPLE
41Index: curl-7.37.1/tests/data/test1527
42===================================================================
43--- curl-7.37.1.orig/tests/data/test1527
44+++ curl-7.37.1/tests/data/test1527
45@@ -45,7 +45,7 @@ http-proxy
46 lib1527
47 </tool>
48 <name>
49-Check same headers are generated without CURLOPT_PROXYHEADER
50+Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED
51 </name>
52 <command>
53 http://the.old.moo.1527:%HTTPPORT/1527 %HOSTIP:%PROXYPORT
54Index: curl-7.37.1/tests/data/test287
55===================================================================
56--- curl-7.37.1.orig/tests/data/test287
57+++ curl-7.37.1/tests/data/test287
58@@ -28,7 +28,7 @@ http
59 HTTP proxy CONNECT with custom User-Agent header
60 </name>
61 <command>
62-http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
63+http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2015" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel --proxy-header "User-Agent: looser/2007"
64 </command>
65 </client>
66
67Index: curl-7.37.1/tests/libtest/lib1527.c
68===================================================================
69--- curl-7.37.1.orig/tests/libtest/lib1527.c
70+++ curl-7.37.1/tests/libtest/lib1527.c
71@@ -83,6 +83,7 @@ int test(char *URL)
72 test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
73 test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
74 test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
75+ test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
76
77 res = curl_easy_perform(curl);
78
79Index: curl-7.37.1/lib/url.c
80===================================================================
81--- curl-7.37.1.orig/lib/url.c
82+++ curl-7.37.1/lib/url.c
83@@ -584,6 +584,7 @@ CURLcode Curl_init_userdefined(struct Us
84 set->ssl_enable_alpn = TRUE;
85
86 set->expect_100_timeout = 1000L; /* Wait for a second by default. */
87+ set->sep_headers = TRUE; /* separated header lists by default */
88 return res;
89 }
90
diff --git a/meta/recipes-support/curl/curl/configure_ac.patch b/meta/recipes-support/curl/curl/configure_ac.patch
new file mode 100644
index 0000000000..b8bd304d71
--- /dev/null
+++ b/meta/recipes-support/curl/curl/configure_ac.patch
@@ -0,0 +1,13 @@
1Upstream-Status: Pending
2
3--- a/configure.ac
4+++ b/configure.ac
5@@ -281,7 +281,7 @@ dnl ************************************
6
7 CURL_CHECK_COMPILER
8 CURL_SET_COMPILER_BASIC_OPTS
9-CURL_SET_COMPILER_DEBUG_OPTS
10+dnl CURL_SET_COMPILER_DEBUG_OPTS
11 CURL_SET_COMPILER_OPTIMIZE_OPTS
12 CURL_SET_COMPILER_WARNING_OPTS
13
diff --git a/meta/recipes-support/curl/curl/pkgconfig_fix.patch b/meta/recipes-support/curl/curl/pkgconfig_fix.patch
new file mode 100644
index 0000000000..5d8769d522
--- /dev/null
+++ b/meta/recipes-support/curl/curl/pkgconfig_fix.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Inappropriate [packaging]
2
3diff -Nurd curl-7.29.0/configure.ac curl-7.29.0/configure.ac
4--- curl-7.29.0/configure.ac 2013-02-06 11:47:19.000000000 +0200
5+++ curl-7.29.0/configure.ac 2013-02-16 12:32:22.132327764 +0200
6@@ -1883,6 +1883,7 @@
7 AC_SUBST(USE_GNUTLS, [1])
8 GNUTLS_ENABLED=1
9 USE_GNUTLS="yes"
10+ GNUTLS_REQUIRED="gnutls"
11 curl_ssl_msg="enabled (GnuTLS)"
12 ],
13 [
14@@ -1953,6 +1954,8 @@
15 ])
16 fi
17
18+AC_SUBST(GNUTLS_REQUIRED)
19+
20 dnl ----------------------------------------------------
21 dnl check for PolarSSL
22 dnl ----------------------------------------------------
23diff -Nurd curl-7.29.0/libcurl.pc.in curl-7.29.0/libcurl.pc.in
24--- curl-7.29.0/libcurl.pc.in 2012-12-12 00:32:22.000000000 +0200
25+++ curl-7.29.0/libcurl.pc.in 2013-02-16 12:33:27.063844337 +0200
26@@ -35,5 +35,5 @@
27 Description: Library to transfer files with ftp, http, etc.
28 Version: @CURLVERSION@
29 Libs: -L${libdir} -lcurl
30-Libs.private: @LIBCURL_LIBS@
31+Libs.private: -ldl -lz
32 Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
diff --git a/meta/recipes-support/curl/curl_7.37.1.bb b/meta/recipes-support/curl/curl_7.37.1.bb
new file mode 100644
index 0000000000..2f4da9706c
--- /dev/null
+++ b/meta/recipes-support/curl/curl_7.37.1.bb
@@ -0,0 +1,66 @@
1SUMMARY = "Command line tool and library for client-side URL transfers"
2HOMEPAGE = "http://curl.haxx.se/"
3BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
4SECTION = "console/network"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
7
8SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
9 file://pkgconfig_fix.patch \
10 file://CVE-2014-3613.patch \
11 file://CVE-2014-3620.patch \
12 file://CVE-2015-3143.patch \
13 file://CVE-2015-3144.patch \
14 file://CVE-2015-3145.patch \
15 file://CVE-2014-3707.patch \
16 file://CVE-2014-8150.patch \
17 file://CVE-2015-3153.patch \
18"
19
20# curl likes to set -g0 in CFLAGS, so we stop it
21# from mucking around with debug options
22#
23SRC_URI += " file://configure_ac.patch"
24
25SRC_URI[md5sum] = "95c627abcf6494f5abe55effe7cd6a57"
26SRC_URI[sha256sum] = "c3ef3cd148f3778ddbefb344117d7829db60656efe1031f9e3065fc0faa25136"
27
28inherit autotools pkgconfig binconfig multilib_header
29
30PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls zlib"
31PACKAGECONFIG_class-native = "ipv6 ssl zlib"
32PACKAGECONFIG_class-nativesdk = "ipv6 ssl zlib"
33
34PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
35PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
36PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
37PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
38PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
39PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
40
41EXTRA_OECONF = "--without-libidn \
42 --enable-crypto-auth \
43 --disable-ldap \
44 --disable-ldaps \
45 --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
46"
47
48do_install_append() {
49 oe_multilib_header curl/curlbuild.h
50}
51
52PACKAGES =+ "lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-doc"
53
54FILES_lib${BPN} = "${libdir}/lib*.so.*"
55RRECOMMENDS_lib${BPN} += "ca-certificates"
56FILES_lib${BPN}-dev = "${includedir} \
57 ${libdir}/lib*.so \
58 ${libdir}/lib*.la \
59 ${libdir}/pkgconfig \
60 ${datadir}/aclocal \
61 ${bindir}/*-config"
62FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
63FILES_lib${BPN}-doc = "${mandir}/man3 \
64 ${mandir}/man1/curl-config.1"
65
66BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 0000000000..34e8db84df
--- /dev/null
+++ b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,48 @@
1Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17:
2
3db: fix thumb uclibc operation in 4.3.29
4 - uclibc thumb builds were using libpthread to implement mutexes, the
5 - uclibc version seems to be a stub (at least on thumb). This commit
6 - fixes the ARM/gcc-assembly mutex implementation so that it has thumb
7 - support and the resultant db4 works (tested on LE Thumb uclibc)
8
9Upstream-Status: Inappropriate [embedded specific]
10
11Author: jbowler@nslu2-linux.org
12
13--- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
14+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
15@@ -474,6 +474,25 @@
16
17 #ifdef LOAD_ACTUAL_MUTEX_CODE
18 /* gcc/arm: 0 is clear, 1 is set. */
19+#if defined __thumb__
20+#define MUTEX_SET(tsl) ({ \
21+ int __r, __p; \
22+ __asm__ volatile( \
23+ ".align 2\n\t" \
24+ "bx pc\n\t" \
25+ "nop\n\t" \
26+ ".arm\n\t" \
27+ "swpb %0, %2, [%3]\n\t" \
28+ "eor %0, %0, #1\n\t" \
29+ "orr %1, pc, #1\n\t" \
30+ "bx %1\n\t" \
31+ ".force_thumb" \
32+ : "=&r" (__r), "=r" (__p) \
33+ : "r" (1), "r" (tsl) \
34+ ); \
35+ __r & 1; \
36+})
37+#else
38 #define MUTEX_SET(tsl) ({ \
39 int __r; \
40 __asm__ volatile( \
41@@ -484,6 +503,7 @@
42 ); \
43 __r & 1; \
44 })
45+#endif
46
47 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
48 #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/meta/recipes-support/db/db/fix-parallel-build.patch b/meta/recipes-support/db/db/fix-parallel-build.patch
new file mode 100644
index 0000000000..2c7f1e186b
--- /dev/null
+++ b/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -0,0 +1,19 @@
1With higher paralelism it sometimes fails with:
2libtool: link: `util_log.lo' is not a valid libtool object
3make: *** [db_replicate] Error 1
4
5Upstream-Status: Pending
6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8
9--- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
10+++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
11@@ -1034,7 +1034,7 @@
12 db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
13 $(POSTLINK) $@
14
15-db_replicate: db_replicate@o@ util_sig@o@ $(DEF_LIB)
16+db_replicate: db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB)
17 $(CCLINK) -o $@ $(LDFLAGS) \
18 db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
19 $(POSTLINK) $@
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
new file mode 100644
index 0000000000..e8b814e06b
--- /dev/null
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -0,0 +1,116 @@
1# Version 5 of the Berkeley DB from Sleepycat
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB5 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12SUMMARY = "Berkeley Database v5"
13HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
14LICENSE = "Sleepycat"
15VIRTUAL_NAME ?= "virtual/db"
16RCONFLICTS_${PN} = "db3"
17
18SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
19SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
20 file://fix-parallel-build.patch \
21 "
22
23SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
24SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
25
26LIC_FILES_CHKSUM = "file://../LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
27
28inherit autotools
29
30# Put virtual/db in any appropriate provider of a
31# relational database, use it as a dependency in
32# place of a specific db and use:
33#
34# PREFERRED_PROVIDER_virtual/db
35#
36# to select the correct db in the build (distro) .conf
37PROVIDES += "${VIRTUAL_NAME}"
38
39# bitbake isn't quite clever enough to deal with sleepycat,
40# the distribution sits in the expected directory, but all
41# the builds must occur from a sub-directory. The following
42# persuades bitbake to go to the right place
43S = "${WORKDIR}/db-${PV}/dist"
44B = "${WORKDIR}/db-${PV}/build_unix"
45SPDX_S = "${WORKDIR}/db-${PV}"
46
47# The executables go in a separate package - typically there
48# is no need to install these unless doing real database
49# management on the system.
50inherit lib_package
51
52PACKAGES =+ "${PN}-cxx"
53FILES_${PN}-cxx = "${libdir}/*cxx*so"
54
55
56# The dev package has the .so link (as in db3) and the .a's -
57# it is therefore incompatible (cannot be installed at the
58# same time) as the db3 package
59# sort out the .so since they do version prior to the .so
60SOLIBS = "-5*.so"
61FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
62
63#configuration - set in local.conf to override
64# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
65DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
66
67EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
68
69# Override the MUTEX setting here, the POSIX library is
70# the default - "POSIX/pthreads/library".
71# Don't ignore the nice SWP instruction on the ARM:
72# These enable the ARM assembler mutex code, this won't
73# work with thumb compilation...
74ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
75MUTEX = ""
76MUTEX_arm = "${ARM_MUTEX}"
77MUTEX_armeb = "${ARM_MUTEX}"
78EXTRA_OECONF += "${MUTEX}"
79
80# Cancel the site stuff - it's set for db3 and destroys the
81# configure.
82CONFIG_SITE = ""
83do_configure() {
84 gnu-configize --force ${S}
85 export STRIP="true"
86 oe_runconf
87}
88
89do_compile_prepend() {
90 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
91 ${B}/libtool
92}
93
94do_install_append() {
95 mkdir -p ${D}/${includedir}/db51
96 mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
97 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
98 ln -s db51/db.h ${D}/${includedir}/db.h
99 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
100
101 # The docs end up in /usr/docs - not right.
102 if test -d "${D}/${prefix}/docs"
103 then
104 mkdir -p "${D}/${datadir}"
105 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
106 mv "${D}/${prefix}/docs" "${D}/${docdir}"
107 fi
108
109 chown -R root:root ${D}
110}
111
112INSANE_SKIP_${PN} = "dev-so"
113INSANE_SKIP_${PN}-cxx = "dev-so"
114
115BBCLASSEXTEND = "native nativesdk"
116
diff --git a/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb
new file mode 100644
index 0000000000..47fb296daa
--- /dev/null
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -0,0 +1,115 @@
1# Version 6 of the Berkeley DB from Oracle (formerly Sleepycat)
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB6 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12SUMMARY = "Berkeley Database v6"
13HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
14LICENSE = "AGPL-3.0"
15VIRTUAL_NAME ?= "virtual/db"
16RCONFLICTS_${PN} = "db3"
17
18SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
19SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
20 file://fix-parallel-build.patch \
21 "
22
23SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
24SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
25
26LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
27
28inherit autotools
29
30# Put virtual/db in any appropriate provider of a
31# relational database, use it as a dependency in
32# place of a specific db and use:
33#
34# PREFERRED_PROVIDER_virtual/db
35#
36# to select the correct db in the build (distro) .conf
37PROVIDES += "${VIRTUAL_NAME}"
38
39# bitbake isn't quite clever enough to deal with sleepycat,
40# the distribution sits in the expected directory, but all
41# the builds must occur from a sub-directory. The following
42# persuades bitbake to go to the right place
43S = "${WORKDIR}/db-${PV}/dist"
44B = "${WORKDIR}/db-${PV}/build_unix"
45SPDX_S = "${WORKDIR}/db-${PV}"
46
47# The executables go in a separate package - typically there
48# is no need to install these unless doing real database
49# management on the system.
50inherit lib_package
51
52PACKAGES =+ "${PN}-cxx"
53FILES_${PN}-cxx = "${libdir}/*cxx*so"
54
55
56# The dev package has the .so link (as in db3) and the .a's -
57# it is therefore incompatible (cannot be installed at the
58# same time) as the db3 package
59# sort out the .so since they do version prior to the .so
60SOLIBS = "-6*.so"
61FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
62
63#configuration - set in local.conf to override
64# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
65DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
66
67EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
68
69# Override the MUTEX setting here, the POSIX library is
70# the default - "POSIX/pthreads/library".
71# Don't ignore the nice SWP instruction on the ARM:
72# These enable the ARM assembler mutex code
73ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
74MUTEX = ""
75MUTEX_arm = "${ARM_MUTEX}"
76MUTEX_armeb = "${ARM_MUTEX}"
77EXTRA_OECONF += "${MUTEX}"
78
79# Cancel the site stuff - it's set for db3 and destroys the
80# configure.
81CONFIG_SITE = ""
82do_configure() {
83 gnu-configize --force ${S}
84 export STRIP="true"
85 oe_runconf
86}
87
88do_compile_prepend() {
89 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
90 ${B}/libtool
91}
92
93do_install_append() {
94 mkdir -p ${D}/${includedir}/db60
95 mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
96 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
97 ln -s db60/db.h ${D}/${includedir}/db.h
98 ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
99
100 # The docs end up in /usr/docs - not right.
101 if test -d "${D}/${prefix}/docs"
102 then
103 mkdir -p "${D}/${datadir}"
104 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
105 mv "${D}/${prefix}/docs" "${D}/${docdir}"
106 fi
107
108 chown -R root:root ${D}
109}
110
111INSANE_SKIP_${PN} = "dev-so"
112INSANE_SKIP_${PN}-cxx = "dev-so"
113
114BBCLASSEXTEND = "native nativesdk"
115
diff --git a/meta/recipes-support/enchant/enchant_1.6.0.bb b/meta/recipes-support/enchant/enchant_1.6.0.bb
new file mode 100644
index 0000000000..97a47614cd
--- /dev/null
+++ b/meta/recipes-support/enchant/enchant_1.6.0.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Enchant Spell checker API Library"
2SECTION = "libs"
3HOMEPAGE = "http://www.abisource.com/projects/enchant/"
4BUGTRACKER = "http://bugzilla.abisource.com/enter_bug.cgi?product=Enchant"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=dfcbabf9131dc9a95febef6753a2958b \
8 file://src/enchant.h;beginline=1;endline=29;md5=8d881caa1d37523567e1d8f726675a18"
9
10DEPENDS = "aspell glib-2.0"
11
12inherit autotools pkgconfig
13
14PR = "r3"
15
16SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz"
17
18SRC_URI[md5sum] = "de11011aff801dc61042828041fb59c7"
19SRC_URI[sha256sum] = "2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f"
20
21EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${prefix} \
22 --enable-aspell br_cv_binreloc=no \
23 "
24
25export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
26
27FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/*.so"
28FILES_${PN}-dev += "${libdir}/${BPN}/*{SOLIBSDEV} ${libdir}/${BPN}/*.la"
29FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
30
31RDEPENDS_${PN} += "aspell"
32
diff --git a/meta/recipes-support/gdbm/files/ptest.patch b/meta/recipes-support/gdbm/files/ptest.patch
new file mode 100644
index 0000000000..65236fb48b
--- /dev/null
+++ b/meta/recipes-support/gdbm/files/ptest.patch
@@ -0,0 +1,36 @@
1Add install-ptest rules.
2
3Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
4Signed-off-by: Maxin B. John <maxin.john@enea.com>
5Upstream-Status: Pending
6
7diff -ur a/Makefile.am b/Makefile.am
8--- a/Makefile.am 2011-08-16 10:13:10.000000000 +0200
9+++ b/Makefile.am 2013-04-12 18:02:16.473715873 +0200
10@@ -31,3 +31,8 @@
11 d=`date '+%d/%m/%Y'`; \
12 sed 's|/\*@DIST_DATE@\*/|"'"$$d"'"|' $(srcdir)/src/version.c > \
13 $(distdir)/src/version.c
14+
15+install-ptest:
16+ @for subdir in $(SUBDIRS); do \
17+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
18+ done
19diff -ur a/tests/Makefile.am b/tests/Makefile.am
20--- a/tests/Makefile.am 2011-11-11 19:39:42.000000000 +0100
21+++ b/tests/Makefile.am 2013-04-12 18:30:57.066301037 +0200
22@@ -132,4 +132,14 @@
23 dtdel_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
24 d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
25
26+buildtests: $(check_PROGRAMS) $(TESTSUITE)
27
28+install-ptest: $(check_PROGRAMS) $(TESTSUITE)
29+ @$(INSTALL) -d $(DESTDIR)
30+ @for file in $^; do \
31+ if [ -x .libs/$$file ]; then \
32+ $(INSTALL_PROGRAM) .libs/$$file $(DESTDIR)/$$file; \
33+ else \
34+ $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
35+ fi \
36+ done
diff --git a/meta/recipes-support/gdbm/files/run-ptest b/meta/recipes-support/gdbm/files/run-ptest
new file mode 100755
index 0000000000..615da8444b
--- /dev/null
+++ b/meta/recipes-support/gdbm/files/run-ptest
@@ -0,0 +1,7 @@
1#!/bin/sh
2#
3# This script is used to run the gmdb test suite
4
5cd tests
6
7./testsuite AUTOTEST_PATH=$PWD abs_builddir=$PWD COMPAT=1 | sed 's/^[^0-9]*\([0-9]\+\): \(.*\)\(ok\|pass\|skipped\|fail\|FAILED\)\(.*\)$/\3: \2 \4/;s/ \+/ /g;s/^ok/PASS/;s/^skipped/SKIP/;s/^fail/FAIL/;s/^FAILED/FAIL/'
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
new file mode 100644
index 0000000000..770d8f66b9
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
@@ -0,0 +1,22 @@
1Obey LDFLAGS
2
3Signed-off-by: Christopher Larson <chris_larson@mentor.com>
4Upstream-status: Inappropriate [old version]
5
6--- gdbm-1.8.3.orig/Makefile.in
7+++ gdbm-1.8.3/Makefile.in
8@@ -156,12 +156,12 @@ install-compat:
9
10 libgdbm.la: $(LOBJS) gdbm.h
11 rm -f libgdbm.la
12- $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
13+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm.la -rpath $(libdir) \
14 -version-info $(SHLIB_VER) $(LOBJS)
15
16 libgdbm_compat.la: $(C_LOBJS) gdbm.h
17 rm -f libgdbm_compat.la
18- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
19+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm_compat.la -rpath $(libdir) \
20 -version-info $(SHLIB_VER) $(C_LOBJS)
21
22 gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
new file mode 100644
index 0000000000..0f9d04f4a1
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Pending
2
3--- gdbm-1.8.3/Makefile.in.orig 2006-02-16 15:17:25.000000000 +0000
4+++ gdbm-1.8.3/Makefile.in 2006-02-16 15:18:08.000000000 +0000
5@@ -131,7 +131,7 @@
6 $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
7 $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
8 $(DESTDIR)$(infodir)
9- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
10+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
11 $(INSTALL_DATA) gdbm.h \
12 $(DESTDIR)$(includedir)/gdbm.h
13 $(INSTALL_DATA) $(srcdir)/gdbm.3 \
14@@ -142,7 +142,7 @@
15 install-compat:
16 $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
17 $(DESTDIR)$(includedir)
18- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
19+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
20 $(DESTDIR)$(libdir)/libgdbm_compat.la
21 $(INSTALL_DATA) $(srcdir)/dbm.h \
22 $(DESTDIR)$(includedir)/dbm.h
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
new file mode 100644
index 0000000000..369145c410
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
@@ -0,0 +1,60 @@
1Upstream-Status: Pending
2
3#
4# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
5#
6
7--- gdbm-1.8.3/Makefile.in~makefile
8+++ gdbm-1.8.3/Makefile.in
9@@ -22,6 +22,7 @@
10 TEXI2DVI = texi2dvi
11
12 DEFS =
13+DESTDIR =
14
15 # Where the system [n]dbm routines are...
16 LIBS = @LIBS@ -lc
17@@ -127,26 +128,26 @@
18 progs: $(PROGS)
19
20 install: libgdbm.la gdbm.h gdbm.info
21- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
22- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
23- $(INSTALL_ROOT)$(infodir)
24- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
25- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
26- $(INSTALL_ROOT)$(includedir)/gdbm.h
27- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
28- $(INSTALL_ROOT)$(man3dir)/gdbm.3
29- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
30- $(INSTALL_ROOT)$(infodir)/gdbm.info
31+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
32+ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
33+ $(DESTDIR)$(infodir)
34+ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
35+ $(INSTALL_DATA) gdbm.h \
36+ $(DESTDIR)$(includedir)/gdbm.h
37+ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
38+ $(DESTDIR)$(man3dir)/gdbm.3
39+ $(INSTALL_DATA) $(srcdir)/gdbm.info \
40+ $(DESTDIR)$(infodir)/gdbm.info
41
42 install-compat:
43- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
44- $(INSTALL_ROOT)$(includedir)
45+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
46+ $(DESTDIR)$(includedir)
47 $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
48- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
49- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
50- $(INSTALL_ROOT)$(includedir)/dbm.h
51- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
52- $(INSTALL_ROOT)$(includedir)/ndbm.h
53+ $(DESTDIR)$(libdir)/libgdbm_compat.la
54+ $(INSTALL_DATA) $(srcdir)/dbm.h \
55+ $(DESTDIR)$(includedir)/dbm.h
56+ $(INSTALL_DATA) $(srcdir)/ndbm.h \
57+ $(DESTDIR)$(includedir)/ndbm.h
58
59 #libgdbm.a: $(OBJS) gdbm.h
60 # rm -f libgdbm.a
diff --git a/meta/recipes-support/gdbm/gdbm_1.11.bb b/meta/recipes-support/gdbm/gdbm_1.11.bb
new file mode 100644
index 0000000000..adf8c5bd38
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm_1.11.bb
@@ -0,0 +1,43 @@
1SUMMARY = "Key/value database library with extensible hashing"
2HOMEPAGE = "http://www.gnu.org/software/gdbm/"
3SECTION = "libs"
4LICENSE = "GPLv3"
5LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
6
7
8SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
9 file://run-ptest \
10 file://ptest.patch \
11 "
12
13SRC_URI[md5sum] = "72c832680cf0999caedbe5b265c8c1bd"
14SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3"
15
16inherit autotools gettext texinfo lib_package ptest
17
18# Needed for dbm python module
19EXTRA_OECONF = "-enable-libgdbm-compat"
20
21# Stop presence of dbm/nbdm on the host contaminating builds
22CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
23
24BBCLASSEXTEND = "native nativesdk"
25
26do_install_append () {
27 # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
28 # these headers
29 install -d ${D}${includedir}/gdbm
30 ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
31 ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
32}
33
34RDEPENDS_${PN}-ptest += "diffutils"
35
36do_compile_ptest() {
37 oe_runmake -C tests buildtests
38}
39
40PACKAGES =+ "${PN}-compat \
41 "
42FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
43 "
diff --git a/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
new file mode 100644
index 0000000000..2331d1df3a
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Key/value database library with extensible hashing"
2HOMEPAGE = "http://www.gnu.org/software/gdbm/"
3SECTION = "libs"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d8e20eece214df8ef953ed5857862150"
6
7PR = "r4"
8
9SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
10 file://makefile.patch \
11 file://libtool-mode.patch \
12 file://ldflags.patch"
13
14SRC_URI[md5sum] = "1d1b1d5c0245b1c00aff92da751e9aa1"
15SRC_URI[sha256sum] = "cc340338a2e28b40058ab9eb5354a21d53f88a1582ea21ba0bb185c37a281dc9"
16
17inherit autotools texinfo
18
19BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gmp/gmp.inc b/meta/recipes-support/gmp/gmp.inc
new file mode 100644
index 0000000000..6aedc85f58
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp.inc
@@ -0,0 +1,29 @@
1SECTION = "devel"
2SUMMARY = "GNU multiprecision arithmetic library"
3DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
4HOMEPAGE = "http://gmplib.org/"
5LICENSE = "GPLv3 LGPLv3"
6
7REVISION = ""
8
9SRC_URI = "ftp://ftp.gmplib.org/pub/gmp-${PV}/gmp-${PV}${REVISION}.tar.bz2 \
10 file://configure.patch \
11 file://amd64.patch "
12
13inherit autotools texinfo
14
15ARM_INSTRUCTION_SET = "arm"
16
17acpaths = ""
18
19BBCLASSEXTEND = "native nativesdk"
20
21PACKAGECONFIG ??= ""
22PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
23
24EXTRA_OECONF += " --enable-cxx=detect"
25
26PACKAGES =+ "libgmpxx"
27FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
28
29SSTATE_SCAN_FILES += "gmp.h"
diff --git a/meta/recipes-support/gmp/gmp/amd64.patch b/meta/recipes-support/gmp/gmp/amd64.patch
new file mode 100644
index 0000000000..564d12d42b
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/amd64.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Pending
2
3Index: gmp-5.0.3/longlong.h
4===================================================================
5--- gmp-5.0.3.orig/longlong.h
6+++ gmp-5.0.3/longlong.h
7@@ -994,8 +994,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
8 count is only an int. */
9 #define count_trailing_zeros(count, x) \
10 do { \
11+ UDItype __cbtmp; \
12 ASSERT ((x) != 0); \
13- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
14+ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
15+ (count) = __cbtmp; \
16 } while (0)
17 #endif /* x86_64 */
18
diff --git a/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
new file mode 100644
index 0000000000..ae1386c4c1
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Inappropriate
2
3Append the user provided flags to the auto-detected ones.
4
5Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
6
7Index: gmp-5.1.1/configure.ac
8===================================================================
9--- gmp-5.1.1.orig/configure.ac 2014-02-11 15:05:44.925202403 +0200
10+++ gmp-5.1.1/configure.ac 2014-02-11 15:19:03.918511398 +0200
11@@ -1745,8 +1745,12 @@
12 EOF
13
14
15-test_CFLAGS=${CFLAGS+set}
16-test_CPPFLAGS=${CPPFLAGS+set}
17+test_CFLAGS=
18+test_CPPFLAGS=
19+
20+user_CFLAGS=$CFLAGS
21+user_CPPFLAGS=$CPPFLAGS
22+user_CXXFLAGS=$CXXFLAGS
23
24 for abi in $abilist; do
25 abi_last="$abi"
26@@ -2175,7 +2179,7 @@
27 want_cxx=no
28 AC_PROG_CXX
29 if test $enable_cxx != no; then
30- test_CXXFLAGS=${CXXFLAGS+set}
31+ test_CXXFLAGS=
32
33 echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
34 cxxflags_ac_prog_cxx=$CXXFLAGS
35@@ -2202,7 +2206,7 @@
36 # Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
37 #
38 for cxxflags_choice in $cxxflags_list; do
39- eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
40+ eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice $user_CXXFLAGS\"
41 GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS,
42 [want_cxx=yes
43 break])
44@@ -2292,6 +2296,8 @@
45 # done
46 fi
47
48+CFLAGS="$CFLAGS $user_CFLAGS"
49+CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
50
51 cat >&AS_MESSAGE_LOG_FD() <<EOF
52 Decided:
diff --git a/meta/recipes-support/gmp/gmp/configure.patch b/meta/recipes-support/gmp/gmp/configure.patch
new file mode 100644
index 0000000000..349da3c6b0
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/configure.patch
@@ -0,0 +1,222 @@
1Upstream-Status: Pending
2
3Updated to apply to gmp-5.1.0
4
5Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
6
7---
8 acinclude.m4 | 32 +++++++++++++++++---------------
9 configure.ac | 26 +++++++++-----------------
10 2 files changed, 26 insertions(+), 32 deletions(-)
11
12diff --git a/acinclude.m4 b/acinclude.m4
13index 227712a..199aa6f 100644
14--- a/acinclude.m4
15+++ b/acinclude.m4
16@@ -40,29 +40,29 @@ dnl a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
17 dnl conftest.exe - various DOS compilers
18
19
20-define(IA64_PATTERN,
21+define([IA64_PATTERN],
22 [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
23
24 dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
25 dnl of which config.sub accepts. (Though none of which are likely to work
26 dnl with GMP.)
27 dnl
28-define(M68K_PATTERN,
29+define([M68K_PATTERN],
30 [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
31
32-define(POWERPC64_PATTERN,
33+define([POWERPC64_PATTERN],
34 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
35
36-define(S390_PATTERN,
37+define([S390_PATTERN],
38 [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
39
40-define(S390X_PATTERN,
41+define([S390X_PATTERN],
42 [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
43
44-define(X86_PATTERN,
45+define([X86_PATTERN],
46 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
47
48-define(X86_64_PATTERN,
49+define([X86_64_PATTERN],
50 [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
51
52 dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
53@@ -80,7 +80,7 @@ dnl x86 -> x86
54 dnl x86/k6 -> k6
55 dnl x86/k6/mmx -> k6_mmx
56
57-define(GMP_FAT_SUFFIX,
58+define([GMP_FAT_SUFFIX],
59 [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
60
61
62@@ -89,7 +89,7 @@ dnl ----------------------------------
63 dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
64 dnl shell expression like $foo if desired.
65
66-define(GMP_REMOVE_FROM_LIST,
67+define([GMP_REMOVE_FROM_LIST],
68 [remove_from_list_tmp=
69 for remove_from_list_i in $[][$1]; do
70 if test $remove_from_list_i = [$2]; then :;
71@@ -105,12 +105,12 @@ dnl GMP_STRIP_PATH(subdir)
72 dnl ----------------------
73 dnl Strip entries */subdir from $path and $fat_path.
74
75-define(GMP_STRIP_PATH,
76+define([GMP_STRIP_PATH],
77 [GMP_STRIP_PATH_VAR(path, [$1])
78 GMP_STRIP_PATH_VAR(fat_path, [$1])
79 ])
80
81-define(GMP_STRIP_PATH_VAR,
82+define([GMP_STRIP_PATH_VAR],
83 [tmp_path=
84 for i in $[][$1]; do
85 case $i in
86@@ -131,7 +131,7 @@ dnl
87 dnl Dummy value for GMP_LIMB_BITS is enough
88 dnl for all current configure-time uses of gmp.h.
89
90-define(GMP_INCLUDE_GMP_H,
91+define([GMP_INCLUDE_GMP_H],
92 [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
93 #define GMP_NAIL_BITS $GMP_NAIL_BITS
94 #define GMP_LIMB_BITS 123
95@@ -146,7 +146,7 @@ dnl Expand at autoconf time to the value of a "#define NAME" from the given
96 dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
97 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
98
99-define(GMP_HEADER_GETVAL,
100+define([GMP_HEADER_GETVAL],
101 [patsubst(patsubst(
102 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
103 [^.*$1[ ]+],[]),
104@@ -160,7 +160,7 @@ dnl The gmp version number, extracted from the #defines in gmp-h.in at
105 dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
106 dnl like 3.0.1 if patchlevel > 0.
107
108-define(GMP_VERSION,
109+define([GMP_VERSION],
110 [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
111 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
112 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
113@@ -1524,7 +1524,9 @@ esac
114 echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
115
116 # All CPUs use asm-defs.m4
117-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
118+echo -n ["include("] >>$gmp_tmpconfigm4i
119+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
120+echo [")"] >>$gmp_tmpconfigm4i
121 ])
122
123
124diff --git a/configure.ac b/configure.ac
125index 64b2c50..f07b821 100644
126--- a/configure.ac
127+++ b/configure.ac
128@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
129 AC_PREREQ(2.59)
130 AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
131 AC_CONFIG_SRCDIR(gmp-impl.h)
132-m4_pattern_forbid([^[ \t]*GMP_])
133-m4_pattern_allow(GMP_LDFLAGS)
134-m4_pattern_allow(GMP_LIMB_BITS)
135-m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
136-m4_pattern_allow(GMP_NAIL_BITS)
137-m4_pattern_allow(GMP_NUMB_BITS)
138-m4_pattern_allow(GMP_NONSTD_ABI)
139-m4_pattern_allow(GMP_CPU_TYPE)
140
141 # If --target is not used then $target_alias is empty, but if say
142 # "./configure athlon-pc-freebsd3.5" is used, then all three of
143@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
144 # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
145 # called. User selections of CC etc are respected.
146 #
147-# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
148+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
149 # pre-testing, since they of course depend on AC_PROG_CC, and also some of
150 # them cache their results, which is not wanted.
151 #
152@@ -440,7 +432,7 @@ abilist="standard"
153 # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
154 # c89 over cc here. But note that on HP-UX c89 provides a castrated
155 # environment, and would want to be excluded somehow. Maybe
156-# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
157+# already does enough to stick cc into ANSI mode and
158 # we don't need to worry.
159 #
160 cclist="gcc cc"
161@@ -1843,7 +1835,7 @@ esac
162 CFLAGS_or_unset=${CFLAGS-'(unset)'}
163 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
164
165-cat >&AC_FD_CC <<EOF
166+cat >&AS_MESSAGE_LOG_FD() <<EOF
167 User:
168 ABI=$ABI
169 CC=$CC
170@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
171
172 # The C compiler and preprocessor, put into ANSI mode if possible.
173 AC_PROG_CC
174-AC_PROG_CC_STDC
175 AC_PROG_CPP
176
177
178@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
179
180 # The C++ compiler, if desired.
181 want_cxx=no
182+AC_PROG_CXX
183 if test $enable_cxx != no; then
184 test_CXXFLAGS=${CXXFLAGS+set}
185- AC_PROG_CXX
186
187- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
188+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
189 cxxflags_ac_prog_cxx=$CXXFLAGS
190 cxxflags_list=ac_prog_cxx
191
192@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
193 fi
194
195
196-cat >&AC_FD_CC <<EOF
197+cat >&AS_MESSAGE_LOG_FD() <<EOF
198 Decided:
199 ABI=$ABI
200 CC=$CC
201@@ -3781,7 +3772,7 @@ GMP_FINISH
202 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
203 # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
204
205-AC_OUTPUT(Makefile \
206+AC_CONFIG_FILES([Makefile \
207 mpf/Makefile mpn/Makefile mpq/Makefile \
208 mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
209 tests/Makefile tests/devel/Makefile \
210@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile \
211 tests/cxx/Makefile \
212 doc/Makefile tune/Makefile \
213 demos/Makefile demos/calc/Makefile demos/expr/Makefile \
214- gmp.h:gmp-h.in)
215+ gmp.h:gmp-h.in])
216+AC_OUTPUT
217
218 AC_MSG_NOTICE([summary of build options:
219
220--
2211.9.1
222
diff --git a/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
new file mode 100644
index 0000000000..1113b41ecd
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
@@ -0,0 +1,26 @@
1
2Signed-off-by: Armin Kuster <akuster808@gmail.com>
3
4This patch with pulled from gmp.
5https://gmplib.org/repo/gmp/rev/4a6d258b467f
6Upstream-Status: Backport
7
8# HG changeset patch
9# User Torbjorn Granlund <tege@gmplib.org>
10# Date 1395835068 -3600
11# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
12# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a
13Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
14
15diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
16--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100
17+++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100
18@@ -43,6 +43,9 @@
19 define(`n', `r4')
20 define(`v0', `r5')
21
22+ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
23+ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
24+
25 EXTERN_FUNC(mpn_mod_1)
26 EXTERN_FUNC(mpn_modexact_1c_odd)
diff --git a/meta/recipes-support/gmp/gmp/use-includedir.patch b/meta/recipes-support/gmp/gmp/use-includedir.patch
new file mode 100644
index 0000000000..74904a2530
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/use-includedir.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Index: gmp-4.2.4/Makefile.am
4===================================================================
5--- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
6+++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
7@@ -106,7 +106,7 @@
8 # but anyone knowledgable enough to be playing with exec_prefix will be able
9 # to address that.
10 #
11-includeexecdir = $(exec_prefix)/include
12+includeexecdir = $(includedir)
13 include_HEADERS = $(GMPXX_HEADERS_OPTION)
14 nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
15 lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
diff --git a/meta/recipes-support/gmp/gmp_6.0.0.bb b/meta/recipes-support/gmp/gmp_6.0.0.bb
new file mode 100644
index 0000000000..6218491142
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp_6.0.0.bb
@@ -0,0 +1,14 @@
1require gmp.inc
2LICENSE="GPLv2 | LGPLv3"
3REVISION="a"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
5 file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
6 file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7"
8SRC_URI_append = " file://use-includedir.patch \
9 file://append_user_provided_flags.patch \
10 file://gmp-6.0.0-ppc64.patch \
11"
12
13SRC_URI[md5sum] = "b7ff2d88cae7f8085bd5006096eed470"
14SRC_URI[sha256sum] = "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
new file mode 100644
index 0000000000..840666f302
--- /dev/null
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
@@ -0,0 +1,35 @@
1From b1de2c6290bc0651fe87a8c4fb52e7a0a5fe6322 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 5 Oct 2014 16:01:49 -0700
4Subject: [PATCH] gsystem-subprocess.c: Enable GNU extensions in system C
5 library
6
7This should export O_CLOEXEC where it is only
8available when _GNU_SOURCE is defined .e.g. uclibc based systems
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Upstream-Status: Pending
13
14---
15 src/libgsystem/gsystem-subprocess.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/src/libgsystem/gsystem-subprocess.c b/src/libgsystem/gsystem-subprocess.c
19index a967896..a52a362 100644
20--- a/src/libgsystem/gsystem-subprocess.c
21+++ b/src/libgsystem/gsystem-subprocess.c
22@@ -18,6 +18,10 @@
23
24 #include "config.h"
25
26+#ifndef _GNU_SOURCE
27+#define _GNU_SOURCE
28+#endif
29+
30 #define _GSYSTEM_NO_LOCAL_ALLOC
31 #include "libgsystem.h"
32
33--
342.1.1
35
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
new file mode 100644
index 0000000000..c688e9d1d7
--- /dev/null
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Test runner for GNOME-style installed tests"
2HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
3LICENSE = "LGPLv2+"
4
5SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
6 file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
7 "
8SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
9SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
12 file://src/gnome-desktop-testing-runner.c;endline=19;md5=67311a600b83fd0068dfc7e5b84ffb3f"
13
14DEPENDS = "glib-2.0"
15
16inherit autotools-brokensep pkgconfig
17
18PACKAGECONFIG ??= ""
19PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,systemd,systemd"
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
new file mode 100644
index 0000000000..c9addca28e
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
@@ -0,0 +1,62 @@
1From e2202ff2b704623efc6277fb5256e4e15bac5676 Mon Sep 17 00:00:00 2001
2From: Werner Koch <wk@gnupg.org>
3Date: Thu, 25 Jul 2013 11:17:52 +0200
4Subject: [PATCH] Mitigate a flush+reload cache attack on RSA secret
5 exponents.
6
7commit e2202ff2b704623efc6277fb5256e4e15bac5676 from
8git://git.gnupg.org/libgcrypt.git
9
10* mpi/mpi-pow.c (gcry_mpi_powm): Always perfrom the mpi_mul for
11exponents in secure memory.
12
13Upstream-Status: Backport
14
15Signed-off-by: Kai Kang <kai.kang@windriver.com>
16--
17
18The attack is published as http://eprint.iacr.org/2013/448 :
19
20Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel
21Attack by Yuval Yarom and Katrina Falkner. 18 July 2013.
22
23 Flush+Reload is a cache side-channel attack that monitors access to
24 data in shared pages. In this paper we demonstrate how to use the
25 attack to extract private encryption keys from GnuPG. The high
26 resolution and low noise of the Flush+Reload attack enables a spy
27 program to recover over 98% of the bits of the private key in a
28 single decryption or signing round. Unlike previous attacks, the
29 attack targets the last level L3 cache. Consequently, the spy
30 program and the victim do not need to share the execution core of
31 the CPU. The attack is not limited to a traditional OS and can be
32 used in a virtualised environment, where it can attack programs
33 executing in a different VM.
34
35Index: gnupg-1.4.7/mpi/mpi-pow.c
36===================================================================
37--- gnupg-1.4.7.orig/mpi/mpi-pow.c
38+++ gnupg-1.4.7/mpi/mpi-pow.c
39@@ -212,7 +212,13 @@ mpi_powm( MPI res, MPI base, MPI exponen
40 tp = rp; rp = xp; xp = tp;
41 rsize = xsize;
42
43- if( (mpi_limb_signed_t)e < 0 ) {
44+ /* To mitigate the Yarom/Falkner flush+reload cache
45+ * side-channel attack on the RSA secret exponent, we do
46+ * the multiplication regardless of the value of the
47+ * high-bit of E. But to avoid this performance penalty
48+ * we do it only if the exponent has been stored in secure
49+ * memory and we can thus assume it is a secret exponent. */
50+ if (esec || (mpi_limb_signed_t)e < 0) {
51 /*mpihelp_mul( xp, rp, rsize, bp, bsize );*/
52 if( bsize < KARATSUBA_THRESHOLD ) {
53 mpihelp_mul( xp, rp, rsize, bp, bsize );
54@@ -227,6 +233,8 @@ mpi_powm( MPI res, MPI base, MPI exponen
55 mpihelp_divrem(xp + msize, 0, xp, xsize, mp, msize);
56 xsize = msize;
57 }
58+ }
59+ if ( (mpi_limb_signed_t)e < 0 ) {
60
61 tp = rp; rp = xp; xp = tp;
62 rsize = xsize;
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
new file mode 100644
index 0000000000..b29ede4233
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
@@ -0,0 +1,44 @@
1Upstream-Status: Backport
2
3Index: gnupg-1.4.7/g10/getkey.c
4===================================================================
5--- gnupg-1.4.7.orig/g10/getkey.c 2007-03-05 16:54:41.000000000 +0800
6+++ gnupg-1.4.7/g10/getkey.c 2013-11-28 14:41:59.640212240 +0800
7@@ -1454,7 +1454,11 @@
8
9 if(flags)
10 key_usage |= PUBKEY_USAGE_UNKNOWN;
11+ if (!key_usage)
12+ key_usage |= PUBKEY_USAGE_NONE;
13 }
14+ else if (p)
15+ key_usage |= PUBKEY_USAGE_NONE;
16
17 /* We set PUBKEY_USAGE_UNKNOWN to indicate that this key has a
18 capability that we do not handle. This serves to distinguish
19Index: gnupg-1.4.7/g10/keygen.c
20===================================================================
21--- gnupg-1.4.7.orig/g10/keygen.c 2007-02-05 00:27:40.000000000 +0800
22+++ gnupg-1.4.7/g10/keygen.c 2013-11-28 14:43:05.016670092 +0800
23@@ -209,9 +209,6 @@
24 if (use & PUBKEY_USAGE_AUTH)
25 buf[0] |= 0x20;
26
27- if (!buf[0])
28- return;
29-
30 build_sig_subpkt (sig, SIGSUBPKT_KEY_FLAGS, buf, 1);
31 }
32
33Index: gnupg-1.4.7/include/cipher.h
34===================================================================
35--- gnupg-1.4.7.orig/include/cipher.h 2006-04-21 20:39:49.000000000 +0800
36+++ gnupg-1.4.7/include/cipher.h 2013-11-28 14:49:24.159322744 +0800
37@@ -52,6 +52,7 @@
38 #define PUBKEY_USAGE_CERT 4 /* key is also good to certify other keys*/
39 #define PUBKEY_USAGE_AUTH 8 /* key is good for authentication */
40 #define PUBKEY_USAGE_UNKNOWN 128 /* key has an unknown usage bit */
41+#define PUBKEY_USAGE_NONE 256 /* No usage given. */
42
43 #define DIGEST_ALGO_MD5 1
44 #define DIGEST_ALGO_SHA1 2
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
new file mode 100644
index 0000000000..b1a22f5853
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
@@ -0,0 +1,153 @@
1Upstream-Status: Backport
2
3Index: gnupg-1.4.7/cipher/dsa.c
4===================================================================
5--- gnupg-1.4.7.orig/cipher/dsa.c 2006-12-12 02:27:21.000000000 +0800
6+++ gnupg-1.4.7/cipher/dsa.c 2014-01-23 11:30:17.300915919 +0800
7@@ -287,6 +287,8 @@
8 MPI kinv;
9 MPI tmp;
10
11+ mpi_normalize (hash);
12+
13 /* select a random k with 0 < k < q */
14 k = gen_k( skey->q );
15
16Index: gnupg-1.4.7/cipher/elgamal.c
17===================================================================
18--- gnupg-1.4.7.orig/cipher/elgamal.c 2006-12-12 03:08:05.000000000 +0800
19+++ gnupg-1.4.7/cipher/elgamal.c 2014-01-23 11:30:17.300915919 +0800
20@@ -376,6 +376,9 @@
21 {
22 MPI t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
23
24+ mpi_normalize (a);
25+ mpi_normalize (b);
26+
27 /* output = b/(a^x) mod p */
28 mpi_powm( t1, a, skey->x, skey->p );
29 mpi_invm( t1, t1, skey->p );
30Index: gnupg-1.4.7/cipher/random.c
31===================================================================
32--- gnupg-1.4.7.orig/cipher/random.c 2006-11-03 18:09:39.000000000 +0800
33+++ gnupg-1.4.7/cipher/random.c 2014-01-23 11:31:53.993495462 +0800
34@@ -273,6 +273,18 @@
35 }
36
37
38+/* Randomize the MPI */
39+void
40+randomize_mpi (MPI mpi, size_t nbits, int level)
41+{
42+ unsigned char *buffer;
43+
44+ buffer = get_random_bits (nbits, level, mpi_is_secure (mpi));
45+ mpi_set_buffer (mpi, buffer, (nbits+7)/8, 0);
46+ xfree (buffer);
47+}
48+
49+
50 int
51 random_is_faked()
52 {
53Index: gnupg-1.4.7/cipher/random.h
54===================================================================
55--- gnupg-1.4.7.orig/cipher/random.h 2006-02-09 19:29:29.000000000 +0800
56+++ gnupg-1.4.7/cipher/random.h 2014-01-23 11:30:17.300915919 +0800
57@@ -32,6 +32,7 @@
58 int random_is_faked(void);
59 void random_disable_locking (void);
60 void randomize_buffer( byte *buffer, size_t length, int level );
61+void randomize_mpi (MPI mpi, size_t nbits, int level);
62 byte *get_random_bits( size_t nbits, int level, int secure );
63 void fast_random_poll( void );
64
65Index: gnupg-1.4.7/cipher/rsa.c
66===================================================================
67--- gnupg-1.4.7.orig/cipher/rsa.c 2006-12-12 03:09:00.000000000 +0800
68+++ gnupg-1.4.7/cipher/rsa.c 2014-01-23 11:35:04.330639125 +0800
69@@ -301,9 +301,26 @@
70 #if 0
71 mpi_powm( output, input, skey->d, skey->n );
72 #else
73- MPI m1 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
74- MPI m2 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
75- MPI h = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
76+ int nlimbs = mpi_get_nlimbs (skey->n)+1;
77+ MPI m1 = mpi_alloc_secure (nlimbs);
78+ MPI m2 = mpi_alloc_secure (nlimbs);
79+ MPI h = mpi_alloc_secure (nlimbs);
80+# if 1
81+ MPI bdata= mpi_alloc_secure (nlimbs);
82+ MPI r = mpi_alloc_secure (nlimbs);
83+# endif
84+
85+ /* Remove superfluous leading zeroes from INPUT. */
86+ mpi_normalize (input);
87+
88+# if 1
89+ /* Blind: bdata = (data * r^e) mod n */
90+ randomize_mpi (r, mpi_get_nbits (skey->n), 0);
91+ mpi_fdiv_r (r, r, skey->n);
92+ mpi_powm (bdata, r, skey->e, skey->n);
93+ mpi_mulm (bdata, bdata, input, skey->n);
94+ input = bdata;
95+# endif
96
97 /* m1 = c ^ (d mod (p-1)) mod p */
98 mpi_sub_ui( h, skey->p, 1 );
99@@ -321,8 +338,15 @@
100 /* m = m2 + h * p */
101 mpi_mul ( h, h, skey->p );
102 mpi_add ( output, m1, h );
103- /* ready */
104-
105+
106+# if 1
107+ mpi_free (bdata);
108+ /* Unblind: output = (output * r^(-1)) mod n */
109+ mpi_invm (r, r, skey->n);
110+ mpi_mulm (output, output, r, skey->n);
111+ mpi_free (r);
112+# endif
113+
114 mpi_free ( h );
115 mpi_free ( m1 );
116 mpi_free ( m2 );
117@@ -397,6 +421,7 @@
118 rsa_decrypt( int algo, MPI *result, MPI *data, MPI *skey )
119 {
120 RSA_secret_key sk;
121+ MPI input;
122
123 if( algo != 1 && algo != 2 )
124 return G10ERR_PUBKEY_ALGO;
125@@ -407,8 +432,14 @@
126 sk.p = skey[3];
127 sk.q = skey[4];
128 sk.u = skey[5];
129- *result = mpi_alloc_secure( mpi_get_nlimbs( sk.n ) );
130- secret( *result, data[0], &sk );
131+
132+ /* Mitigates side-channel attacks (CVE-2013-4576). */
133+ input = mpi_alloc (0);
134+ mpi_normalize (data[0]);
135+ mpi_fdiv_r (input, data[0], sk.n);
136+ *result = mpi_alloc_secure (mpi_get_nlimbs (sk.n));
137+ secret (*result, input, &sk);
138+ mpi_free (input);
139 return 0;
140 }
141
142Index: gnupg-1.4.7/g10/gpgv.c
143===================================================================
144--- gnupg-1.4.7.orig/g10/gpgv.c 2006-12-13 19:25:04.000000000 +0800
145+++ gnupg-1.4.7/g10/gpgv.c 2014-01-23 11:30:17.300915919 +0800
146@@ -390,6 +390,7 @@
147 void random_dump_stats(void) {}
148 int quick_random_gen( int onoff ) { return -1;}
149 void randomize_buffer( byte *buffer, size_t length, int level ) {}
150+void randomize_mpi (MPI mpi, size_t nbits, int level) {}
151 int random_is_faked() { return -1;}
152 byte *get_random_bits( size_t nbits, int level, int secure ) { return NULL;}
153 void set_random_seed_file( const char *name ) {}
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
new file mode 100644
index 0000000000..8b5d9a1693
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
@@ -0,0 +1,63 @@
1commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
2Author: Werner Koch <wk@gnupg.org>
3Date: Thu Dec 20 09:43:41 2012 +0100
4
5 gpg: Import only packets which are allowed in a keyblock.
6
7 * g10/import.c (valid_keyblock_packet): New.
8 (read_block): Store only valid packets.
9 --
10
11 A corrupted key, which for example included a mangled public key
12 encrypted packet, used to corrupt the keyring. This change skips all
13 packets which are not allowed in a keyblock.
14
15 GnuPG-bug-id: 1455
16
17 (cherry-picked from commit f795a0d59e197455f8723c300eebf59e09853efa)
18
19Upstream-Status: Backport
20
21Signed-off-by: Saul Wold <sgw@linux.intel.com>
22
23diff --git a/g10/import.c b/g10/import.c
24index bfe02eb..a57b32e 100644
25--- a/g10/import.c
26+++ b/g10/import.c
27@@ -384,6 +384,27 @@ import_print_stats (void *hd)
28 }
29
30
31+/* Return true if PKTTYPE is valid in a keyblock. */
32+static int
33+valid_keyblock_packet (int pkttype)
34+{
35+ switch (pkttype)
36+ {
37+ case PKT_PUBLIC_KEY:
38+ case PKT_PUBLIC_SUBKEY:
39+ case PKT_SECRET_KEY:
40+ case PKT_SECRET_SUBKEY:
41+ case PKT_SIGNATURE:
42+ case PKT_USER_ID:
43+ case PKT_ATTRIBUTE:
44+ case PKT_RING_TRUST:
45+ return 1;
46+ default:
47+ return 0;
48+ }
49+}
50+
51+
52 /****************
53 * Read the next keyblock from stream A.
54 * PENDING_PKT should be initialzed to NULL
55@@ -461,7 +482,7 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
56 }
57 in_cert = 1;
58 default:
59- if( in_cert ) {
60+ if (in_cert && valid_keyblock_packet (pkt->pkttype)) {
61 if( !root )
62 root = new_kbnode( pkt );
63 else
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
new file mode 100644
index 0000000000..e005ac658f
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
@@ -0,0 +1,17 @@
1
2Upstream-Status: Inappropriate [configuration]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: gnupg-1.4.7/configure.ac
7===================================================================
8--- gnupg-1.4.7.orig/configure.ac
9+++ gnupg-1.4.7/configure.ac
10@@ -827,7 +827,6 @@ else
11 AC_SUBST(USE_NLS)
12 AC_SUBST(USE_INCLUDED_LIBINTL)
13 AC_SUBST(BUILD_INCLUDED_LIBINTL)
14- AM_PO_SUBDIRS
15 fi
16
17 if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
new file mode 100644
index 0000000000..e5fb24aa63
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
@@ -0,0 +1,27 @@
1
2This has been discussed in a couple of different bug reported
3upstream:
4
5http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486250
6http://bugs.sourcemage.org/show_bug.cgi?id=14446
7
8Fix:
9http://lists.gnupg.org/pipermail/gnupg-devel/2008-April/024344.html
10
11Upstream-Status: Backport [Debian]
12
13Signed-off-by: Saul Wold <sgw@linux.intel.com>
14
15Index: gnupg-1.4.7/keyserver/gpgkeys_curl.c
16===================================================================
17--- gnupg-1.4.7.orig/keyserver/gpgkeys_curl.c
18+++ gnupg-1.4.7/keyserver/gpgkeys_curl.c
19@@ -286,7 +286,7 @@ main(int argc,char *argv[])
20 curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
21 }
22
23- curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
24+ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert);
25 curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
26
27 if(proxy)
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
new file mode 100644
index 0000000000..2855cab24b
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
@@ -0,0 +1,19 @@
1Orignal Patch came from OpenWrt via OE-Classic
2https://dev.openwrt.org/browser/packages/utils/gnupg/patches/001-mips_gcc4.4
3which is no longer a valid revision!
4
5Upstream-Status: Inappropriate [configuration]
6
7
8--- gnupg/mpi/longlong.h~ 2006-02-14 10:09:55.000000000 +0000
9+++ gnupg/mpi/longlong.h 2008-10-27 13:11:09.000000000 +0000
10@@ -181,7 +181,7 @@
11 /***************************************
12 ************** ARM ******************
13 ***************************************/
14-#if defined (__arm__) && W_TYPE_SIZE == 32
15+#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
16 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
17 __asm__ ("adds %1, %4, %5\n" \
18 "adc %0, %2, %3" \
19
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
new file mode 100644
index 0000000000..9a03b2b705
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
@@ -0,0 +1,50 @@
1
2From Openembedded-Classic
3
4 gnupg-1.4.10: Readd the ARM Thumb patch as debian has no thumb support
5
6
7Upstream-Status: Inappropriate [embedded-specific]
8
9Index: gnupg-1.4.10/mpi/longlong.h
10===================================================================
11--- gnupg-1.4.10.orig/mpi/longlong.h 2008-12-11 17:39:43.000000000 +0100
12+++ gnupg-1.4.10/mpi/longlong.h 2010-03-27 14:27:53.000000000 +0100
13@@ -706,18 +706,35 @@
14 #endif /* __m88110__ */
15 #endif /* __m88000__ */
16
17+/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
18+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
19+#define __GNUC_PREREQ(maj, min) \
20+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
21+#else
22+#define __GNUC_PREREQ(maj, min) 0
23+#endif
24+
25 /***************************************
26 ************** MIPS *****************
27 ***************************************/
28 #if defined (__mips__) && W_TYPE_SIZE == 32
29-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
30+#if __GNUC_PREREQ (4,4)
31+#define umul_ppmm(w1, w0, u, v) \
32+ do { \
33+ UDItype __ll = (UDItype)(u) * (v); \
34+ w1 = __ll >> 32; \
35+ w0 = __ll; \
36+ } while (0)
37+#endif
38+#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
39 #define umul_ppmm(w1, w0, u, v) \
40 __asm__ ("multu %2,%3" \
41 : "=l" ((USItype)(w0)), \
42 "=h" ((USItype)(w1)) \
43 : "d" ((USItype)(u)), \
44 "d" ((USItype)(v)))
45-#else
46+#endif
47+#if !defined (umul_ppmm)
48 #define umul_ppmm(w1, w0, u, v) \
49 __asm__ ("multu %2,%3 \n" \
50 "mflo %0 \n" \
diff --git a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
new file mode 100644
index 0000000000..ae92392dae
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
@@ -0,0 +1,86 @@
1Use pkg-config to find pth instead of pth-config.
2
3Upstream-Status: Rejected
4[not submitted but they've been clear they don't want a pkg-config dependency]
5
6RP 2014/5/22
7
8Index: gnupg-2.0.22/m4/gnupg-pth.m4
9===================================================================
10--- gnupg-2.0.22.orig/m4/gnupg-pth.m4 2013-10-04 12:32:53.000000000 +0000
11+++ gnupg-2.0.22/m4/gnupg-pth.m4 2014-05-13 21:33:21.000000000 +0000
12@@ -17,33 +17,9 @@
13 # Taken and modified from the m4 macros which come with Pth.
14 AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
15 [
16- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
17 _req_version="ifelse([$1],,1.2.0,$1)"
18+ PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no])
19
20- AC_MSG_CHECKING(for PTH - version >= $_req_version)
21- for _var in _pth_version _req_version; do
22- eval "_val=\"\$${_var}\""
23- _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
24- _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
25- _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
26- _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
27- case $_rtype in
28- "a" ) _rtype=0 ;;
29- "b" ) _rtype=1 ;;
30- "." ) _rtype=2 ;;
31- esac
32- _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
33- "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
34- eval "${_var}_hex=\"\$_hex\""
35- done
36- have_pth=no
37- if test ".$_pth_version_hex" != .; then
38- if test ".$_req_version_hex" != .; then
39- if test $_pth_version_hex -ge $_req_version_hex; then
40- have_pth=yes
41- fi
42- fi
43- fi
44 if test $have_pth = yes; then
45 AC_MSG_RESULT(yes)
46 AC_MSG_CHECKING([whether PTH installation is sane])
47@@ -51,9 +29,9 @@
48 _gnupg_pth_save_cflags=$CFLAGS
49 _gnupg_pth_save_ldflags=$LDFLAGS
50 _gnupg_pth_save_libs=$LIBS
51- CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
52- LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
53- LIBS="$LIBS `$PTH_CONFIG --libs --all`"
54+ CFLAGS="$CFLAGS $PTH_CFLAGS"
55+ LDFLAGS="$LDFLAGS $PTH_LDFLAGS"
56+ LIBS="$LIBS $PTH_LIBS"
57 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
58 ],
59 [[ pth_init ();]])],
60@@ -81,23 +59,11 @@
61 #
62 AC_DEFUN([GNUPG_PATH_PTH],
63+[
64-[ AC_ARG_WITH(pth-prefix,
65- AC_HELP_STRING([--with-pth-prefix=PFX],
66- [prefix where GNU Pth is installed]),
67- pth_config_prefix="$withval", pth_config_prefix="")
68- if test x$pth_config_prefix != x ; then
69- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
70- fi
71- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
72 tmp=ifelse([$1], ,1.3.7,$1)
73- if test "$PTH_CONFIG" != "no"; then
74- GNUPG_PTH_VERSION_CHECK($tmp)
75- if test $have_pth = yes; then
76- PTH_CFLAGS=`$PTH_CONFIG --cflags`
77- PTH_LIBS=`$PTH_CONFIG --ldflags`
78- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
79+ GNUPG_PTH_VERSION_CHECK($tmp)
80+ if test $have_pth = yes; then
81 AC_DEFINE(HAVE_PTH, 1,
82 [Defined if the GNU Pth is available])
83- fi
84 fi
85 AC_SUBST(PTH_CFLAGS)
86 AC_SUBST(PTH_LIBS)
diff --git a/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
new file mode 100644
index 0000000000..aef515d534
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -0,0 +1,102 @@
1SUMMARY = "GNU Privacy Guard - encryption and signing tools"
2HOMEPAGE = "http://www.gnupg.org/"
3DEPENDS = "zlib bzip2 readline"
4SECTION = "console/utils"
5
6LICENSE = "GPLv2"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
9
10PR = "r9"
11
12SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \
13 file://long-long-thumb.patch \
14 file://configure.patch \
15 file://mips_gcc4.4.patch \
16 file://GnuPG1-CVE-2012-6085.patch \
17 file://curl_typeof_fix_backport.patch \
18 file://CVE-2013-4351.patch \
19 file://CVE-2013-4576.patch \
20 file://CVE-2013-4242.patch \
21 "
22
23SRC_URI[md5sum] = "b06a141cca5cd1a55bbdd25ab833303c"
24SRC_URI[sha256sum] = "69d18b7d193f62ca27ed4febcb4c9044aa0c95305d3258fe902e2fae5fc6468d"
25
26inherit autotools gettext texinfo
27
28# --with-egd-socket=NAME use NAME for the EGD socket
29# --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer
30# --with-included-zlib use the zlib code included here
31# --with-capabilities use linux capabilities default=no
32# --with-mailprog=NAME use "NAME -t" for mail transport
33# --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
34# --without-libiconv-prefix don't search for libiconv in includedir and libdir
35# --with-included-gettext use the GNU gettext library included here
36# --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
37# --without-libintl-prefix don't search for libintl in includedir and libdir
38# --without-readline do not support fancy command line editing
39# --with-included-regex use the included GNU regex library
40# --with-zlib=DIR use libz in DIR
41# --with-bzip2=DIR look for bzip2 in DIR
42# --enable-static-rnd=egd|unix|linux|auto
43# --disable-dev-random disable the use of dev random
44# --disable-asm do not use assembler modules
45# --enable-m-guard enable memory guard facility
46# --enable-selinux-support
47# enable SELinux support
48# --disable-card-support disable OpenPGP card support
49# --disable-gnupg-iconv disable the new iconv code
50# --enable-backsigs enable the experimental backsigs code
51# --enable-minimal build the smallest gpg binary possible
52# --disable-rsa disable the RSA public key algorithm
53# --disable-idea disable the IDEA cipher
54# --disable-cast5 disable the CAST5 cipher
55# --disable-blowfish disable the BLOWFISH cipher
56# --disable-aes disable the AES, AES192, and AES256 ciphers
57# --disable-twofish disable the TWOFISH cipher
58# --disable-sha256 disable the SHA-256 digest
59# --disable-sha512 disable the SHA-384 and SHA-512 digests
60# --disable-bzip2 disable the BZIP2 compression algorithm
61# --disable-exec disable all external program execution
62# --disable-photo-viewers disable photo ID viewers
63# --disable-keyserver-helpers disable all external keyserver support
64# --disable-ldap disable LDAP keyserver interface
65# --disable-hkp disable HKP keyserver interface
66# --disable-http disable HTTP key fetching interface
67# --disable-finger disable Finger key fetching interface
68# --disable-mailto disable email keyserver interface
69# --disable-keyserver-path disable the exec-path option for keyserver helpers
70# --enable-key-cache=SIZE Set key cache to SIZE (default 4096)
71# --disable-largefile omit support for large files
72# --disable-dns-srv disable the use of DNS SRV in HKP and HTTP
73# --disable-nls do not use Native Language Support
74# --disable-regex do not handle regular expressions in trust sigs
75
76EXTRA_OECONF = "--disable-ldap \
77 --with-zlib=${STAGING_LIBDIR}/.. \
78 --with-bzip2=${STAGING_LIBDIR}/.. \
79 --disable-selinux-support \
80 --with-readline=${STAGING_LIBDIR}/.. \
81 ac_cv_sys_symbol_underscore=no \
82 "
83
84do_install () {
85 autotools_do_install
86 install -d ${D}${docdir}/${BPN}
87 mv ${D}${datadir}/${BPN}/* ${D}/${docdir}/${BPN}/ || :
88 mv ${D}${prefix}/doc/* ${D}/${docdir}/${BPN}/ || :
89}
90
91# split out gpgv from main package
92RDEPENDS_${PN} = "gpgv"
93PACKAGES =+ "gpgv"
94FILES_gpgv = "${bindir}/gpgv"
95
96# Exclude debug files from the main packages
97FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
98FILES_${PN}-dbg += "${libexecdir}/${BPN}/.debug"
99
100PACKAGECONFIG ??= ""
101PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR},--without-libcurl,curl"
102PACKAGECONFIG[libusb] = "--with-libusb=${STAGING_LIBDIR},--without-libusb,libusb-compat"
diff --git a/meta/recipes-support/gnupg/gnupg_2.0.26.bb b/meta/recipes-support/gnupg/gnupg_2.0.26.bb
new file mode 100644
index 0000000000..92dd3bd643
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg_2.0.26.bb
@@ -0,0 +1,39 @@
1SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
2HOMEPAGE = "http://www.gnupg.org/"
3LICENSE = "GPLv3 & LGPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
5 file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
6
7DEPENDS = "${PTH} libassuan libksba zlib bzip2 readline libgcrypt"
8PTH = "pth"
9PTH_libc-uclibc = "npth"
10
11inherit autotools gettext texinfo pkgconfig
12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
14 file://pkgconfig.patch"
15
16SRC_URI[md5sum] = "fa7e704aad33eb114d1840164455aec1"
17SRC_URI[sha256sum] = "7758e30dc382ae7a7167ed41b7f936aa50af5ea2d6fccdef663b5b750b65b8e0"
18
19EXTRA_OECONF = "--disable-ldap \
20 --disable-ccid-driver \
21 --without-libcurl \
22 --with-zlib=${STAGING_LIBDIR}/.. \
23 --with-bzip2=${STAGING_LIBDIR}/.. \
24 --with-readline=${STAGING_LIBDIR}/.. \
25 "
26RRECOMMENDS_${PN} = "pinentry"
27
28do_configure_prepend () {
29 # Else these could be used in prefernce to those in aclocal-copy
30 rm -f ${S}/m4/gpg-error.m4
31 rm -f ${S}/m4/libassuan.m4
32 rm -f ${S}/m4/ksba.m4
33 rm -f ${S}/m4/libgcrypt.m4
34}
35
36do_install_append() {
37 ln -sf gpg2 ${D}${bindir}/gpg
38 ln -sf gpgv2 ${D}${bindir}/gpgv
39}
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 0000000000..12b26cc97d
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,49 @@
1SUMMARY = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
4DEPENDS = "zlib nettle"
5
6LICENSE = "GPLv3+ & LGPLv2.1+"
7LICENSE_${PN} = "LGPLv2.1+"
8LICENSE_${PN}-xx = "LGPLv2.1+"
9LICENSE_${PN}-bin = "GPLv3+"
10LICENSE_${PN}-openssl = "GPLv3+"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
13 file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
14
15
16SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
17
18SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
19
20inherit autotools-brokensep texinfo binconfig pkgconfig gettext lib_package
21
22EXTRA_OECONF="--disable-rpath \
23 --with-included-libtasn1 \
24 --enable-local-libopts \
25 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
26 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} \
27 --disable-guile \
28 --disable-crywrap \
29 --without-p11-kit \
30 "
31
32do_configure_prepend() {
33 for dir in . lib; do
34 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
35 done
36}
37
38PACKAGECONFIG ??= ""
39PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers"
40
41PACKAGES =+ "${PN}-openssl ${PN}-xx"
42
43FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
44FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
45FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
46
47LDFLAGS_append_libc-uclibc += " -pthread"
48
49BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch
new file mode 100644
index 0000000000..8824729d2f
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch
@@ -0,0 +1,65 @@
1From 053ae65403216acdb0a4e78b25ad66ee9f444f02 Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3Date: Sat, 28 Mar 2015 22:41:03 +0100
4Subject: [PATCH] Better fix for the double free in dist point parsing
5
6Fixes CVE-2015-3308
7Upstream-Status: Backport
8
9Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
10---
11 lib/x509/x509_ext.c | 10 ++++++----
12 1 file changed, 6 insertions(+), 4 deletions(-)
13
14diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
15index 2e69ed0..f974b02 100644
16--- a/lib/x509/x509_ext.c
17+++ b/lib/x509/x509_ext.c
18@@ -2287,7 +2287,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
19 int len, ret;
20 uint8_t reasons[2];
21 unsigned i, type, rflags, j;
22- gnutls_datum_t san;
23+ gnutls_datum_t san = {NULL, 0};
24
25 result = asn1_create_element
26 (_gnutls_get_pkix(), "PKIX1.CRLDistributionPoints", &c2);
27@@ -2310,9 +2310,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
28
29 i = 0;
30 do {
31- san.data = NULL;
32- san.size = 0;
33-
34 snprintf(name, sizeof(name), "?%u.reasons", (unsigned)i + 1);
35
36 len = sizeof(reasons);
37@@ -2337,6 +2334,9 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
38
39 j = 0;
40 do {
41+ san.data = NULL;
42+ san.size = 0;
43+
44 ret =
45 _gnutls_parse_general_name2(c2, name, j, &san,
46 &type, 0);
47@@ -2351,6 +2351,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
48 ret = crl_dist_points_set(cdp, type, &san, rflags);
49 if (ret < 0)
50 break;
51+ san.data = NULL; /* it is now in cdp */
52
53 j++;
54 } while (ret >= 0);
55@@ -2360,6 +2361,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
56
57 if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
58 gnutls_assert();
59+ gnutls_free(san.data);
60 goto cleanup;
61 }
62
63--
641.9.1
65
diff --git a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
new file mode 100644
index 0000000000..5e452c52e7
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
@@ -0,0 +1,67 @@
1From ae3370788ed3447bba16969d9eb1bf1b9631e1b7 Mon Sep 17 00:00:00 2001
2From: Valentin Popa <valentin.popa@intel.com>
3Date: Fri, 25 Apr 2014 13:58:55 +0300
4Subject: [PATCH] Correct rpl_gettimeofday signature
5
6Currently we fail on uclibc like below
7
8| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
9| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26,
10| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392,
11| from ../../gl/signal.h:52,
12| from ../../gl/sys/select.h:58,
13| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220,
14| from ../../gl/sys/types.h:28,
15| from ../../lib/includes/gnutls/gnutls.h:46,
16| from ex-cxx.cpp:3:
17| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict'
18| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict'
19| make[4]: *** [ex-cxx.o] Error 1
20| make[4]: *** Waiting for unfinished jobs....
21
22GCC detects that we call 'restrict' as param name in function
23signatures and complains since both params are called 'restrict'
24therefore we use __restrict to denote the C99 keywork
25
26This only happens of uclibc since this code is not excercised with
27eglibc otherwise we will have same issue there too
28
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30
31Upstream-Status: Pending
32---
33 gl/sys_time.in.h | 8 ++++----
34 1 file changed, 4 insertions(+), 4 deletions(-)
35
36diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
37index 84a17c9..6ceadc3 100644
38--- a/gl/sys_time.in.h
39+++ b/gl/sys_time.in.h
40@@ -93,20 +93,20 @@ struct timeval
41 # define gettimeofday rpl_gettimeofday
42 # endif
43 _GL_FUNCDECL_RPL (gettimeofday, int,
44- (struct timeval *restrict, void *restrict)
45+ (struct timeval *__restrict, void *__restrict)
46 _GL_ARG_NONNULL ((1)));
47 _GL_CXXALIAS_RPL (gettimeofday, int,
48- (struct timeval *restrict, void *restrict));
49+ (struct timeval *__restrict, void *__restrict));
50 # else
51 # if !@HAVE_GETTIMEOFDAY@
52 _GL_FUNCDECL_SYS (gettimeofday, int,
53- (struct timeval *restrict, void *restrict)
54+ (struct timeval *__restrict, void *__restrict)
55 _GL_ARG_NONNULL ((1)));
56 # endif
57 /* Need to cast, because on glibc systems, by default, the second argument is
58 struct timezone *. */
59 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
60- (struct timeval *restrict, void *restrict));
61+ (struct timeval *__restrict, void *__restrict));
62 # endif
63 _GL_CXXALIASWARN (gettimeofday);
64 #elif defined GNULIB_POSIXCHECK
65--
661.9.1
67
diff --git a/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch
new file mode 100644
index 0000000000..628103ff6b
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch
@@ -0,0 +1,33 @@
1From d6972be33264ecc49a86cd0958209cd7363af1e9 Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3Date: Mon, 23 Mar 2015 22:55:29 +0100
4Subject: [PATCH] eliminated double-free in the parsing of dist points
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Reported by Robert Święcki.
10
11Fixes CVE-2015-3308
12Upstream-Status: Backport
13
14Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
15---
16 lib/x509/x509_ext.c | 1 -
17 1 file changed, 1 deletion(-)
18
19diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
20index c8d5867..6f09438 100644
21--- a/lib/x509/x509_ext.c
22+++ b/lib/x509/x509_ext.c
23@@ -2360,7 +2360,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
24
25 if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
26 gnutls_assert();
27- gnutls_free(san.data);
28 goto cleanup;
29 }
30
31--
321.9.1
33
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.5.bb b/meta/recipes-support/gnutls/gnutls_3.3.5.bb
new file mode 100644
index 0000000000..9f26470f41
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.3.5.bb
@@ -0,0 +1,9 @@
1require gnutls.inc
2
3SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
4 file://eliminated-double-free-CVE-2015-3308.patch \
5 file://better-fix-for-double-free-CVE-2015-3308.patch \
6 "
7
8SRC_URI[md5sum] = "1f396dcf3c14ea67de7243821006d1a2"
9SRC_URI[sha256sum] = "48f34ae032692c498e782e9f1369506572be40ecf7f3f3604b0b00bad1b10477"
diff --git a/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
new file mode 100644
index 0000000000..2ac89f3b32
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Inappropriate
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libtasn1-2.14/doc/Makefile.am libtasn1-2.14/doc/Makefile.am
5--- libtasn1-2.14/doc/Makefile.am 2012-09-24 15:08:42.000000000 +0300
6+++ libtasn1-2.14/doc/Makefile.am 2013-01-03 07:35:26.702763403 +0200
7@@ -31,7 +31,7 @@
8 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
9 --no-split --number-sections --css-include=texinfo.css
10
11-dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1
12+dist_man_MANS = $(gdoc_MANS)
13
14 HELP2MAN_OPTS = --info-page libtasn1
diff --git a/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch
new file mode 100644
index 0000000000..0989ef6a21
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch
@@ -0,0 +1,44 @@
1From f979435823a02f842c41d49cd41cc81f25b5d677 Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@redhat.com>
3Date: Mon, 20 Apr 2015 14:56:27 +0200
4Subject: [PATCH] _asn1_extract_der_octet: prevent past of boundary access
5
6Fixes CVE-2015-3622.
7Upstream-Status: Backport
8
9Reported by Hanno Böck.
10---
11 lib/decoding.c | 3 ++-
12 1 files changed, 2 insertions(+), 1 deletions(-)
13
14diff --git a/lib/decoding.c b/lib/decoding.c
15index 7fbd931..42ddc6b 100644
16--- a/lib/decoding.c
17+++ b/lib/decoding.c
18@@ -732,6 +732,7 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der,
19 return ASN1_DER_ERROR;
20
21 counter = len3 + 1;
22+ DECR_LEN(der_len, len3);
23
24 if (len2 == -1)
25 counter_end = der_len - 2;
26@@ -740,6 +741,7 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der,
27
28 while (counter < counter_end)
29 {
30+ DECR_LEN(der_len, 1);
31 len2 = asn1_get_length_der (der + counter, der_len, &len3);
32
33 if (IS_ERR(len2, flags))
34@@ -764,7 +766,6 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der,
35 len2 = 0;
36 }
37
38- DECR_LEN(der_len, 1);
39 counter += len2 + len3 + 1;
40 }
41
42--
431.7.2.5
44
diff --git a/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch
new file mode 100644
index 0000000000..5540bef940
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Pending
2
3This patch avoids following issues with automake 1.12:
4
5| automake: warnings are treated as errors
6| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libtasn1.la': linking libtool libraries using a non-POSIX
7| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/02
11
12
13Index: libtasn1-2.11/configure.ac
14===================================================================
15--- libtasn1-2.11.orig/configure.ac
16+++ libtasn1-2.11/configure.ac
17@@ -38,6 +38,11 @@ lgl_EARLY
18 AC_PROG_YACC
19 AC_PROG_LN_S
20
21+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
22+m4_pattern_allow([AM_PROG_AR])
23+AM_PROG_AR
24+
25+
26 dnl Checks for programs.
27 AC_PROG_INSTALL
28 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
diff --git a/meta/recipes-support/gnutls/libtasn1_4.0.bb b/meta/recipes-support/gnutls/libtasn1_4.0.bb
new file mode 100644
index 0000000000..16cf4d6812
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1_4.0.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Library for ASN.1 and DER manipulation"
2HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
3
4LICENSE = "GPLv3+ & LGPLv2.1+"
5LICENSE_${PN}-bin = "GPLv3+"
6LICENSE_${PN} = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
8 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
9 file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
10
11SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
12 file://libtasn1_fix_for_automake_1.12.patch \
13 file://dont-depend-on-help2man.patch \
14 file://libtasn1-CVE-2015-3622.patch \
15 "
16
17SRC_URI[md5sum] = "d3d2d9bce3b6668b9827a9df52635be1"
18SRC_URI[sha256sum] = "41d044f7644bdd1c4f8a5c15ac1885ca1fcbf32f5f6dd4760a19278b979857fe"
19
20inherit autotools texinfo binconfig lib_package
21
22BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch
new file mode 100644
index 0000000000..df0953069c
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch
@@ -0,0 +1,39 @@
1From 1.2.0, gpgme will check if gpgconf & g13(from 1.3.0) exist, and cause
2configure failure if not founding them in cross-compile environment. We can
3add the gnupg-native to get them, but still have some issues:
4
51. need add new package: libksba, update libassuan(not in sato), and extend
6 native support in some other packages(libgcrypt, libgpg-error, pth...)
72. Even we have gnupg, the g13 only exist in development branch, so that we
8 still have the g13 check failure in configure.
9
10I have searched the compile log, and found gpgconf/g13 are not used. So use a
11simple method here, throw a warning mesg rather than an error here just like in
12non-cross-compile environment.
13
14Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
15
16Upstream-Status: Inappropriate [embedded specific]
17
18Index: gpgme-1.3.0/configure.ac
19===================================================================
20--- gpgme-1.3.0.orig/configure.ac 2010-07-21 09:38:09.000000000 +0800
21+++ gpgme-1.3.0/configure.ac 2010-07-21 09:39:19.000000000 +0800
22@@ -574,7 +574,7 @@
23 *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
24 ***])
25 else
26- AC_MSG_ERROR([
27+ AC_MSG_WARN([
28 ***
29 *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
30 ***])
31@@ -670,7 +670,7 @@
32 *** Could not find g13, install g13 or use --with-g13=PATH to enable it
33 ***])
34 else
35- AC_MSG_ERROR([
36+ AC_MSG_WARN([
37 ***
38 *** Can not determine path to g13 when cross-compiling, use --with-g13=PATH
39 ***])
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch
new file mode 100644
index 0000000000..c728f58658
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Backport
2
3Backport patch to fix CVE-2014-3564.
4
5http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=2cbd76f7911fc215845e89b50d6af5ff4a83dd77
6
7Signed-off-by: Kai Kang <kai.kang@windriver.com>
8---
9From 2cbd76f7911fc215845e89b50d6af5ff4a83dd77 Mon Sep 17 00:00:00 2001
10From: Werner Koch <wk@gnupg.org>
11Date: Wed, 30 Jul 2014 11:04:55 +0200
12Subject: [PATCH 1/1] Fix possible realloc overflow for gpgsm and uiserver
13 engines.
14
15After a realloc (realloc is also used for initial alloc) the allocated
16size if the buffer is not correctly recorded. Thus an overflow can be
17introduced by receiving data with different line lengths in a specific
18order. This is not easy exploitable because libassuan constructs the
19line. However a crash has been reported and thus it might be possible
20to constructs an exploit.
21
22CVE-id: CVE-2014-3564
23Reported-by: Tomáš Trnka
24---
25 src/engine-gpgsm.c | 2 +-
26 src/engine-uiserver.c | 2 +-
27 3 files changed, 5 insertions(+), 2 deletions(-)
28
29diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c
30index 8ec1598..3a83757 100644
31--- a/src/engine-gpgsm.c
32+++ b/src/engine-gpgsm.c
33@@ -836,7 +836,7 @@ status_handler (void *opaque, int fd)
34 else
35 {
36 *aline = newline;
37- gpgsm->colon.attic.linesize += linelen + 1;
38+ gpgsm->colon.attic.linesize = *alinelen + linelen + 1;
39 }
40 }
41 if (!err)
42diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c
43index 2738c36..a7184b7 100644
44--- a/src/engine-uiserver.c
45+++ b/src/engine-uiserver.c
46@@ -698,7 +698,7 @@ status_handler (void *opaque, int fd)
47 else
48 {
49 *aline = newline;
50- uiserver->colon.attic.linesize += linelen + 1;
51+ uiserver->colon.attic.linesize = *alinelen + linelen + 1;
52 }
53 }
54 if (!err)
55--
562.1.4
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
new file mode 100644
index 0000000000..30a4d56d6e
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
@@ -0,0 +1,10 @@
1prefix=/usr
2libdir=${prefix}/lib
3includedir=${prefix}/include
4
5Name: gpgme
6Description: GNU Privacy Guard Made Easy
7Version: 1.4.3
8Requires:
9Libs: -L${libdir} -lgpgme -lassuan -lgpg-error
10Cflags: -I${includedir}
diff --git a/meta/recipes-support/gpgme/gpgme_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
new file mode 100644
index 0000000000..f16677e96e
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -0,0 +1,42 @@
1SUMMARY = "High-level GnuPG encryption/signing API"
2DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
3HOMEPAGE = "http://www.gnupg.org/gpgme.html"
4BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
5
6LICENSE = "GPLv2+ & LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8 file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
9 file://src/gpgme.h.in;endline=23;md5=dccb4bb624011e36513c61ef0422d054 \
10 file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
11
12SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
13 file://disable_gpgconf_check.patch \
14 file://gpgme.pc \
15 file://gpgme-fix-CVE-2014-3564.patch \
16 "
17
18SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
19SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"
20
21DEPENDS = "libgpg-error libassuan"
22
23EXTRA_OECONF = "--with-gpg=${bindir}/gpg --without-gpgsm"
24
25BINCONFIG = "${bindir}/gpgme-config"
26
27inherit autotools texinfo binconfig-disabled pkgconfig
28
29PACKAGES =+ "${PN}-pthread"
30FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
31FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
32
33do_configure_prepend () {
34 # Else these could be used in preference to those in aclocal-copy
35 rm -f ${S}/m4/gpg-error.m4
36 rm -f ${S}/m4/libassuan.m4
37}
38
39do_install_append () {
40 install -d ${D}${libdir}/pkgconfig
41 install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
42}
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
new file mode 100644
index 0000000000..15d002dbef
--- /dev/null
+++ b/meta/recipes-support/icu/icu.inc
@@ -0,0 +1,59 @@
1SUMMARY = "International Component for Unicode libraries"
2DESCRIPTION = "The International Component for Unicode (ICU) is a mature, portable set of C/C++ and Java libraries for Unicode support, software internationalization (I18N) and globalization (G11N), giving applications the same results on all platforms."
3HOMEPAGE = "http://site.icu-project.org/"
4
5LICENSE = "ICU"
6DEPENDS = "icu-native"
7DEPENDS_class-native = ""
8
9S = "${WORKDIR}/icu/source"
10SPDX_S = "${WORKDIR}/icu"
11STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
12
13PARALLEL_MAKE = ""
14CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0"
15
16BINCONFIG = "${bindir}/icu-config"
17
18inherit autotools pkgconfig binconfig
19
20# ICU needs the native build directory as an argument to its --with-cross-build option when
21# cross-compiling. Taken the situation that different builds may share a common sstate-cache
22# into consideration, the native build directory needs to be staged.
23EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
24EXTRA_OECONF_class-native = ""
25EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
26
27# ICU puts custom m4 autoconf functions in aclocal.m4.
28# However, this file is deleted in our build system.
29# To make it work, we copy aclocal.m4 to acinclude.m4.
30# This is a bug of ICU. See bug reference:
31# http://bugs.icu-project.org/trac/ticket/9790
32do_configure_prepend() {
33 [ -f ${S}/acinclude.m4 ] || cp ${S}/aclocal.m4 ${S}/acinclude.m4
34}
35
36do_install_append_class-native() {
37 mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
38 cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config
39 cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config
40 cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE}
41 cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE}
42 cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
43
44}
45
46PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio"
47
48FILES_${PN}-dev += "${libdir}/${BPN}/"
49
50FILES_libicudata = "${libdir}/libicudata.so.*"
51FILES_libicuuc = "${libdir}/libicuuc.so.*"
52FILES_libicui18n = "${libdir}/libicui18n.so.*"
53FILES_libicule = "${libdir}/libicule.so.*"
54FILES_libiculx = "${libdir}/libiculx.so.*"
55FILES_libicutu = "${libdir}/libicutu.so.*"
56FILES_libicuio = "${libdir}/libicuio.so.*"
57
58BBCLASSEXTEND = "native nativesdk"
59
diff --git a/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
new file mode 100644
index 0000000000..2968d571bb
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
@@ -0,0 +1,28 @@
1From 0c82d6aa02c08e41b13c83b14782bd7024e25d59 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 15 Feb 2014 21:06:42 +0000
4Subject: [PATCH] Disable LDFLAGSICUDT for Linux
5
6Upstream-Status: Inappropriate [ OE Configuration ]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 source/config/mh-linux | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/config/mh-linux b/config/mh-linux
14index 366f0cc..2689aab 100644
15--- a/config/mh-linux
16+++ b/config/mh-linux
17@@ -21,7 +21,7 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
18 LD_RPATH_PRE = -Wl,-rpath,
19
20 ## These are the library specific LDFLAGS
21-LDFLAGSICUDT=-nodefaultlibs -nostdlib
22+# LDFLAGSICUDT=-nodefaultlibs -nostdlib
23
24 ## Compiler switch to embed a library name
25 # The initial tab in the next line is to prevent icu-config from reading it.
26--
271.7.10.4
28
diff --git a/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch
new file mode 100644
index 0000000000..2460357f10
--- /dev/null
+++ b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch
@@ -0,0 +1,49 @@
1icu: CVE-2014-8146-CVE-2014-8147
2
3CVE-2014-8146 icu: heap overflow via incorrect isolateCount
4CVE-2014-8147 icu: integer truncation in the resolveImplicitLevels function
5
6References:
7[1] https://github.com/pedrib/PoC/raw/master/generic/i-c-u-fail.7z
8[2] https://www.kb.cert.org/vuls/id/602540
9[3] http://bugs.icu-project.org/trac/changeset/37080
10[4] http://bugs.icu-project.org/trac/changeset/37162
11
12Upstream-Status: Backport
13
14Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
15---
16diff -ruN a/common/ubidi.c b/common/ubidi.c
17--- a/common/ubidi.c 2014-10-03 18:11:20.000000000 +0200
18+++ b/common/ubidi.c 2015-08-28 08:22:39.455906194 +0200
19@@ -2138,7 +2138,7 @@
20 /* The isolates[] entries contain enough information to
21 resume the bidi algorithm in the same state as it was
22 when it was interrupted by an isolate sequence. */
23- if(dirProps[start]==PDI) {
24+ if(dirProps[start]==PDI && pBiDi->isolateCount >= 0) {
25 levState.startON=pBiDi->isolates[pBiDi->isolateCount].startON;
26 start1=pBiDi->isolates[pBiDi->isolateCount].start1;
27 stateImp=pBiDi->isolates[pBiDi->isolateCount].stateImp;
28diff -ruN a/common/ubidiimp.h b/common/ubidiimp.h
29--- a/common/ubidiimp.h 2014-10-03 18:11:16.000000000 +0200
30+++ b/common/ubidiimp.h 2015-08-28 08:28:24.069163845 +0200
31@@ -1,7 +1,7 @@
32 /*
33 ******************************************************************************
34 *
35-* Copyright (C) 1999-2014, International Business Machines
36+* Copyright (C) 1999-2015, International Business Machines
37 * Corporation and others. All Rights Reserved.
38 *
39 ******************************************************************************
40@@ -184,8 +184,8 @@
41 typedef struct Isolate {
42 int32_t startON;
43 int32_t start1;
44+ int32_t state;
45 int16_t stateImp;
46- int16_t state;
47 } Isolate;
48
49 typedef struct Run {
diff --git a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
new file mode 100644
index 0000000000..6e40659227
--- /dev/null
+++ b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
@@ -0,0 +1,29 @@
1pkgdata.cpp: use LARGE_BUFFER_MAX_SIZE for cmd
2
3Use LARGE_BUFFER_MAX_SIZE for cmd rather than SMALL_BUFFER_MAX_SIZE,
4otherwise there was a Segmentation fault error when the command line is
5long, this should be a misplay since other cmd uses
6LARGE_BUFFER_MAX_SIZE.
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 tools/pkgdata/pkgdata.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
16--- a/tools/pkgdata/pkgdata.cpp
17+++ b/tools/pkgdata/pkgdata.cpp
18@@ -1019,7 +1019,7 @@ normal_symlink_mode:
19
20 static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
21 int32_t result = 0;
22- char cmd[SMALL_BUFFER_MAX_SIZE];
23+ char cmd[LARGE_BUFFER_MAX_SIZE];
24
25 sprintf(cmd, "cd %s && %s %s %s%s%s",
26 targetDir,
27--
281.7.10.4
29
diff --git a/meta/recipes-support/icu/icu_53.1.bb b/meta/recipes-support/icu/icu_53.1.bb
new file mode 100644
index 0000000000..2906e8f864
--- /dev/null
+++ b/meta/recipes-support/icu/icu_53.1.bb
@@ -0,0 +1,22 @@
1require icu.inc
2
3LIC_FILES_CHKSUM = "file://../license.html;md5=8b139ac5b93769623bd343318048238c"
4
5def icu_download_version(d):
6 pvsplit = d.getVar('PV', True).split('.')
7 return pvsplit[0] + "_" + pvsplit[1]
8
9ICU_PV = "${@icu_download_version(d)}"
10
11BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
12SRC_URI = "${BASE_SRC_URI} \
13 file://icu-pkgdata-large-cmd.patch \
14 file://icu-CVE-2014-8146-CVE-2014-8147.patch \
15 "
16
17SRC_URI_append_class-target = "\
18 file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
19 "
20
21SRC_URI[md5sum] = "b73baa6fbdfef197608d1f69300919b9"
22SRC_URI[sha256sum] = "6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28"
diff --git a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
new file mode 100644
index 0000000000..f130d85652
--- /dev/null
+++ b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -0,0 +1,158 @@
1Add pkgconfig support to libassuan.
2This patch is rejected by upstream for the reason below:
3They think pkgconfig adds no portability and maintaining them is not worthwhile.
4
5Upstream-Status: Rejected
6Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
7Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
8
9Index: libassuan-2.1.2/Makefile.am
10===================================================================
11--- libassuan-2.1.2.orig/Makefile.am
12+++ libassuan-2.1.2/Makefile.am
13@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
14 # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
15 GITLOG_TO_CHANGELOG=gitlog-to-changelog
16
17+pkgconfigdir = $(libdir)/pkgconfig
18+pkgconfig_DATA = libassuan.pc
19+
20 EXTRA_DIST = autogen.sh autogen.rc README.GIT \
21 ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
22 tests/ChangeLog-2011 contrib/ChangeLog-2011 \
23- build-aux/git-log-footer build-aux/git-log-fix
24+ build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
25
26 SUBDIRS = m4 src doc tests
27
28Index: libassuan-2.1.2/libassuan.pc.in
29===================================================================
30--- /dev/null
31+++ libassuan-2.1.2/libassuan.pc.in
32@@ -0,0 +1,14 @@
33+prefix=@prefix@
34+exec_prefix=@exec_prefix@
35+libdir=@libdir@
36+includedir=@includedir@
37+api_version=@LIBASSUAN_CONFIG_API_VERSION@
38+host=@LIBASSUAN_CONFIG_HOST@
39+
40+Name: libassuan
41+Description: IPC library used by GnuPG and GPGME
42+Requires:
43+Version: @VERSION@
44+Libs: -L${libdir} -lassuan
45+Libs.private: -lgpg-error
46+Cflags: -I${includedir}
47Index: libassuan-2.1.2/configure.ac
48===================================================================
49--- libassuan-2.1.2.orig/configure.ac
50+++ libassuan-2.1.2/configure.ac
51@@ -439,7 +439,7 @@ AC_CONFIG_FILES([doc/Makefile])
52 AC_CONFIG_FILES([tests/Makefile])
53 AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
54 AC_CONFIG_FILES([src/versioninfo.rc])
55-
56+AC_CONFIG_FILES([libassuan.pc])
57 AC_OUTPUT
58
59 echo "
60Index: libassuan-2.1.2/src/libassuan.m4
61===================================================================
62--- libassuan-2.1.2.orig/src/libassuan.m4
63+++ libassuan-2.1.2/src/libassuan.m4
64@@ -15,18 +15,6 @@ dnl Returns ok set to yes or no.
65 dnl
66 AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
67 [ AC_REQUIRE([AC_CANONICAL_HOST])
68- AC_ARG_WITH(libassuan-prefix,
69- AC_HELP_STRING([--with-libassuan-prefix=PFX],
70- [prefix where LIBASSUAN is installed (optional)]),
71- libassuan_config_prefix="$withval", libassuan_config_prefix="")
72- if test x$libassuan_config_prefix != x ; then
73- libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
74- if test x${LIBASSUAN_CONFIG+set} != xset ; then
75- LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
76- fi
77- fi
78-
79- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
80
81 tmp=ifelse([$1], ,1:0.9.2,$1)
82 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
83@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
84 min_libassuan_version="$tmp"
85 fi
86
87- AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
88- ok=no
89- if test "$LIBASSUAN_CONFIG" != "no" \
90- && test -f "$LIBASSUAN_CONFIG" ; then
91- req_major=`echo $min_libassuan_version | \
92- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
93- req_minor=`echo $min_libassuan_version | \
94- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
95- req_micro=`echo $min_libassuan_version | \
96- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
97-
98- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
99- major=`echo $libassuan_config_version | \
100- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
101- minor=`echo $libassuan_config_version | \
102- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
103- micro=`echo $libassuan_config_version | \
104- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
105-
106- if test "$major" -gt "$req_major"; then
107- ok=yes
108- else
109- if test "$major" -eq "$req_major"; then
110- if test "$minor" -gt "$req_minor"; then
111- ok=yes
112- else
113- if test "$minor" -eq "$req_minor"; then
114- if test "$micro" -ge "$req_micro"; then
115- ok=yes
116- fi
117- fi
118- fi
119- fi
120- fi
121- fi
122-
123- if test $ok = yes; then
124- AC_MSG_RESULT([yes ($libassuan_config_version)])
125- else
126- AC_MSG_RESULT(no)
127- fi
128+ PKG_CHECK_MODULES(LIBASSUAN, [libassuan >= $min_libassuan_version], [ok=yes], [ok=no])
129
130 if test $ok = yes; then
131 if test "$req_libassuan_api" -gt 0 ; then
132 tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
133+ tmp=`$PKG_CONFIG --variable=api_version libassuan`
134 if test "$tmp" -gt 0 ; then
135 AC_MSG_CHECKING([LIBASSUAN API version])
136 if test "$req_libassuan_api" -eq "$tmp" ; then
137@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
138
139 if test $ok = yes; then
140 if test x"$host" != x ; then
141- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
142+ libassuan_config_host=`$PKG_CONFIG --variable=host libassuan`
143 if test x"$libassuan_config_host" != xnone ; then
144 if test x"$libassuan_config_host" != x"$host" ; then
145 AC_MSG_WARN([[
146@@ -137,12 +86,8 @@ dnl
147 AC_DEFUN([AM_PATH_LIBASSUAN],
148 [ _AM_PATH_LIBASSUAN_COMMON($1)
149 if test $ok = yes; then
150- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
151- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
152 ifelse([$2], , :, [$2])
153 else
154- LIBASSUAN_CFLAGS=""
155- LIBASSUAN_LIBS=""
156 ifelse([$3], , :, [$3])
157 fi
158 AC_SUBST(LIBASSUAN_CFLAGS)
diff --git a/meta/recipes-support/libassuan/libassuan_2.1.2.bb b/meta/recipes-support/libassuan/libassuan_2.1.2.bb
new file mode 100644
index 0000000000..97dec6a76a
--- /dev/null
+++ b/meta/recipes-support/libassuan/libassuan_2.1.2.bb
@@ -0,0 +1,26 @@
1SUMMARY = "IPC library used by GnuPG and GPGME"
2HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv3 & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
9 file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
10
11DEPENDS = "libgpg-error"
12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
14 file://libassuan-add-pkgconfig-support.patch"
15
16SRC_URI[md5sum] = "1dc4c3e1dbfb3939bfa2d72db8e136ba"
17SRC_URI[sha256sum] = "39f8a7c9349aaaf7ccd937b90660153ec4d2d4df2465018754e5bcae5b1db77b"
18
19BINCONFIG = "${bindir}/libassuan-config"
20
21inherit autotools texinfo binconfig-disabled pkgconfig
22
23do_configure_prepend () {
24 # Else these could be used in prefernce to those in aclocal-copy
25 rm -f ${S}/m4/*.m4
26}
diff --git a/meta/recipes-support/libbsd/libbsd_0.7.0.bb b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
new file mode 100644
index 0000000000..902666da7f
--- /dev/null
+++ b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
@@ -0,0 +1,21 @@
1# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Library of utility functions from BSD systems"
5DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
6 and lacking on others like GNU systems, thus making it easier to port \
7 projects with strong BSD origins, without needing to embed the same \
8 code over and over again on each project."
9
10HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
11LICENSE = "BSD-4-Clause & MIT"
12LIC_FILES_CHKSUM = "file://COPYING;md5=f1530ea92aeaa1c5e2547cfd43905d8c"
13SECTION = "libs"
14DEPENDS = ""
15
16SRC_URI = "http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
17
18SRC_URI[md5sum] = "fcceb4e66fd448ca4ed42ba22a8babb0"
19SRC_URI[sha256sum] = "0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb"
20
21inherit autotools pkgconfig
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
new file mode 100644
index 0000000000..0e28ea04a9
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -0,0 +1,70 @@
1SUMMARY = "Library for getting/setting POSIX.1e capabilities"
2HOMEPAGE = "http://sites.google.com/site/fullycapable/"
3
4# no specific GPL version required
5LICENSE = "BSD | GPLv2"
6LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
7
8DEPENDS = "perl-native-runtime"
9
10SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
11 file://fix-CAP_LAST_CAP.patch"
12
13PR = "r1"
14
15inherit lib_package
16
17# do NOT pass target cflags to host compilations
18#
19do_configure() {
20 # libcap uses := for compilers, fortunately, it gives us a hint
21 # on what should be replaced with ?=
22 sed -e 's,:=,?=,g' -i Make.Rules
23 sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
24
25 # disable gperf detection
26 sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
27}
28
29PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
30PACKAGECONFIG_class-native ??= ""
31
32PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
33PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
34
35EXTRA_OEMAKE += " \
36 INDENT= \
37 lib=${@os.path.basename('${libdir}')} \
38 RAISE_SETFCAP=no \
39"
40
41EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
42
43do_compile() {
44 oe_runmake ${EXTRA_OECONF}
45}
46
47do_install() {
48 oe_runmake install \
49 ${EXTRA_OECONF} \
50 DESTDIR="${D}" \
51 prefix="${prefix}" \
52 SBINDIR="${D}${sbindir}"
53}
54
55do_install_append() {
56 # Move the library to base_libdir
57 install -d ${D}${base_libdir}
58 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
59 mv ${D}${libdir}/* ${D}${base_libdir}
60 rmdir ${D}${libdir}
61 fi
62}
63
64FILES_${PN}-dev += "${base_libdir}/*.so"
65
66# pam files
67FILES_${PN} += "${base_libdir}/security/*.so"
68FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
69
70BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
new file mode 100644
index 0000000000..a5571883d3
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
@@ -0,0 +1,39 @@
1fix CAP_LAST_CAP
2
3Upstream-Status: pending
4
5Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into
6kernel, but libcap did not update them.
7Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and
8application always use capability.h from kernel, that will make cap_get_flag
9return wrong value.
10
11Signed-off-by: Roy Li <rongqing.li@windriver.com>
12---
13 libcap/include/linux/capability.h | 10 +++++++++-
14 1 file changed, 9 insertions(+), 1 deletion(-)
15
16diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h
17index 4924f2a..57026be 100644
18--- a/libcap/include/linux/capability.h
19+++ b/libcap/include/linux/capability.h
20@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data {
21 CAP_SYS_ADMIN is not acceptable anymore. */
22 #define CAP_SYSLOG 34
23
24-#define CAP_LAST_CAP CAP_SYSLOG
25+/* Allow triggering something that will wake the system */
26+
27+#define CAP_WAKE_ALARM 35
28+
29+/* Allow preventing system suspends */
30+
31+#define CAP_BLOCK_SUSPEND 36
32+
33+#define CAP_LAST_CAP CAP_BLOCK_SUSPEND
34
35 #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
36
37--
381.7.10.4
39
diff --git a/meta/recipes-support/libcap/libcap_2.22.bb b/meta/recipes-support/libcap/libcap_2.22.bb
new file mode 100644
index 0000000000..a989bb6a6b
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap_2.22.bb
@@ -0,0 +1,6 @@
1require libcap.inc
2
3PR = "r6"
4
5SRC_URI[md5sum] = "b4896816b626bea445f0b3849bdd4077"
6SRC_URI[sha256sum] = "e1cae65d8febf2579be37c255d2e058715785ead481a4e6a4357a06aff84721f"
diff --git a/meta/recipes-support/libcheck/libcheck_0.9.14.bb b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
new file mode 100644
index 0000000000..2a69ff7733
--- /dev/null
+++ b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Check - unit testing framework for C code"
2HOMEPAGE = "http://check.sourceforge.net/"
3SECTION = "devel"
4
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
9 "
10
11SRC_URI[md5sum] = "38263d115d784c17aa3b959ce94be8b8"
12SRC_URI[sha256sum] = "c272624645b1b738cf57fd5d81a3e4d9b722b99d6133ee3f3c4007d4d279840a"
13
14S = "${WORKDIR}/check-${PV}"
15
16inherit autotools pkgconfig texinfo
17
18CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
19
20RREPLACES_${PN} = "check (<= 0.9.5)"
21RDEPENDS_${PN} += "gawk"
22RDEPENDS_${PN}_class-native = ""
23
24BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
new file mode 100644
index 0000000000..278934e68d
--- /dev/null
+++ b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
2HOMEPAGE = "http://www.gnome.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2 & LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
7 file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
8 file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
9
10SECTION = "x11/utils"
11DEPENDS = "glib-2.0 libxml2 zlib"
12BBCLASSEXTEND = "native"
13EXTRA_OECONF += "--enable-Bsymbolic=auto"
14PR = "r1"
15
16BINCONFIG = "${bindir}/croco-0.6-config"
17
18inherit autotools-brokensep pkgconfig gnomebase gtk-doc binconfig-disabled
19
20GNOME_COMPRESS_TYPE = "xz"
21
22SRC_URI[archive.md5sum] = "767e73c4174f75b99695d4530fd9bb80"
23SRC_URI[archive.sha256sum] = "ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570"
diff --git a/meta/recipes-support/libdaemon/libdaemon_0.14.bb b/meta/recipes-support/libdaemon/libdaemon_0.14.bb
new file mode 100644
index 0000000000..e928781a4d
--- /dev/null
+++ b/meta/recipes-support/libdaemon/libdaemon_0.14.bb
@@ -0,0 +1,16 @@
1SUMMARY = "Lightweight C library which eases the writing of UNIX daemons"
2SECTION = "libs"
3AUTHOR = "Lennart Poettering <lennart@poettering.net>"
4HOMEPAGE = "http://0pointer.de/lennart/projects/libdaemon/"
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
7 file://libdaemon/daemon.h;beginline=9;endline=21;md5=bd9fbe57cd96d1a5848a8ba12d9a6bf4"
8
9SRC_URI = "http://0pointer.de/lennart/projects/libdaemon/libdaemon-${PV}.tar.gz"
10
11SRC_URI[md5sum] = "509dc27107c21bcd9fbf2f95f5669563"
12SRC_URI[sha256sum] = "fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834"
13
14inherit autotools pkgconfig
15
16EXTRA_OECONF = "--disable-lynx"
diff --git a/meta/recipes-support/libevdev/libevdev_1.2.2.bb b/meta/recipes-support/libevdev/libevdev_1.2.2.bb
new file mode 100644
index 0000000000..db4ffc6a5e
--- /dev/null
+++ b/meta/recipes-support/libevdev/libevdev_1.2.2.bb
@@ -0,0 +1,13 @@
1SUMMARY = "Wrapper library for evdev devices"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
3SECTION = "libs"
4
5LICENSE = "MIT-X"
6LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
7 file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
8
9SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
10SRC_URI[md5sum] = "7c1ee9c2069489b2a25dfde6f8e2ff6a"
11SRC_URI[sha256sum] = "860e9a1d5594393ff1f711cdeaf048efe354992019068408abbcfa4914ad6709"
12
13inherit autotools pkgconfig
diff --git a/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch b/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch
new file mode 100644
index 0000000000..5d2c69036b
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [disable feature]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libevent-2.0.21-stable/test/Makefile.am libevent-2.0.21-stable/test/Makefile.am
5--- libevent-2.0.21-stable/test/Makefile.am 2012-05-31 07:08:19.000000000 +0300
6+++ libevent-2.0.21-stable/test/Makefile.am 2013-02-08 02:06:20.227475872 +0200
7@@ -19,8 +19,6 @@
8 EXTRA_PROGRAMS = regress
9 noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h
10
11-TESTS = $(top_srcdir)/test/test.sh
12-
13 BUILT_SOURCES =
14 if BUILD_REGRESS
15 BUILT_SOURCES += regress.gen.c regress.gen.h
diff --git a/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch b/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..b55923220c
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3603774&group_id=50884&atid=461322]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libevent-2.0.21-stable/configure.in libevent-2.0.21-stable/configure.in
5--- libevent-2.0.21-stable/configure.in 2012-11-18 08:34:13.000000000 +0200
6+++ libevent-2.0.21-stable/configure.in 2013-02-08 02:03:58.403476183 +0200
7@@ -12,7 +12,7 @@
8 AC_CONFIG_MACRO_DIR([m4])
9
10 AM_INIT_AUTOMAKE(libevent,2.0.21-stable)
11-AM_CONFIG_HEADER(config.h)
12+AC_CONFIG_HEADERS(config.h)
13 AC_DEFINE(NUMERIC_VERSION, 0x02001500, [Numeric representation of the version])
14
15 dnl Initialize prefix.
diff --git a/meta/recipes-support/libevent/libevent_2.0.21.bb b/meta/recipes-support/libevent/libevent_2.0.21.bb
new file mode 100644
index 0000000000..5a1ff3b1b0
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent_2.0.21.bb
@@ -0,0 +1,26 @@
1SUMMARY = "An asynchronous event notification library"
2HOMEPAGE = "http://libevent.org/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=50884&atid=461322"
4SECTION = "libs"
5
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=45c5316ff684bcfe2f9f86d8b1279559"
8
9PR = "r1"
10
11SRC_URI = "http://github.com/downloads/libevent/libevent/${BPN}-${PV}-stable.tar.gz \
12 file://obsolete_automake_macros.patch \
13 file://disable_tests.patch \
14"
15
16SRC_URI[md5sum] = "b2405cc9ebf264aa47ff615d9de527a2"
17SRC_URI[sha256sum] = "22a530a8a5ba1cb9c080cba033206b17dacd21437762155c6d30ee6469f574f5"
18
19S = "${WORKDIR}/${BPN}-${PV}-stable"
20
21EXTRA_OECONF = "--disable-openssl"
22
23inherit autotools
24
25# Needed for Debian packaging
26LEAD_SONAME = "libevent-2.0.so"
diff --git a/meta/recipes-support/libexif/libexif_0.6.21.bb b/meta/recipes-support/libexif/libexif_0.6.21.bb
new file mode 100644
index 0000000000..cff4caede9
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif_0.6.21.bb
@@ -0,0 +1,17 @@
1SUMMARY = "Library for reading extended image information (EXIF) from JPEG files"
2HOMEPAGE = "http://sourceforge.net/projects/libexif"
3SECTION = "libs"
4LICENSE = "LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/libexif/libexif-${PV}.tar.bz2"
8
9SRC_URI[md5sum] = "27339b89850f28c8f1c237f233e05b27"
10SRC_URI[sha256sum] = "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
11
12inherit autotools gettext
13
14do_configure_append() {
15 sed -i s:doc\ binary:binary:g Makefile
16}
17
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
new file mode 100644
index 0000000000..5d39d1954d
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
@@ -0,0 +1,31 @@
1Fix make parallelism issue
2
3- remove pkginclude_HEADERS ( LIBFM_INCLUDES and LIBFM_GTK_INCLUDES
4variables are empty)
5- if we don't remove it then we will have a race condition between the code
6that tries to symlink ${includedir}/libfm-1.0 to ${includedir}/libfm and the
7am autogenerated code from the pkginclude_HEADERS definition which
8tries to create pkgincludedir (${includedir}/libfm);
9- if pkgincludedir is created before the symlink the symlink will be created
10in the ${includedir}/libfm dir and it will have libfm-1.0 as name which is
11wrong (we need the ${includedir}/libfm symlink for pcmanfm)
12
13Upstream-Status: Pending
14Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
15
16Index: libfm-1.1.0/src/Makefile.am
17===================================================================
18--- libfm-1.1.0.orig/src/Makefile.am
19+++ libfm-1.1.0/src/Makefile.am
20@@ -211,11 +211,6 @@ libfmgtkinclude_HEADERS = \
21 gtk/fm-gtk-marshal.h \
22 $(NULL)
23
24-pkginclude_HEADERS = \
25- $(LIBFM_INCLUDES) \
26- $(LIBFM_GTK_INCLUDES) \
27- $(NULL)
28-
29 EXTRA_LTLIBRARIES = libfm-gtk.la libfm-gtk3.la
30
31 lib_LTLIBRARIES = libfm.la @LIBFM_GTK_LTLIBRARIES@
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
new file mode 100644
index 0000000000..58a2f09d66
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Inappropriate [configuration]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libfm-1.1.2.2/configure.ac libfm-1.1.2.2/configure.ac
5--- libfm-1.1.2.2/configure.ac 2013-08-22 23:16:09.000000000 +0300
6+++ libfm-1.1.2.2/configure.ac 2013-10-25 01:35:18.110323079 +0300
7@@ -3,7 +3,7 @@
8
9 AC_PREREQ([2.63])
10 AC_INIT([libfm], [1.1.2.2], [http://pcmanfm.sourceforge.net/])
11-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
12+AM_INIT_AUTOMAKE([-Wall foreign])
13 AC_CONFIG_MACRO_DIR(m4)
14 AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-support/libfm/libfm_1.1.2.2.bb b/meta/recipes-support/libfm/libfm_1.1.2.2.bb
new file mode 100644
index 0000000000..10f31d9911
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm_1.1.2.2.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Library for file management"
2HOMEPAGE = "http://pcmanfm.sourceforge.net/"
3
4LICENSE = "GPLv2 & GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
6 file://src/fm.h;endline=22;md5=e64555171770a551e3b51cc06fc62f1a \
7 file://src/base/fm-config.h;endline=23;md5=ad0fc418c3cf041eea35ddb3daf37f17"
8
9SECTION = "x11/libs"
10DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.gz \
13 file://fix-make-parallelism-issue.patch \
14 file://ignore_automake_warnings.patch \
15 "
16
17SRC_URI[md5sum] = "ea3d09b23ef4c37cb84ae57ea16b8f08"
18SRC_URI[sha256sum] = "158e2b6974350d2dab15932b496bb4d448553e60bbf7cdfe4d6e9bd99d19d682"
19
20inherit autotools-brokensep pkgconfig gtk-doc
21
22do_configure[dirs] =+ "${S}/m4"
23
24PACKAGES += "${PN}-mime"
25FILES_${PN}-mime = "${datadir}/mime/"
diff --git a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
new file mode 100644
index 0000000000..82c93bd44d
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
@@ -0,0 +1,151 @@
1Add and use pkg-config for libgcrypt instead of -config scripts.
2
3Upstream-Status: Rejected [upstream have indicated they don't want a pkg-config dependency]
4
5RP 2014/5/22
6
7Index: libgcrypt-1.2.4/configure.ac
8===================================================================
9--- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000
10+++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000
11@@ -807,6 +807,7 @@
12 doc/Makefile
13 src/Makefile
14 src/gcrypt.h
15+src/libgcrypt.pc
16 src/libgcrypt-config
17 tests/Makefile
18 w32-dll/Makefile
19Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
20===================================================================
21--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
23@@ -0,0 +1,33 @@
24+# Process this file with autoconf to produce a pkg-config metadata file.
25+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
26+# Author: Simon Josefsson
27+#
28+# This file is free software; as a special exception the author gives
29+# unlimited permission to copy and/or distribute it, with or without
30+# modifications, as long as this notice is preserved.
31+#
32+# This file is distributed in the hope that it will be useful, but
33+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
34+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35+
36+prefix=@prefix@
37+exec_prefix=@exec_prefix@
38+libdir=@libdir@
39+includedir=@includedir@
40+
41+# API info
42+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
43+host=@LIBGCRYPT_CONFIG_HOST@
44+
45+# Misc information.
46+symmetric_ciphers=@LIBGCRYPT_CIPHERS@
47+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
48+digests=@LIBGCRYPT_DIGESTS@
49+
50+Name: libgcrypt
51+Description: GNU crypto library
52+URL: http://www.gnupg.org
53+Version: @VERSION@
54+Libs: -L${libdir} -lgcrypt
55+Libs.private: -L${libdir} -lgpg-error
56+Cflags: -I${includedir}
57Index: libgcrypt-1.6.1/src/libgcrypt.m4
58===================================================================
59--- libgcrypt-1.6.1.orig/src/libgcrypt.m4 2013-12-16 17:44:32.000000000 +0000
60+++ libgcrypt-1.6.1/src/libgcrypt.m4 2014-05-13 21:25:37.478389833 +0000
61@@ -22,17 +22,7 @@
62 dnl
63 AC_DEFUN([AM_PATH_LIBGCRYPT],
64 [ AC_REQUIRE([AC_CANONICAL_HOST])
65- AC_ARG_WITH(libgcrypt-prefix,
66- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
67- [prefix where LIBGCRYPT is installed (optional)]),
68- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
69- if test x$libgcrypt_config_prefix != x ; then
70- if test x${LIBGCRYPT_CONFIG+set} != xset ; then
71- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
72- fi
73- fi
74
75- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
76 tmp=ifelse([$1], ,1:1.2.0,$1)
77 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
78 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
79@@ -42,48 +32,13 @@
80 min_libgcrypt_version="$tmp"
81 fi
82
83- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
84- ok=no
85- if test "$LIBGCRYPT_CONFIG" != "no" ; then
86- req_major=`echo $min_libgcrypt_version | \
87- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
88- req_minor=`echo $min_libgcrypt_version | \
89- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
90- req_micro=`echo $min_libgcrypt_version | \
91- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
92- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
93- major=`echo $libgcrypt_config_version | \
94- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
95- minor=`echo $libgcrypt_config_version | \
96- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
97- micro=`echo $libgcrypt_config_version | \
98- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
99- if test "$major" -gt "$req_major"; then
100- ok=yes
101- else
102- if test "$major" -eq "$req_major"; then
103- if test "$minor" -gt "$req_minor"; then
104- ok=yes
105- else
106- if test "$minor" -eq "$req_minor"; then
107- if test "$micro" -ge "$req_micro"; then
108- ok=yes
109- fi
110- fi
111- fi
112- fi
113- fi
114- fi
115- if test $ok = yes; then
116- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
117- else
118- AC_MSG_RESULT(no)
119- fi
120+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
121+
122 if test $ok = yes; then
123 # If we have a recent libgcrypt, we should also check that the
124 # API is compatible
125 if test "$req_libgcrypt_api" -gt 0 ; then
126- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
127+ tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
128 if test "$tmp" -gt 0 ; then
129 AC_MSG_CHECKING([LIBGCRYPT API version])
130 if test "$req_libgcrypt_api" -eq "$tmp" ; then
131@@ -96,10 +51,8 @@
132 fi
133 fi
134 if test $ok = yes; then
135- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
136- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
137 ifelse([$2], , :, [$2])
138- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
139+ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
140 if test x"$libgcrypt_config_host" != xnone ; then
141 if test x"$libgcrypt_config_host" != x"$host" ; then
142 AC_MSG_WARN([[
143@@ -113,8 +66,6 @@
144 fi
145 fi
146 else
147- LIBGCRYPT_CFLAGS=""
148- LIBGCRYPT_LIBS=""
149 ifelse([$3], , :, [$3])
150 fi
151 AC_SUBST(LIBGCRYPT_CFLAGS)
diff --git a/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch b/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
new file mode 100644
index 0000000000..56c591f06e
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
@@ -0,0 +1,71 @@
1tests/bench-slope.c: workaround ICE failure on mips with '-O -g'
2
3Hit a ICE and could reduce it to the following minimal example:
4
51. Only the size of array assigned with 2 caused the issue:
6$ cat > mipgcc-test.c << END
7
8int main (int argc, char **argv)
9{
10 char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
11 int i = 0;
12
13 while(pStrArry[i] && i<ARRAY_SIZE_MAX)
14 {
15 printf("%s\n", pStrArry[i]);
16 i++;
17 }
18
19 return 0;
20}
21
22END
23
242. Only -O1 and -g on mips caused the issue:
25$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
26mipgcc-test.c: In function 'main':
27mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:20810
28 }
29 ^
30Please submit a full bug report,
31with preprocessed source if appropriate.
32See <http://gcc.gnu.org/bugs.html> for instructions
33
343. The quick workround is trying to enlarge the size of array with larger
35than 2.
36
374. File a bug to GNU, but it could not be reproduced on there environment.
38http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
39
40Upstream-Status: [oe specific]
41
42Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
43---
44 tests/bench-slope.c | 4 ++--
45 1 file changed, 2 insertions(+), 2 deletions(-)
46
47diff --git a/tests/bench-slope.c b/tests/bench-slope.c
48index bd05064..28c2438 100644
49--- a/tests/bench-slope.c
50+++ b/tests/bench-slope.c
51@@ -1197,7 +1197,7 @@ static struct bench_ops hash_ops = {
52 };
53
54
55-static struct bench_hash_mode hash_modes[] = {
56+static struct bench_hash_mode hash_modes[3] = {
57 {"", &hash_ops},
58 {0},
59 };
60@@ -1349,7 +1349,7 @@ static struct bench_ops mac_ops = {
61 };
62
63
64-static struct bench_mac_mode mac_modes[] = {
65+static struct bench_mac_mode mac_modes[3] = {
66 {"", &mac_ops},
67 {0},
68 };
69--
701.8.1.2
71
diff --git a/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch b/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch
new file mode 100644
index 0000000000..340087279d
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch
@@ -0,0 +1,169 @@
1Fix ARM assembly when building __PIC__
2
3* cipher/camellia-arm.S (GET_DATA_POINTER): New.
4(_gcry_camellia_arm_encrypt_block): Use GET_DATA_POINTER.
5(_gcry_camellia_arm_decrypt_block): Ditto.
6* cipher/cast5-arm.S (GET_DATA_POINTER): New.
7(_gcry_cast5_arm_encrypt_block, _gcry_cast5_arm_decrypt_block)
8(_gcry_cast5_arm_enc_blk2, _gcry_cast5_arm_dec_blk2): Use
9GET_DATA_POINTER.
10* cipher/rijndael-arm.S (GET_DATA_POINTER): New.
11(_gcry_aes_arm_encrypt_block, _gcry_aes_arm_decrypt_block): Use
12GET_DATA_POINTER.
13--
14
15Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
16
17Upstream-Status: Backport
18
19Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
20---
21 cipher/camellia-arm.S | 17 +++++++++++++++--
22 cipher/cast5-arm.S | 21 +++++++++++++++++----
23 cipher/rijndael-arm.S | 17 +++++++++++++++--
24 3 files changed, 47 insertions(+), 8 deletions(-)
25
26diff --git a/cipher/camellia-arm.S b/cipher/camellia-arm.S
27index c30d194..cdeaf8b 100644
28--- a/cipher/camellia-arm.S
29+++ b/cipher/camellia-arm.S
30@@ -28,6 +28,19 @@
31 .syntax unified
32 .arm
33
34+#ifdef __PIC__
35+# define GET_DATA_POINTER(reg, name, rtmp) \
36+ ldr reg, 1f; \
37+ ldr rtmp, 2f; \
38+ b 3f; \
39+ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \
40+ 2: .word name(GOT); \
41+ 3: add reg, pc, reg; \
42+ ldr reg, [reg, rtmp];
43+#else
44+# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name
45+#endif
46+
47 /* struct camellia_ctx: */
48 #define key_table 0
49
50@@ -261,7 +274,7 @@ _gcry_camellia_arm_encrypt_block:
51 */
52 push {%r1, %r4-%r11, %ip, %lr};
53
54- ldr RTAB1, =.Lcamellia_sp1110;
55+ GET_DATA_POINTER(RTAB1, .Lcamellia_sp1110, RTAB3);
56 mov RMASK, #0xff;
57 add RTAB3, RTAB1, #(2 * 4);
58 push {%r3};
59@@ -309,7 +322,7 @@ _gcry_camellia_arm_decrypt_block:
60 */
61 push {%r1, %r4-%r11, %ip, %lr};
62
63- ldr RTAB1, =.Lcamellia_sp1110;
64+ GET_DATA_POINTER(RTAB1, .Lcamellia_sp1110, RTAB3);
65 mov RMASK, #0xff;
66 add RTAB3, RTAB1, #(2 * 4);
67 mov RMASK, RMASK, lsl#4 /* byte mask */
68diff --git a/cipher/cast5-arm.S b/cipher/cast5-arm.S
69index ce7fa93..db96db4 100644
70--- a/cipher/cast5-arm.S
71+++ b/cipher/cast5-arm.S
72@@ -30,6 +30,19 @@
73
74 .extern _gcry_cast5_s1to4;
75
76+#ifdef __PIC__
77+# define GET_DATA_POINTER(reg, name, rtmp) \
78+ ldr reg, 1f; \
79+ ldr rtmp, 2f; \
80+ b 3f; \
81+ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \
82+ 2: .word name(GOT); \
83+ 3: add reg, pc, reg; \
84+ ldr reg, [reg, rtmp];
85+#else
86+# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name
87+#endif
88+
89 /* structure of crypto context */
90 #define Km 0
91 #define Kr (Km + (16 * 4))
92@@ -260,7 +273,7 @@ _gcry_cast5_arm_encrypt_block:
93 */
94 push {%r1, %r4-%r11, %ip, %lr};
95
96- ldr Rs1, =_gcry_cast5_s1to4;
97+ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2);
98 mov RMASK, #(0xff << 2);
99 add Rs2, Rs1, #(0x100*4);
100 add Rs3, Rs1, #(0x100*4*2);
101@@ -306,7 +319,7 @@ _gcry_cast5_arm_decrypt_block:
102 */
103 push {%r1, %r4-%r11, %ip, %lr};
104
105- ldr Rs1, =_gcry_cast5_s1to4;
106+ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2);
107 mov RMASK, #(0xff << 2);
108 add Rs2, Rs1, #(0x100 * 4);
109 add Rs3, Rs1, #(0x100 * 4 * 2);
110@@ -500,7 +513,7 @@ _gcry_cast5_arm_enc_blk2:
111 */
112 push {%lr};
113
114- ldr Rs1, =_gcry_cast5_s1to4;
115+ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2);
116 mov RMASK, #(0xff << 2);
117 add Rs2, Rs1, #(0x100 * 4);
118
119@@ -631,7 +644,7 @@ _gcry_cast5_arm_dec_blk2:
120 * [RR0, RL0], [RR1, RL1]: dst
121 */
122
123- ldr Rs1, =_gcry_cast5_s1to4;
124+ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2);
125 mov RMASK, #(0xff << 2);
126 add Rs2, Rs1, #(0x100 * 4);
127
128diff --git a/cipher/rijndael-arm.S b/cipher/rijndael-arm.S
129index 22c350c..421c3b4 100644
130--- a/cipher/rijndael-arm.S
131+++ b/cipher/rijndael-arm.S
132@@ -28,6 +28,19 @@
133 .syntax unified
134 .arm
135
136+#ifdef __PIC__
137+# define GET_DATA_POINTER(reg, name, rtmp) \
138+ ldr reg, 1f; \
139+ ldr rtmp, 2f; \
140+ b 3f; \
141+ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \
142+ 2: .word name(GOT); \
143+ 3: add reg, pc, reg; \
144+ ldr reg, [reg, rtmp];
145+#else
146+# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name
147+#endif
148+
149 /* register macros */
150 #define CTX %r0
151 #define RTAB %lr
152@@ -249,7 +262,7 @@ _gcry_aes_arm_encrypt_block:
153 2:
154 sub %sp, #16;
155
156- ldr RTAB, =.LtableE0;
157+ GET_DATA_POINTER(RTAB, .LtableE0, RMASK);
158
159 str %r1, [%sp, #4]; /* dst */
160 mov RMASK, #0xff;
161@@ -503,7 +516,7 @@ _gcry_aes_arm_decrypt_block:
162 2:
163 sub %sp, #16;
164
165- ldr RTAB, =.LtableD0;
166+ GET_DATA_POINTER(RTAB, .LtableD0, RMASK);
167
168 mov RMASK, #0xff;
169 str %r1, [%sp, #4]; /* dst */
diff --git a/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
new file mode 100644
index 0000000000..a3e540369c
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Pending
2
3libgcrypt: fix building error with '-O2' in sysroot path
4
5Characters like '-O2' or '-Ofast' will be replaced by '-O1' when compiling cipher.
6If we are cross compiling libgcrypt and sysroot contains such characters, we would
7get compile errors because the sysroot path has been modified.
8
9Fix this by adding blank spaces before and after the original matching pattern in the
10sed command.
11
12Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
13---
14 cipher/Makefile.am | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/cipher/Makefile.am b/cipher/Makefile.am
18index 76cdc96..9a89792 100644
19--- a/cipher/Makefile.am
20+++ b/cipher/Makefile.am
21@@ -69,7 +69,7 @@ rfc2268.c \
22 camellia.c camellia.h camellia-glue.c
23
24 if ENABLE_O_FLAG_MUNGING
25-o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
26+o_flag_munging = sed -e 's/ -O\([2-9s][2-9s]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
27 else
28 o_flag_munging = cat
29 endif
30--
311.7.9.5
32
diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
new file mode 100644
index 0000000000..43e0291a7b
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -0,0 +1,40 @@
1SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
2HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4SECTION = "libs"
5
6# helper program gcryptrnd and getrandom are under GPL, rest LGPL
7LICENSE = "GPLv2+ & LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
10
11DEPENDS = "libgpg-error libcap"
12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
14 file://add-pkgconfig-support.patch \
15 file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
16 file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \
17"
18
19BINCONFIG = "${bindir}/libgcrypt-config"
20
21inherit autotools-brokensep texinfo binconfig-disabled pkgconfig
22
23EXTRA_OECONF = "--disable-asm --with-capabilities"
24
25do_configure_prepend () {
26 # Else this could be used in preference to the one in aclocal-copy
27 rm -f ${S}/m4/gpg-error.m4
28}
29
30# libgcrypt.pc is added locally and thus installed here
31do_install_append() {
32 install -d ${D}/${libdir}/pkgconfig
33 install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
34}
35
36FILES_${PN}-dev += "${bindir}/dumpsexp ${bindir}/hmac256"
37
38ARM_INSTRUCTION_SET = "arm"
39
40BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
new file mode 100644
index 0000000000..903ed661ed
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
@@ -0,0 +1,6 @@
1require libgcrypt.inc
2
3SRC_URI += "file://libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch"
4
5SRC_URI[md5sum] = "d155aa1b06fa879175922ba28f6a6509"
6SRC_URI[sha256sum] = "7c1007197bef49c3b8740cf6af8b4eb4eb74c7a69796ebcf555d928c287255de"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch
new file mode 100644
index 0000000000..89c9d22bf2
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch
@@ -0,0 +1,132 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6Upstream-Status: Pending
7
8Index: libgpg-error-1.12/configure.ac
9===================================================================
10--- libgpg-error-1.12.orig/configure.ac 2014-05-13 21:14:26.846393236 +0000
11+++ libgpg-error-1.12/configure.ac 2014-05-13 21:14:26.926393236 +0000
12@@ -217,6 +217,7 @@
13 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
14 AC_CONFIG_FILES([src/versioninfo.rc])
15 AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
16+AC_CONFIG_FILES([src/gpg-error.pc])
17
18 AC_OUTPUT
19
20Index: libgpg-error-1.12/src/Makefile.am
21===================================================================
22--- libgpg-error-1.12.orig/src/Makefile.am 2014-05-13 21:14:26.846393236 +0000
23+++ libgpg-error-1.12/src/Makefile.am 2014-05-13 21:14:26.934393236 +0000
24@@ -37,13 +37,15 @@
25 bin_SCRIPTS = gpg-error-config
26 m4datadir = $(datadir)/aclocal
27 m4data_DATA = gpg-error.m4
28+pkgconfigdir = $(libdir)/pkgconfig
29+pkgconfig_DATA = gpg-error.pc
30
31 EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
32 mkerrnos.awk errnos.in README \
33 mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
34 mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
35 err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
36- gpg-error.def.in versioninfo.rc.in
37+ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in
38
39 BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
40 err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
41Index: libgpg-error-1.12/src/gpg-error.pc.in
42===================================================================
43--- /dev/null 1970-01-01 00:00:00.000000000 +0000
44+++ libgpg-error-1.12/src/gpg-error.pc.in 2014-05-13 21:48:20.266382916 +0000
45@@ -0,0 +1,11 @@
46+prefix=@prefix@
47+exec_prefix=@exec_prefix@
48+libdir=@libdir@
49+includedir=@includedir@
50+host=@GPG_ERROR_CONFIG_HOST@
51+
52+Name: gpg-error
53+Description: a library that defines common error values for all GnuPG components
54+Version: @VERSION@
55+Libs: -L${libdir} -lgpg-error
56+Cflags: -I${includedir}
57Index: libgpg-error-1.12/src/gpg-error.m4
58===================================================================
59--- libgpg-error-1.12.orig/src/gpg-error.m4 2014-05-13 21:45:02.038383922 +0000
60+++ libgpg-error-1.12/src/gpg-error.m4 2014-05-13 21:47:08.362383281 +0000
61@@ -15,58 +15,14 @@
62 dnl
63 AC_DEFUN([AM_PATH_GPG_ERROR],
64 [ AC_REQUIRE([AC_CANONICAL_HOST])
65- gpg_error_config_prefix=""
66- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
67- dnl since that is consistent with how our three siblings use the directory/
68- dnl package name in --with-$dir_name-prefix=PFX.
69- AC_ARG_WITH(libgpg-error-prefix,
70- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
71- [prefix where GPG Error is installed (optional)]),
72- [gpg_error_config_prefix="$withval"])
73
74- dnl Accept --with-gpg-error-prefix and make it work the same as
75- dnl --with-libgpg-error-prefix above, for backwards compatibility,
76- dnl but do not document this old, inconsistently-named option.
77- AC_ARG_WITH(gpg-error-prefix,,
78- [gpg_error_config_prefix="$withval"])
79+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
80
81- if test x$gpg_error_config_prefix != x ; then
82- if test x${GPG_ERROR_CONFIG+set} != xset ; then
83- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
84- fi
85- fi
86+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
87
88- AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no)
89- min_gpg_error_version=ifelse([$1], ,0.0,$1)
90- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
91- ok=no
92- if test "$GPG_ERROR_CONFIG" != "no" \
93- && test -f "$GPG_ERROR_CONFIG" ; then
94- req_major=`echo $min_gpg_error_version | \
95- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
96- req_minor=`echo $min_gpg_error_version | \
97- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
98- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
99- major=`echo $gpg_error_config_version | \
100- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
101- minor=`echo $gpg_error_config_version | \
102- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
103- if test "$major" -gt "$req_major"; then
104- ok=yes
105- else
106- if test "$major" -eq "$req_major"; then
107- if test "$minor" -ge "$req_minor"; then
108- ok=yes
109- fi
110- fi
111- fi
112- fi
113 if test $ok = yes; then
114- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
115- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
116- AC_MSG_RESULT([yes ($gpg_error_config_version)])
117 ifelse([$2], , :, [$2])
118- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
119+ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error`
120 if test x"$gpg_error_config_host" != xnone ; then
121 if test x"$gpg_error_config_host" != x"$host" ; then
122 AC_MSG_WARN([[
123@@ -80,9 +36,6 @@
124 fi
125 fi
126 else
127- GPG_ERROR_CFLAGS=""
128- GPG_ERROR_LIBS=""
129- AC_MSG_RESULT(no)
130 ifelse([$3], , :, [$3])
131 fi
132 AC_SUBST(GPG_ERROR_CFLAGS)
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
new file mode 100644
index 0000000000..af9574d8fd
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Small library that defines common error values for all GnuPG components"
2HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/gpg-error.h.in;endline=23;md5=6ac0378874589a44d53512b3786b4bc0 \
9 file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c"
10
11
12SECTION = "libs"
13
14SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
15 file://pkgconfig.patch"
16
17SRC_URI[md5sum] = "8f0eb41a344d19ac2aa9bd101dfb9ce6"
18SRC_URI[sha256sum] = "cafc9ed6a87c53a35175d5a1220a96ca386696eef2fa059cc0306211f246e55f"
19
20BINCONFIG = "${bindir}/gpg-error-config"
21
22inherit autotools binconfig-disabled pkgconfig gettext
23
24FILES_${PN}-dev += "${bindir}/gpg-error"
25
26do_install_append() {
27 # we don't have common lisp in OE
28 rm -rf "${D}${datadir}/common-lisp/"
29}
30
31BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libical/libical_1.0.0.bb b/meta/recipes-support/libical/libical_1.0.0.bb
new file mode 100644
index 0000000000..07b549ecf2
--- /dev/null
+++ b/meta/recipes-support/libical/libical_1.0.0.bb
@@ -0,0 +1,13 @@
1SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
2HOMEPAGE = "https://github.com/libical/libical"
3BUGTRACKER = "https://github.com/libical/libical/issues"
4LICENSE = "LGPLv2.1 | MPL-1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
6 file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
7SECTION = "libs"
8
9SRC_URI = "https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz"
10SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36"
11SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2"
12
13inherit autotools
diff --git a/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
new file mode 100644
index 0000000000..3cbf549d48
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
@@ -0,0 +1,50 @@
1It adds the variables that are needed
2for autoconf 2.65 to reconfigure libiconv and defines the m4 macros
3directory. Its imported from OE.
4
5Upstream-Status: Pending
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Index: libiconv-1.11.1/configure.ac
10===================================================================
11--- libiconv-1.11.1.orig/configure.ac
12+++ libiconv-1.11.1/configure.ac
13@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR(build-aux)
14 AM_INIT_AUTOMAKE(libiconv, 1.11)
15 AC_CONFIG_HEADERS(config.h lib/config.h)
16 AC_PROG_MAKE_SET
17-
18+AC_CONFIG_MACRO_DIR([m4])
19 dnl checks for basic programs
20
21 AC_PROG_CC
22Index: libiconv-1.11.1/libcharset/configure.ac
23===================================================================
24--- libiconv-1.11.1.orig/libcharset/configure.ac
25+++ libiconv-1.11.1/libcharset/configure.ac
26@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
27 dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
28 dnl Fifth Floor, Boston, MA 02110-1301, USA.
29
30-AC_PREREQ(2.13)
31+AC_PREREQ(2.61)
32+AC_INIT([libcharset],[1.4] )
33+AC_CONFIG_SRCDIR([lib/localcharset.c])
34
35-PACKAGE=libcharset
36-VERSION=1.4
37-
38-AC_INIT(lib/localcharset.c)
39 AC_CONFIG_AUX_DIR(build-aux)
40 AC_CONFIG_HEADER(config.h)
41 AC_PROG_MAKE_SET
42-AC_SUBST(PACKAGE)
43-AC_SUBST(VERSION)
44+dnl AC_SUBST(PACKAGE)
45+dnl AC_SUBST(VERSION)
46+
47+AC_CONFIG_MACRO_DIR([m4])
48
49 dnl checks for basic programs
50
diff --git a/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
new file mode 100644
index 0000000000..fb07f7366b
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
@@ -0,0 +1,26 @@
1With libtool generating shared and static version of libraries needs -fPIC flags
2without this it will not generate the commands to create shared linked library
3Its more enforced by libtool 2.4. I have not checked it with older libtool
4libiconv 1.11.x is relatively old release and libtool 2.4 did not exist when it
5was released these kind of problem are more likely
6
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Index: libiconv-1.11.1/lib/Makefile.in
12===================================================================
13--- libiconv-1.11.1.orig/lib/Makefile.in
14+++ libiconv-1.11.1/lib/Makefile.in
15@@ -70,9 +70,9 @@ preloadable_libiconv.so : preloadable_li
16
17 preloadable_libiconv_linux.so : $(SOURCES)
18 if test -n "@GCC@"; then \
19- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
20+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
21 else \
22- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
23+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
24 fi
25
26 preloadable_libiconv_solaris.so : $(SOURCES)
diff --git a/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch b/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
new file mode 100644
index 0000000000..6af377b4cc
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
@@ -0,0 +1,5008 @@
1This patch is needed to solve issues like
2| iconv.o: In function `main':
3| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/src/./iconv.c:861: undefined reference to `relocate'
4| ../srclib/libicrt.a(progreloc.o): In function `prepare_relocate':
5| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:297: undefined reference to `compute_curr_prefix'
6| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:302: undefined reference to `set_relocation_prefix'
7| collect2: ld returned 1 exit status
8| make[1]: *** [install] Error 1
9
10Upstream-Status: Inappropriate [OE config specific]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14diff -Naurp libiconv-1.14.org//build-aux/arg-nonnull.h libiconv-1.14/build-aux/arg-nonnull.h
15--- libiconv-1.14.org//build-aux/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
16+++ libiconv-1.14/build-aux/arg-nonnull.h 2012-01-08 02:07:39.930484438 -0800
17@@ -0,0 +1,26 @@
18+/* A C macro for declaring that specific arguments must not be NULL.
19+ Copyright (C) 2009-2011 Free Software Foundation, Inc.
20+
21+ This program is free software: you can redistribute it and/or modify it
22+ under the terms of the GNU General Public License as published
23+ by the Free Software Foundation; either version 3 of the License, or
24+ (at your option) any later version.
25+
26+ This program is distributed in the hope that it will be useful,
27+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29+ General Public License for more details.
30+
31+ You should have received a copy of the GNU General Public License
32+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
33+
34+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
35+ that the values passed as arguments n, ..., m must be non-NULL pointers.
36+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
37+#ifndef _GL_ARG_NONNULL
38+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
39+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
40+# else
41+# define _GL_ARG_NONNULL(params)
42+# endif
43+#endif
44diff -Naurp libiconv-1.14.org//build-aux/c++defs.h libiconv-1.14/build-aux/c++defs.h
45--- libiconv-1.14.org//build-aux/c++defs.h 1969-12-31 16:00:00.000000000 -0800
46+++ libiconv-1.14/build-aux/c++defs.h 2012-01-08 02:07:39.942484438 -0800
47@@ -0,0 +1,271 @@
48+/* C++ compatible function declaration macros.
49+ Copyright (C) 2010-2011 Free Software Foundation, Inc.
50+
51+ This program is free software: you can redistribute it and/or modify it
52+ under the terms of the GNU General Public License as published
53+ by the Free Software Foundation; either version 3 of the License, or
54+ (at your option) any later version.
55+
56+ This program is distributed in the hope that it will be useful,
57+ but WITHOUT ANY WARRANTY; without even the implied warranty of
58+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
59+ General Public License for more details.
60+
61+ You should have received a copy of the GNU General Public License
62+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
63+
64+#ifndef _GL_CXXDEFS_H
65+#define _GL_CXXDEFS_H
66+
67+/* The three most frequent use cases of these macros are:
68+
69+ * For providing a substitute for a function that is missing on some
70+ platforms, but is declared and works fine on the platforms on which
71+ it exists:
72+
73+ #if @GNULIB_FOO@
74+ # if !@HAVE_FOO@
75+ _GL_FUNCDECL_SYS (foo, ...);
76+ # endif
77+ _GL_CXXALIAS_SYS (foo, ...);
78+ _GL_CXXALIASWARN (foo);
79+ #elif defined GNULIB_POSIXCHECK
80+ ...
81+ #endif
82+
83+ * For providing a replacement for a function that exists on all platforms,
84+ but is broken/insufficient and needs to be replaced on some platforms:
85+
86+ #if @GNULIB_FOO@
87+ # if @REPLACE_FOO@
88+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
89+ # undef foo
90+ # define foo rpl_foo
91+ # endif
92+ _GL_FUNCDECL_RPL (foo, ...);
93+ _GL_CXXALIAS_RPL (foo, ...);
94+ # else
95+ _GL_CXXALIAS_SYS (foo, ...);
96+ # endif
97+ _GL_CXXALIASWARN (foo);
98+ #elif defined GNULIB_POSIXCHECK
99+ ...
100+ #endif
101+
102+ * For providing a replacement for a function that exists on some platforms
103+ but is broken/insufficient and needs to be replaced on some of them and
104+ is additionally either missing or undeclared on some other platforms:
105+
106+ #if @GNULIB_FOO@
107+ # if @REPLACE_FOO@
108+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
109+ # undef foo
110+ # define foo rpl_foo
111+ # endif
112+ _GL_FUNCDECL_RPL (foo, ...);
113+ _GL_CXXALIAS_RPL (foo, ...);
114+ # else
115+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
116+ _GL_FUNCDECL_SYS (foo, ...);
117+ # endif
118+ _GL_CXXALIAS_SYS (foo, ...);
119+ # endif
120+ _GL_CXXALIASWARN (foo);
121+ #elif defined GNULIB_POSIXCHECK
122+ ...
123+ #endif
124+*/
125+
126+/* _GL_EXTERN_C declaration;
127+ performs the declaration with C linkage. */
128+#if defined __cplusplus
129+# define _GL_EXTERN_C extern "C"
130+#else
131+# define _GL_EXTERN_C extern
132+#endif
133+
134+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
135+ declares a replacement function, named rpl_func, with the given prototype,
136+ consisting of return type, parameters, and attributes.
137+ Example:
138+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
139+ _GL_ARG_NONNULL ((1)));
140+ */
141+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
142+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
143+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
144+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes
145+
146+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
147+ declares the system function, named func, with the given prototype,
148+ consisting of return type, parameters, and attributes.
149+ Example:
150+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
151+ _GL_ARG_NONNULL ((1)));
152+ */
153+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
154+ _GL_EXTERN_C rettype func parameters_and_attributes
155+
156+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
157+ declares a C++ alias called GNULIB_NAMESPACE::func
158+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
159+ Example:
160+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
161+ */
162+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
163+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
164+#if defined __cplusplus && defined GNULIB_NAMESPACE
165+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
166+ namespace GNULIB_NAMESPACE \
167+ { \
168+ rettype (*const func) parameters = ::rpl_func; \
169+ } \
170+ _GL_EXTERN_C int _gl_cxxalias_dummy
171+#else
172+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
173+ _GL_EXTERN_C int _gl_cxxalias_dummy
174+#endif
175+
176+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
177+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
178+ except that the C function rpl_func may have a slightly different
179+ declaration. A cast is used to silence the "invalid conversion" error
180+ that would otherwise occur. */
181+#if defined __cplusplus && defined GNULIB_NAMESPACE
182+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
183+ namespace GNULIB_NAMESPACE \
184+ { \
185+ rettype (*const func) parameters = \
186+ reinterpret_cast<rettype(*)parameters>(::rpl_func); \
187+ } \
188+ _GL_EXTERN_C int _gl_cxxalias_dummy
189+#else
190+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
191+ _GL_EXTERN_C int _gl_cxxalias_dummy
192+#endif
193+
194+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
195+ declares a C++ alias called GNULIB_NAMESPACE::func
196+ that redirects to the system provided function func, if GNULIB_NAMESPACE
197+ is defined.
198+ Example:
199+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
200+ */
201+#if defined __cplusplus && defined GNULIB_NAMESPACE
202+ /* If we were to write
203+ rettype (*const func) parameters = ::func;
204+ like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
205+ better (remove an indirection through a 'static' pointer variable),
206+ but then the _GL_CXXALIASWARN macro below would cause a warning not only
207+ for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
208+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
209+ namespace GNULIB_NAMESPACE \
210+ { \
211+ static rettype (*func) parameters = ::func; \
212+ } \
213+ _GL_EXTERN_C int _gl_cxxalias_dummy
214+#else
215+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
216+ _GL_EXTERN_C int _gl_cxxalias_dummy
217+#endif
218+
219+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
220+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
221+ except that the C function func may have a slightly different declaration.
222+ A cast is used to silence the "invalid conversion" error that would
223+ otherwise occur. */
224+#if defined __cplusplus && defined GNULIB_NAMESPACE
225+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
226+ namespace GNULIB_NAMESPACE \
227+ { \
228+ static rettype (*func) parameters = \
229+ reinterpret_cast<rettype(*)parameters>(::func); \
230+ } \
231+ _GL_EXTERN_C int _gl_cxxalias_dummy
232+#else
233+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
234+ _GL_EXTERN_C int _gl_cxxalias_dummy
235+#endif
236+
237+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
238+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
239+ except that the C function is picked among a set of overloaded functions,
240+ namely the one with rettype2 and parameters2. Two consecutive casts
241+ are used to silence the "cannot find a match" and "invalid conversion"
242+ errors that would otherwise occur. */
243+#if defined __cplusplus && defined GNULIB_NAMESPACE
244+ /* The outer cast must be a reinterpret_cast.
245+ The inner cast: When the function is defined as a set of overloaded
246+ functions, it works as a static_cast<>, choosing the designated variant.
247+ When the function is defined as a single variant, it works as a
248+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */
249+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
250+ namespace GNULIB_NAMESPACE \
251+ { \
252+ static rettype (*func) parameters = \
253+ reinterpret_cast<rettype(*)parameters>( \
254+ (rettype2(*)parameters2)(::func)); \
255+ } \
256+ _GL_EXTERN_C int _gl_cxxalias_dummy
257+#else
258+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
259+ _GL_EXTERN_C int _gl_cxxalias_dummy
260+#endif
261+
262+/* _GL_CXXALIASWARN (func);
263+ causes a warning to be emitted when ::func is used but not when
264+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded
265+ variants. */
266+#if defined __cplusplus && defined GNULIB_NAMESPACE
267+# define _GL_CXXALIASWARN(func) \
268+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
269+# define _GL_CXXALIASWARN_1(func,namespace) \
270+ _GL_CXXALIASWARN_2 (func, namespace)
271+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
272+ we enable the warning only when not optimizing. */
273+# if !__OPTIMIZE__
274+# define _GL_CXXALIASWARN_2(func,namespace) \
275+ _GL_WARN_ON_USE (func, \
276+ "The symbol ::" #func " refers to the system function. " \
277+ "Use " #namespace "::" #func " instead.")
278+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
279+# define _GL_CXXALIASWARN_2(func,namespace) \
280+ extern __typeof__ (func) func
281+# else
282+# define _GL_CXXALIASWARN_2(func,namespace) \
283+ _GL_EXTERN_C int _gl_cxxalias_dummy
284+# endif
285+#else
286+# define _GL_CXXALIASWARN(func) \
287+ _GL_EXTERN_C int _gl_cxxalias_dummy
288+#endif
289+
290+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
291+ causes a warning to be emitted when the given overloaded variant of ::func
292+ is used but not when GNULIB_NAMESPACE::func is used. */
293+#if defined __cplusplus && defined GNULIB_NAMESPACE
294+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
295+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
296+ GNULIB_NAMESPACE)
297+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
298+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
299+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
300+ we enable the warning only when not optimizing. */
301+# if !__OPTIMIZE__
302+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
303+ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
304+ "The symbol ::" #func " refers to the system function. " \
305+ "Use " #namespace "::" #func " instead.")
306+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
307+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308+ extern __typeof__ (func) func
309+# else
310+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
311+ _GL_EXTERN_C int _gl_cxxalias_dummy
312+# endif
313+#else
314+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
315+ _GL_EXTERN_C int _gl_cxxalias_dummy
316+#endif
317+
318+#endif /* _GL_CXXDEFS_H */
319diff -Naurp libiconv-1.14.org//build-aux/snippet/arg-nonnull.h libiconv-1.14/build-aux/snippet/arg-nonnull.h
320--- libiconv-1.14.org//build-aux/snippet/arg-nonnull.h 2011-08-07 06:22:07.000000000 -0700
321+++ libiconv-1.14/build-aux/snippet/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
322@@ -1,26 +0,0 @@
323-/* A C macro for declaring that specific arguments must not be NULL.
324- Copyright (C) 2009-2011 Free Software Foundation, Inc.
325-
326- This program is free software: you can redistribute it and/or modify it
327- under the terms of the GNU General Public License as published
328- by the Free Software Foundation; either version 3 of the License, or
329- (at your option) any later version.
330-
331- This program is distributed in the hope that it will be useful,
332- but WITHOUT ANY WARRANTY; without even the implied warranty of
333- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
334- General Public License for more details.
335-
336- You should have received a copy of the GNU General Public License
337- along with this program. If not, see <http://www.gnu.org/licenses/>. */
338-
339-/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
340- that the values passed as arguments n, ..., m must be non-NULL pointers.
341- n = 1 stands for the first argument, n = 2 for the second argument etc. */
342-#ifndef _GL_ARG_NONNULL
343-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
344-# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
345-# else
346-# define _GL_ARG_NONNULL(params)
347-# endif
348-#endif
349diff -Naurp libiconv-1.14.org//build-aux/snippet/c++defs.h libiconv-1.14/build-aux/snippet/c++defs.h
350--- libiconv-1.14.org//build-aux/snippet/c++defs.h 2011-08-07 06:22:07.000000000 -0700
351+++ libiconv-1.14/build-aux/snippet/c++defs.h 1969-12-31 16:00:00.000000000 -0800
352@@ -1,271 +0,0 @@
353-/* C++ compatible function declaration macros.
354- Copyright (C) 2010-2011 Free Software Foundation, Inc.
355-
356- This program is free software: you can redistribute it and/or modify it
357- under the terms of the GNU General Public License as published
358- by the Free Software Foundation; either version 3 of the License, or
359- (at your option) any later version.
360-
361- This program is distributed in the hope that it will be useful,
362- but WITHOUT ANY WARRANTY; without even the implied warranty of
363- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
364- General Public License for more details.
365-
366- You should have received a copy of the GNU General Public License
367- along with this program. If not, see <http://www.gnu.org/licenses/>. */
368-
369-#ifndef _GL_CXXDEFS_H
370-#define _GL_CXXDEFS_H
371-
372-/* The three most frequent use cases of these macros are:
373-
374- * For providing a substitute for a function that is missing on some
375- platforms, but is declared and works fine on the platforms on which
376- it exists:
377-
378- #if @GNULIB_FOO@
379- # if !@HAVE_FOO@
380- _GL_FUNCDECL_SYS (foo, ...);
381- # endif
382- _GL_CXXALIAS_SYS (foo, ...);
383- _GL_CXXALIASWARN (foo);
384- #elif defined GNULIB_POSIXCHECK
385- ...
386- #endif
387-
388- * For providing a replacement for a function that exists on all platforms,
389- but is broken/insufficient and needs to be replaced on some platforms:
390-
391- #if @GNULIB_FOO@
392- # if @REPLACE_FOO@
393- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
394- # undef foo
395- # define foo rpl_foo
396- # endif
397- _GL_FUNCDECL_RPL (foo, ...);
398- _GL_CXXALIAS_RPL (foo, ...);
399- # else
400- _GL_CXXALIAS_SYS (foo, ...);
401- # endif
402- _GL_CXXALIASWARN (foo);
403- #elif defined GNULIB_POSIXCHECK
404- ...
405- #endif
406-
407- * For providing a replacement for a function that exists on some platforms
408- but is broken/insufficient and needs to be replaced on some of them and
409- is additionally either missing or undeclared on some other platforms:
410-
411- #if @GNULIB_FOO@
412- # if @REPLACE_FOO@
413- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
414- # undef foo
415- # define foo rpl_foo
416- # endif
417- _GL_FUNCDECL_RPL (foo, ...);
418- _GL_CXXALIAS_RPL (foo, ...);
419- # else
420- # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
421- _GL_FUNCDECL_SYS (foo, ...);
422- # endif
423- _GL_CXXALIAS_SYS (foo, ...);
424- # endif
425- _GL_CXXALIASWARN (foo);
426- #elif defined GNULIB_POSIXCHECK
427- ...
428- #endif
429-*/
430-
431-/* _GL_EXTERN_C declaration;
432- performs the declaration with C linkage. */
433-#if defined __cplusplus
434-# define _GL_EXTERN_C extern "C"
435-#else
436-# define _GL_EXTERN_C extern
437-#endif
438-
439-/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
440- declares a replacement function, named rpl_func, with the given prototype,
441- consisting of return type, parameters, and attributes.
442- Example:
443- _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
444- _GL_ARG_NONNULL ((1)));
445- */
446-#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
447- _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
448-#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
449- _GL_EXTERN_C rettype rpl_func parameters_and_attributes
450-
451-/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
452- declares the system function, named func, with the given prototype,
453- consisting of return type, parameters, and attributes.
454- Example:
455- _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
456- _GL_ARG_NONNULL ((1)));
457- */
458-#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
459- _GL_EXTERN_C rettype func parameters_and_attributes
460-
461-/* _GL_CXXALIAS_RPL (func, rettype, parameters);
462- declares a C++ alias called GNULIB_NAMESPACE::func
463- that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
464- Example:
465- _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
466- */
467-#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
468- _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
469-#if defined __cplusplus && defined GNULIB_NAMESPACE
470-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
471- namespace GNULIB_NAMESPACE \
472- { \
473- rettype (*const func) parameters = ::rpl_func; \
474- } \
475- _GL_EXTERN_C int _gl_cxxalias_dummy
476-#else
477-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
478- _GL_EXTERN_C int _gl_cxxalias_dummy
479-#endif
480-
481-/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
482- is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
483- except that the C function rpl_func may have a slightly different
484- declaration. A cast is used to silence the "invalid conversion" error
485- that would otherwise occur. */
486-#if defined __cplusplus && defined GNULIB_NAMESPACE
487-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
488- namespace GNULIB_NAMESPACE \
489- { \
490- rettype (*const func) parameters = \
491- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
492- } \
493- _GL_EXTERN_C int _gl_cxxalias_dummy
494-#else
495-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
496- _GL_EXTERN_C int _gl_cxxalias_dummy
497-#endif
498-
499-/* _GL_CXXALIAS_SYS (func, rettype, parameters);
500- declares a C++ alias called GNULIB_NAMESPACE::func
501- that redirects to the system provided function func, if GNULIB_NAMESPACE
502- is defined.
503- Example:
504- _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
505- */
506-#if defined __cplusplus && defined GNULIB_NAMESPACE
507- /* If we were to write
508- rettype (*const func) parameters = ::func;
509- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
510- better (remove an indirection through a 'static' pointer variable),
511- but then the _GL_CXXALIASWARN macro below would cause a warning not only
512- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
513-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
514- namespace GNULIB_NAMESPACE \
515- { \
516- static rettype (*func) parameters = ::func; \
517- } \
518- _GL_EXTERN_C int _gl_cxxalias_dummy
519-#else
520-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
521- _GL_EXTERN_C int _gl_cxxalias_dummy
522-#endif
523-
524-/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
525- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
526- except that the C function func may have a slightly different declaration.
527- A cast is used to silence the "invalid conversion" error that would
528- otherwise occur. */
529-#if defined __cplusplus && defined GNULIB_NAMESPACE
530-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
531- namespace GNULIB_NAMESPACE \
532- { \
533- static rettype (*func) parameters = \
534- reinterpret_cast<rettype(*)parameters>(::func); \
535- } \
536- _GL_EXTERN_C int _gl_cxxalias_dummy
537-#else
538-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
539- _GL_EXTERN_C int _gl_cxxalias_dummy
540-#endif
541-
542-/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
543- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
544- except that the C function is picked among a set of overloaded functions,
545- namely the one with rettype2 and parameters2. Two consecutive casts
546- are used to silence the "cannot find a match" and "invalid conversion"
547- errors that would otherwise occur. */
548-#if defined __cplusplus && defined GNULIB_NAMESPACE
549- /* The outer cast must be a reinterpret_cast.
550- The inner cast: When the function is defined as a set of overloaded
551- functions, it works as a static_cast<>, choosing the designated variant.
552- When the function is defined as a single variant, it works as a
553- reinterpret_cast<>. The parenthesized cast syntax works both ways. */
554-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
555- namespace GNULIB_NAMESPACE \
556- { \
557- static rettype (*func) parameters = \
558- reinterpret_cast<rettype(*)parameters>( \
559- (rettype2(*)parameters2)(::func)); \
560- } \
561- _GL_EXTERN_C int _gl_cxxalias_dummy
562-#else
563-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
564- _GL_EXTERN_C int _gl_cxxalias_dummy
565-#endif
566-
567-/* _GL_CXXALIASWARN (func);
568- causes a warning to be emitted when ::func is used but not when
569- GNULIB_NAMESPACE::func is used. func must be defined without overloaded
570- variants. */
571-#if defined __cplusplus && defined GNULIB_NAMESPACE
572-# define _GL_CXXALIASWARN(func) \
573- _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
574-# define _GL_CXXALIASWARN_1(func,namespace) \
575- _GL_CXXALIASWARN_2 (func, namespace)
576-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
577- we enable the warning only when not optimizing. */
578-# if !__OPTIMIZE__
579-# define _GL_CXXALIASWARN_2(func,namespace) \
580- _GL_WARN_ON_USE (func, \
581- "The symbol ::" #func " refers to the system function. " \
582- "Use " #namespace "::" #func " instead.")
583-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
584-# define _GL_CXXALIASWARN_2(func,namespace) \
585- extern __typeof__ (func) func
586-# else
587-# define _GL_CXXALIASWARN_2(func,namespace) \
588- _GL_EXTERN_C int _gl_cxxalias_dummy
589-# endif
590-#else
591-# define _GL_CXXALIASWARN(func) \
592- _GL_EXTERN_C int _gl_cxxalias_dummy
593-#endif
594-
595-/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
596- causes a warning to be emitted when the given overloaded variant of ::func
597- is used but not when GNULIB_NAMESPACE::func is used. */
598-#if defined __cplusplus && defined GNULIB_NAMESPACE
599-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
600- _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
601- GNULIB_NAMESPACE)
602-# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
603- _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
604-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
605- we enable the warning only when not optimizing. */
606-# if !__OPTIMIZE__
607-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
608- _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
609- "The symbol ::" #func " refers to the system function. " \
610- "Use " #namespace "::" #func " instead.")
611-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
612-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
613- extern __typeof__ (func) func
614-# else
615-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
616- _GL_EXTERN_C int _gl_cxxalias_dummy
617-# endif
618-#else
619-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
620- _GL_EXTERN_C int _gl_cxxalias_dummy
621-#endif
622-
623-#endif /* _GL_CXXDEFS_H */
624diff -Naurp libiconv-1.14.org//build-aux/snippet/_Noreturn.h libiconv-1.14/build-aux/snippet/_Noreturn.h
625--- libiconv-1.14.org//build-aux/snippet/_Noreturn.h 2011-08-07 06:22:07.000000000 -0700
626+++ libiconv-1.14/build-aux/snippet/_Noreturn.h 1969-12-31 16:00:00.000000000 -0800
627@@ -1,10 +0,0 @@
628-#ifndef _Noreturn
629-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
630- || 0x5110 <= __SUNPRO_C)
631-# define _Noreturn __attribute__ ((__noreturn__))
632-# elif 1200 <= _MSC_VER
633-# define _Noreturn __declspec (noreturn)
634-# else
635-# define _Noreturn
636-# endif
637-#endif
638diff -Naurp libiconv-1.14.org//build-aux/snippet/warn-on-use.h libiconv-1.14/build-aux/snippet/warn-on-use.h
639--- libiconv-1.14.org//build-aux/snippet/warn-on-use.h 2011-08-07 06:22:07.000000000 -0700
640+++ libiconv-1.14/build-aux/snippet/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
641@@ -1,109 +0,0 @@
642-/* A C macro for emitting warnings if a function is used.
643- Copyright (C) 2010-2011 Free Software Foundation, Inc.
644-
645- This program is free software: you can redistribute it and/or modify it
646- under the terms of the GNU General Public License as published
647- by the Free Software Foundation; either version 3 of the License, or
648- (at your option) any later version.
649-
650- This program is distributed in the hope that it will be useful,
651- but WITHOUT ANY WARRANTY; without even the implied warranty of
652- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
653- General Public License for more details.
654-
655- You should have received a copy of the GNU General Public License
656- along with this program. If not, see <http://www.gnu.org/licenses/>. */
657-
658-/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
659- for FUNCTION which will then trigger a compiler warning containing
660- the text of "literal string" anywhere that function is called, if
661- supported by the compiler. If the compiler does not support this
662- feature, the macro expands to an unused extern declaration.
663-
664- This macro is useful for marking a function as a potential
665- portability trap, with the intent that "literal string" include
666- instructions on the replacement function that should be used
667- instead. However, one of the reasons that a function is a
668- portability trap is if it has the wrong signature. Declaring
669- FUNCTION with a different signature in C is a compilation error, so
670- this macro must use the same type as any existing declaration so
671- that programs that avoid the problematic FUNCTION do not fail to
672- compile merely because they included a header that poisoned the
673- function. But this implies that _GL_WARN_ON_USE is only safe to
674- use if FUNCTION is known to already have a declaration. Use of
675- this macro implies that there must not be any other macro hiding
676- the declaration of FUNCTION; but undefining FUNCTION first is part
677- of the poisoning process anyway (although for symbols that are
678- provided only via a macro, the result is a compilation error rather
679- than a warning containing "literal string"). Also note that in
680- C++, it is only safe to use if FUNCTION has no overloads.
681-
682- For an example, it is possible to poison 'getline' by:
683- - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
684- [getline]) in configure.ac, which potentially defines
685- HAVE_RAW_DECL_GETLINE
686- - adding this code to a header that wraps the system <stdio.h>:
687- #undef getline
688- #if HAVE_RAW_DECL_GETLINE
689- _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
690- "not universally present; use the gnulib module getline");
691- #endif
692-
693- It is not possible to directly poison global variables. But it is
694- possible to write a wrapper accessor function, and poison that
695- (less common usage, like &environ, will cause a compilation error
696- rather than issue the nice warning, but the end result of informing
697- the developer about their portability problem is still achieved):
698- #if HAVE_RAW_DECL_ENVIRON
699- static inline char ***rpl_environ (void) { return &environ; }
700- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
701- # undef environ
702- # define environ (*rpl_environ ())
703- #endif
704- */
705-#ifndef _GL_WARN_ON_USE
706-
707-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
708-/* A compiler attribute is available in gcc versions 4.3.0 and later. */
709-# define _GL_WARN_ON_USE(function, message) \
710-extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
711-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
712-/* Verify the existence of the function. */
713-# define _GL_WARN_ON_USE(function, message) \
714-extern __typeof__ (function) function
715-# else /* Unsupported. */
716-# define _GL_WARN_ON_USE(function, message) \
717-_GL_WARN_EXTERN_C int _gl_warn_on_use
718-# endif
719-#endif
720-
721-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
722- is like _GL_WARN_ON_USE (function, "string"), except that the function is
723- declared with the given prototype, consisting of return type, parameters,
724- and attributes.
725- This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
726- not work in this case. */
727-#ifndef _GL_WARN_ON_USE_CXX
728-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
729-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
730-extern rettype function parameters_and_attributes \
731- __attribute__ ((__warning__ (msg)))
732-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
733-/* Verify the existence of the function. */
734-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
735-extern rettype function parameters_and_attributes
736-# else /* Unsupported. */
737-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
738-_GL_WARN_EXTERN_C int _gl_warn_on_use
739-# endif
740-#endif
741-
742-/* _GL_WARN_EXTERN_C declaration;
743- performs the declaration with C linkage. */
744-#ifndef _GL_WARN_EXTERN_C
745-# if defined __cplusplus
746-# define _GL_WARN_EXTERN_C extern "C"
747-# else
748-# define _GL_WARN_EXTERN_C extern
749-# endif
750-#endif
751diff -Naurp libiconv-1.14.org//build-aux/warn-on-use.h libiconv-1.14/build-aux/warn-on-use.h
752--- libiconv-1.14.org//build-aux/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
753+++ libiconv-1.14/build-aux/warn-on-use.h 2012-01-08 02:07:39.950484439 -0800
754@@ -0,0 +1,109 @@
755+/* A C macro for emitting warnings if a function is used.
756+ Copyright (C) 2010-2011 Free Software Foundation, Inc.
757+
758+ This program is free software: you can redistribute it and/or modify it
759+ under the terms of the GNU General Public License as published
760+ by the Free Software Foundation; either version 3 of the License, or
761+ (at your option) any later version.
762+
763+ This program is distributed in the hope that it will be useful,
764+ but WITHOUT ANY WARRANTY; without even the implied warranty of
765+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
766+ General Public License for more details.
767+
768+ You should have received a copy of the GNU General Public License
769+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
770+
771+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
772+ for FUNCTION which will then trigger a compiler warning containing
773+ the text of "literal string" anywhere that function is called, if
774+ supported by the compiler. If the compiler does not support this
775+ feature, the macro expands to an unused extern declaration.
776+
777+ This macro is useful for marking a function as a potential
778+ portability trap, with the intent that "literal string" include
779+ instructions on the replacement function that should be used
780+ instead. However, one of the reasons that a function is a
781+ portability trap is if it has the wrong signature. Declaring
782+ FUNCTION with a different signature in C is a compilation error, so
783+ this macro must use the same type as any existing declaration so
784+ that programs that avoid the problematic FUNCTION do not fail to
785+ compile merely because they included a header that poisoned the
786+ function. But this implies that _GL_WARN_ON_USE is only safe to
787+ use if FUNCTION is known to already have a declaration. Use of
788+ this macro implies that there must not be any other macro hiding
789+ the declaration of FUNCTION; but undefining FUNCTION first is part
790+ of the poisoning process anyway (although for symbols that are
791+ provided only via a macro, the result is a compilation error rather
792+ than a warning containing "literal string"). Also note that in
793+ C++, it is only safe to use if FUNCTION has no overloads.
794+
795+ For an example, it is possible to poison 'getline' by:
796+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
797+ [getline]) in configure.ac, which potentially defines
798+ HAVE_RAW_DECL_GETLINE
799+ - adding this code to a header that wraps the system <stdio.h>:
800+ #undef getline
801+ #if HAVE_RAW_DECL_GETLINE
802+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
803+ "not universally present; use the gnulib module getline");
804+ #endif
805+
806+ It is not possible to directly poison global variables. But it is
807+ possible to write a wrapper accessor function, and poison that
808+ (less common usage, like &environ, will cause a compilation error
809+ rather than issue the nice warning, but the end result of informing
810+ the developer about their portability problem is still achieved):
811+ #if HAVE_RAW_DECL_ENVIRON
812+ static inline char ***rpl_environ (void) { return &environ; }
813+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
814+ # undef environ
815+ # define environ (*rpl_environ ())
816+ #endif
817+ */
818+#ifndef _GL_WARN_ON_USE
819+
820+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
821+/* A compiler attribute is available in gcc versions 4.3.0 and later. */
822+# define _GL_WARN_ON_USE(function, message) \
823+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
824+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
825+/* Verify the existence of the function. */
826+# define _GL_WARN_ON_USE(function, message) \
827+extern __typeof__ (function) function
828+# else /* Unsupported. */
829+# define _GL_WARN_ON_USE(function, message) \
830+_GL_WARN_EXTERN_C int _gl_warn_on_use
831+# endif
832+#endif
833+
834+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
835+ is like _GL_WARN_ON_USE (function, "string"), except that the function is
836+ declared with the given prototype, consisting of return type, parameters,
837+ and attributes.
838+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
839+ not work in this case. */
840+#ifndef _GL_WARN_ON_USE_CXX
841+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
842+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
843+extern rettype function parameters_and_attributes \
844+ __attribute__ ((__warning__ (msg)))
845+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
846+/* Verify the existence of the function. */
847+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
848+extern rettype function parameters_and_attributes
849+# else /* Unsupported. */
850+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
851+_GL_WARN_EXTERN_C int _gl_warn_on_use
852+# endif
853+#endif
854+
855+/* _GL_WARN_EXTERN_C declaration;
856+ performs the declaration with C linkage. */
857+#ifndef _GL_WARN_EXTERN_C
858+# if defined __cplusplus
859+# define _GL_WARN_EXTERN_C extern "C"
860+# else
861+# define _GL_WARN_EXTERN_C extern
862+# endif
863+#endif
864diff -Naurp libiconv-1.14.org//srclib/allocator.h libiconv-1.14/srclib/allocator.h
865--- libiconv-1.14.org//srclib/allocator.h 2011-08-07 06:42:06.000000000 -0700
866+++ libiconv-1.14/srclib/allocator.h 2012-01-08 02:07:40.050484444 -0800
867@@ -45,11 +45,10 @@ struct allocator
868 /* Call FREE to free memory, like 'free'. */
869 void (*free) (void *);
870
871- /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (...,
872- SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX
873- if size_t overflow was detected while calculating sizes to be
874- passed to MALLOC or REALLOC. */
875- void (*die) (size_t);
876+ /* If nonnull, call DIE if MALLOC or REALLOC fails. DIE should not
877+ return. DIE can be used by code that detects memory overflow
878+ while calculating sizes to be passed to MALLOC or REALLOC. */
879+ void (*die) (void);
880 };
881
882 /* An allocator using the stdlib functions and a null DIE function. */
883diff -Naurp libiconv-1.14.org//srclib/canonicalize-lgpl.c libiconv-1.14/srclib/canonicalize-lgpl.c
884--- libiconv-1.14.org//srclib/canonicalize-lgpl.c 2011-08-07 06:42:06.000000000 -0700
885+++ libiconv-1.14/srclib/canonicalize-lgpl.c 2012-01-08 02:07:40.094484446 -0800
886@@ -125,7 +125,7 @@ __realpath (const char *name, char *reso
887 #else
888 path_max = pathconf (name, _PC_PATH_MAX);
889 if (path_max <= 0)
890- path_max = 8192;
891+ path_max = 1024;
892 #endif
893
894 if (resolved == NULL)
895diff -Naurp libiconv-1.14.org//srclib/careadlinkat.c libiconv-1.14/srclib/careadlinkat.c
896--- libiconv-1.14.org//srclib/careadlinkat.c 2011-08-07 06:42:06.000000000 -0700
897+++ libiconv-1.14/srclib/careadlinkat.c 2012-01-08 02:07:40.102484445 -0800
898@@ -133,7 +133,6 @@ careadlinkat (int fd, char const *filena
899 if (buf == stack_buf)
900 {
901 char *b = (char *) alloc->allocate (link_size);
902- buf_size = link_size;
903 if (! b)
904 break;
905 memcpy (b, buf, link_size);
906@@ -157,11 +156,6 @@ careadlinkat (int fd, char const *filena
907 buf_size *= 2;
908 else if (buf_size < buf_size_max)
909 buf_size = buf_size_max;
910- else if (buf_size_max < SIZE_MAX)
911- {
912- errno = ENAMETOOLONG;
913- return NULL;
914- }
915 else
916 break;
917 buf = (char *) alloc->allocate (buf_size);
918@@ -169,7 +163,7 @@ careadlinkat (int fd, char const *filena
919 while (buf);
920
921 if (alloc->die)
922- alloc->die (buf_size);
923+ alloc->die ();
924 errno = ENOMEM;
925 return NULL;
926 }
927diff -Naurp libiconv-1.14.org//srclib/errno.in.h libiconv-1.14/srclib/errno.in.h
928--- libiconv-1.14.org//srclib/errno.in.h 2011-08-07 06:42:06.000000000 -0700
929+++ libiconv-1.14/srclib/errno.in.h 2012-01-08 02:07:40.122484446 -0800
930@@ -16,7 +16,7 @@
931 along with this program; if not, write to the Free Software Foundation,
932 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
933
934-#ifndef _@GUARD_PREFIX@_ERRNO_H
935+#ifndef _GL_ERRNO_H
936
937 #if __GNUC__ >= 3
938 @PRAGMA_SYSTEM_HEADER@
939@@ -26,8 +26,8 @@
940 /* The include_next requires a split double-inclusion guard. */
941 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
942
943-#ifndef _@GUARD_PREFIX@_ERRNO_H
944-#define _@GUARD_PREFIX@_ERRNO_H
945+#ifndef _GL_ERRNO_H
946+#define _GL_ERRNO_H
947
948
949 /* On native Windows platforms, many macros are not defined. */
950@@ -147,16 +147,6 @@
951 # define GNULIB_defined_ENOTSUP 1
952 # endif
953
954-# ifndef ENETRESET
955-# define ENETRESET 2011
956-# define GNULIB_defined_ENETRESET 1
957-# endif
958-
959-# ifndef ECONNABORTED
960-# define ECONNABORTED 2012
961-# define GNULIB_defined_ECONNABORTED 1
962-# endif
963-
964 # ifndef ESTALE
965 # define ESTALE 2009
966 # define GNULIB_defined_ESTALE 1
967@@ -173,5 +163,5 @@
968 # endif
969
970
971-#endif /* _@GUARD_PREFIX@_ERRNO_H */
972-#endif /* _@GUARD_PREFIX@_ERRNO_H */
973+#endif /* _GL_ERRNO_H */
974+#endif /* _GL_ERRNO_H */
975diff -Naurp libiconv-1.14.org//srclib/error.c libiconv-1.14/srclib/error.c
976--- libiconv-1.14.org//srclib/error.c 2011-08-07 06:42:06.000000000 -0700
977+++ libiconv-1.14/srclib/error.c 2012-01-08 02:07:40.134484448 -0800
978@@ -97,15 +97,11 @@ extern void __error_at_line (int status,
979 /* The gnulib override of fcntl is not needed in this file. */
980 # undef fcntl
981
982-# if !HAVE_DECL_STRERROR_R
983+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
984 # ifndef HAVE_DECL_STRERROR_R
985 "this configure-time declaration test was not run"
986 # endif
987-# if STRERROR_R_CHAR_P
988 char *strerror_r ();
989-# else
990-int strerror_r ();
991-# endif
992 # endif
993
994 /* The calling program should define program_name and set it to the
995diff -Naurp libiconv-1.14.org//srclib/fcntl.in.h libiconv-1.14/srclib/fcntl.in.h
996--- libiconv-1.14.org//srclib/fcntl.in.h 2011-08-07 06:42:06.000000000 -0700
997+++ libiconv-1.14/srclib/fcntl.in.h 2012-01-08 02:07:40.154484449 -0800
998@@ -40,7 +40,7 @@
999 #else
1000 /* Normal invocation convention. */
1001
1002-#ifndef _@GUARD_PREFIX@_FCNTL_H
1003+#ifndef _GL_FCNTL_H
1004
1005 #include <sys/types.h>
1006 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
1007@@ -55,8 +55,8 @@
1008 /* The include_next requires a split double-inclusion guard. */
1009 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
1010
1011-#ifndef _@GUARD_PREFIX@_FCNTL_H
1012-#define _@GUARD_PREFIX@_FCNTL_H
1013+#ifndef _GL_FCNTL_H
1014+#define _GL_FCNTL_H
1015
1016 #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
1017 # include <unistd.h>
1018@@ -320,6 +320,6 @@ _GL_WARN_ON_USE (openat, "openat is not
1019 #endif
1020
1021
1022-#endif /* _@GUARD_PREFIX@_FCNTL_H */
1023-#endif /* _@GUARD_PREFIX@_FCNTL_H */
1024+#endif /* _GL_FCNTL_H */
1025+#endif /* _GL_FCNTL_H */
1026 #endif
1027diff -Naurp libiconv-1.14.org//srclib/intprops.h libiconv-1.14/srclib/intprops.h
1028--- libiconv-1.14.org//srclib/intprops.h 2011-08-07 06:42:06.000000000 -0700
1029+++ libiconv-1.14/srclib/intprops.h 2012-01-08 02:07:40.174484450 -0800
1030@@ -22,13 +22,14 @@
1031
1032 #include <limits.h>
1033
1034-/* Return an integer value, converted to the same type as the integer
1035- expression E after integer type promotion. V is the unconverted value. */
1036-#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
1037+/* Return a integer value, converted to the same type as the integer
1038+ expression E after integer type promotion. V is the unconverted value.
1039+ E should not have side effects. */
1040+#define _GL_INT_CONVERT(e, v) ((e) - (e) + (v))
1041
1042 /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
1043 <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
1044-#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
1045+#define _GL_INT_NEGATE_CONVERT(e, v) ((e) - (e) - (v))
1046
1047 /* The extra casts in the following macros work around compiler bugs,
1048 e.g., in Cray C 5.0.3.0. */
1049@@ -52,7 +53,7 @@
1050 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
1051
1052 /* Return 1 if the integer expression E, after integer promotion, has
1053- a signed type. */
1054+ a signed type. E should not have side effects. */
1055 #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
1056
1057
1058@@ -310,10 +311,13 @@
1059 /* Return 1 if the expression A <op> B would overflow,
1060 where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
1061 assuming MIN and MAX are the minimum and maximum for the result type.
1062- Arguments should be free of side effects. */
1063+
1064+ This macro assumes that A | B is a valid integer if both A and B are,
1065+ which is true of all known practical hosts. If this is a problem
1066+ for you, please let us know how to fix it for your host. */
1067 #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
1068 op_result_overflow (a, b, \
1069- _GL_INT_MINIMUM (0 * (b) + (a)), \
1070- _GL_INT_MAXIMUM (0 * (b) + (a)))
1071+ _GL_INT_MINIMUM ((a) | (b)), \
1072+ _GL_INT_MAXIMUM ((a) | (b)))
1073
1074 #endif /* _GL_INTPROPS_H */
1075diff -Naurp libiconv-1.14.org//srclib/Makefile.gnulib libiconv-1.14/srclib/Makefile.gnulib
1076--- libiconv-1.14.org//srclib/Makefile.gnulib 2012-01-08 02:05:18.754477606 -0800
1077+++ libiconv-1.14/srclib/Makefile.gnulib 2012-01-08 02:07:43.138484592 -0800
1078@@ -9,7 +9,7 @@
1079 # the same distribution terms as the rest of that program.
1080 #
1081 # Generated by gnulib-tool.
1082-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
1083+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
1084
1085
1086 MOSTLYCLEANFILES += core *.stackdump
1087@@ -60,12 +60,60 @@ EXTRA_DIST += areadlink.h
1088
1089 ## end gnulib module areadlink
1090
1091+## begin gnulib module arg-nonnull
1092+
1093+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1094+# statements but through direct file reference. Therefore this snippet must be
1095+# present in all Makefile.am that need it. This is ensured by the applicability
1096+# 'all' defined above.
1097+
1098+BUILT_SOURCES += arg-nonnull.h
1099+# The arg-nonnull.h that gets inserted into generated .h files is the same as
1100+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
1101+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
1102+ $(AM_V_GEN)rm -f $@-t $@ && \
1103+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
1104+ < $(top_srcdir)/build-aux/arg-nonnull.h \
1105+ > $@-t && \
1106+ mv $@-t $@
1107+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
1108+
1109+ARG_NONNULL_H=arg-nonnull.h
1110+
1111+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
1112+
1113+## end gnulib module arg-nonnull
1114+
1115 ## begin gnulib module binary-io
1116
1117 libicrt_a_SOURCES += binary-io.h
1118
1119 ## end gnulib module binary-io
1120
1121+## begin gnulib module c++defs
1122+
1123+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1124+# statements but through direct file reference. Therefore this snippet must be
1125+# present in all Makefile.am that need it. This is ensured by the applicability
1126+# 'all' defined above.
1127+
1128+BUILT_SOURCES += c++defs.h
1129+# The c++defs.h that gets inserted into generated .h files is the same as
1130+# build-aux/c++defs.h, except that it has the copyright header cut off.
1131+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
1132+ $(AM_V_GEN)rm -f $@-t $@ && \
1133+ sed -n -e '/_GL_CXXDEFS/,$$p' \
1134+ < $(top_srcdir)/build-aux/c++defs.h \
1135+ > $@-t && \
1136+ mv $@-t $@
1137+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
1138+
1139+CXXDEFS_H=c++defs.h
1140+
1141+EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
1142+
1143+## end gnulib module c++defs
1144+
1145 ## begin gnulib module canonicalize-lgpl
1146
1147
1148@@ -100,8 +148,7 @@ if GL_GENERATE_ERRNO_H
1149 errno.h: errno.in.h $(top_builddir)/config.status
1150 $(AM_V_GEN)rm -f $@-t $@ && \
1151 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1152- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1153- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1154+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1155 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1156 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1157 -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
1158@@ -142,15 +189,14 @@ BUILT_SOURCES += fcntl.h
1159 fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1160 $(AM_V_GEN)rm -f $@-t $@ && \
1161 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1162- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1163- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1164+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1165 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1166 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1167 -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
1168- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
1169- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
1170- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
1171- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
1172+ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
1173+ -e 's|@''GNULIB_NONBLOCKING''@|$(GNULIB_NONBLOCKING)|g' \
1174+ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
1175+ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
1176 -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
1177 -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
1178 -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
1179@@ -297,7 +343,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/co
1180 ## begin gnulib module relocatable-prog-wrapper
1181
1182
1183-EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c
1184+EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c strerror.c
1185
1186 EXTRA_DIST += $(top_srcdir)/build-aux/install-reloc
1187
1188@@ -305,9 +351,10 @@ EXTRA_DIST += $(top_srcdir)/build-aux/in
1189
1190 ## begin gnulib module safe-read
1191
1192-libicrt_a_SOURCES += safe-read.c
1193
1194-EXTRA_DIST += safe-read.h
1195+EXTRA_DIST += safe-read.c safe-read.h
1196+
1197+EXTRA_libicrt_a_SOURCES += safe-read.c
1198
1199 ## end gnulib module safe-read
1200
1201@@ -320,24 +367,20 @@ BUILT_SOURCES += signal.h
1202 signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1203 $(AM_V_GEN)rm -f $@-t $@ && \
1204 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1205- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1206- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1207+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1208 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1209 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1210 -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
1211- -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
1212- -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
1213- -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
1214- -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
1215+ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
1216+ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
1217+ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
1218 -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
1219- -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
1220 -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
1221 -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
1222 -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
1223 -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
1224 -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
1225 -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
1226- -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
1227 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1228 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1229 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1230@@ -368,87 +411,6 @@ EXTRA_libicrt_a_SOURCES += sigprocmask.c
1231
1232 ## end gnulib module sigprocmask
1233
1234-## begin gnulib module snippet/_Noreturn
1235-
1236-# Because this Makefile snippet defines a variable used by other
1237-# gnulib Makefile snippets, it must be present in all Makefile.am that
1238-# need it. This is ensured by the applicability 'all' defined above.
1239-
1240-_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
1241-
1242-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
1243-
1244-## end gnulib module snippet/_Noreturn
1245-
1246-## begin gnulib module snippet/arg-nonnull
1247-
1248-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1249-# statements but through direct file reference. Therefore this snippet must be
1250-# present in all Makefile.am that need it. This is ensured by the applicability
1251-# 'all' defined above.
1252-
1253-BUILT_SOURCES += arg-nonnull.h
1254-# The arg-nonnull.h that gets inserted into generated .h files is the same as
1255-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
1256-# off.
1257-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
1258- $(AM_V_GEN)rm -f $@-t $@ && \
1259- sed -n -e '/GL_ARG_NONNULL/,$$p' \
1260- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
1261- > $@-t && \
1262- mv $@-t $@
1263-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
1264-
1265-ARG_NONNULL_H=arg-nonnull.h
1266-
1267-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
1268-
1269-## end gnulib module snippet/arg-nonnull
1270-
1271-## begin gnulib module snippet/c++defs
1272-
1273-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1274-# statements but through direct file reference. Therefore this snippet must be
1275-# present in all Makefile.am that need it. This is ensured by the applicability
1276-# 'all' defined above.
1277-
1278-BUILT_SOURCES += c++defs.h
1279-# The c++defs.h that gets inserted into generated .h files is the same as
1280-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
1281-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
1282- $(AM_V_GEN)rm -f $@-t $@ && \
1283- sed -n -e '/_GL_CXXDEFS/,$$p' \
1284- < $(top_srcdir)/build-aux/snippet/c++defs.h \
1285- > $@-t && \
1286- mv $@-t $@
1287-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
1288-
1289-CXXDEFS_H=c++defs.h
1290-
1291-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
1292-
1293-## end gnulib module snippet/c++defs
1294-
1295-## begin gnulib module snippet/warn-on-use
1296-
1297-BUILT_SOURCES += warn-on-use.h
1298-# The warn-on-use.h that gets inserted into generated .h files is the same as
1299-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
1300-# off.
1301-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
1302- $(AM_V_GEN)rm -f $@-t $@ && \
1303- sed -n -e '/^.ifndef/,$$p' \
1304- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
1305- > $@-t && \
1306- mv $@-t $@
1307-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
1308-
1309-WARN_ON_USE_H=warn-on-use.h
1310-
1311-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
1312-
1313-## end gnulib module snippet/warn-on-use
1314-
1315 ## begin gnulib module stat
1316
1317
1318@@ -491,8 +453,7 @@ if GL_GENERATE_STDDEF_H
1319 stddef.h: stddef.in.h $(top_builddir)/config.status
1320 $(AM_V_GEN)rm -f $@-t $@ && \
1321 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1322- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1323- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1324+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1325 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1326 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1327 -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
1328@@ -521,8 +482,7 @@ if GL_GENERATE_STDINT_H
1329 stdint.h: stdint.in.h $(top_builddir)/config.status
1330 $(AM_V_GEN)rm -f $@-t $@ && \
1331 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1332- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1333- -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
1334+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
1335 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1336 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1337 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1338@@ -570,63 +530,62 @@ BUILT_SOURCES += stdio.h
1339 stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1340 $(AM_V_GEN)rm -f $@-t $@ && \
1341 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1342- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1343- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1344+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1345 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1346 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1347 -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
1348- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
1349- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
1350- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
1351- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
1352- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
1353- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
1354- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
1355- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
1356- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
1357- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
1358- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
1359- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
1360- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
1361- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
1362- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
1363- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
1364- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
1365- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
1366- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
1367- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
1368- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
1369- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
1370- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
1371- -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
1372- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
1373- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
1374- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
1375- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
1376- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
1377- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
1378- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
1379- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
1380- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
1381- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
1382- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
1383- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
1384- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
1385- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
1386- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
1387- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
1388- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
1389- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
1390- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
1391- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
1392- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
1393- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
1394- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
1395- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
1396- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
1397- -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
1398- -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
1399- -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
1400+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
1401+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
1402+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
1403+ -e 's|@''GNULIB_FGETC''@|$(GNULIB_FGETC)|g' \
1404+ -e 's|@''GNULIB_FGETS''@|$(GNULIB_FGETS)|g' \
1405+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
1406+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
1407+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
1408+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
1409+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
1410+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
1411+ -e 's|@''GNULIB_FREAD''@|$(GNULIB_FREAD)|g' \
1412+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
1413+ -e 's|@''GNULIB_FSCANF''@|$(GNULIB_FSCANF)|g' \
1414+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
1415+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
1416+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
1417+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
1418+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
1419+ -e 's|@''GNULIB_GETC''@|$(GNULIB_GETC)|g' \
1420+ -e 's|@''GNULIB_GETCHAR''@|$(GNULIB_GETCHAR)|g' \
1421+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
1422+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
1423+ -e 's|@''GNULIB_GETS''@|$(GNULIB_GETS)|g' \
1424+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
1425+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
1426+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
1427+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
1428+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
1429+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
1430+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
1431+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
1432+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
1433+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
1434+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
1435+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
1436+ -e 's|@''GNULIB_SCANF''@|$(GNULIB_SCANF)|g' \
1437+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
1438+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
1439+ -e 's|@''GNULIB_STDIO_H_NONBLOCKING''@|$(GNULIB_STDIO_H_NONBLOCKING)|g' \
1440+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
1441+ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
1442+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
1443+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
1444+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
1445+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
1446+ -e 's|@''GNULIB_VFSCANF''@|$(GNULIB_VFSCANF)|g' \
1447+ -e 's|@''GNULIB_VSCANF''@|$(GNULIB_VSCANF)|g' \
1448+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
1449+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
1450+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
1451+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
1452 < $(srcdir)/stdio.in.h | \
1453 sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
1454 -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
1455@@ -691,43 +650,41 @@ BUILT_SOURCES += stdlib.h
1456
1457 # We need the following in order to create <stdlib.h> when the system
1458 # doesn't have one that works with the given compiler.
1459-stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1460- $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1461+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1462 $(AM_V_GEN)rm -f $@-t $@ && \
1463 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1464- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1465- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1466+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1467 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1468 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1469 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
1470- -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
1471- -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
1472- -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
1473- -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
1474- -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
1475- -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
1476- -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
1477- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
1478- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
1479- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
1480- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
1481- -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
1482- -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
1483- -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
1484- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
1485- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
1486- -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
1487- -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
1488- -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
1489- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
1490- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
1491- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
1492- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
1493- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
1494- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
1495- -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
1496- -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
1497- -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
1498+ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
1499+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
1500+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
1501+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
1502+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
1503+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
1504+ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
1505+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
1506+ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
1507+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
1508+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
1509+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
1510+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
1511+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
1512+ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
1513+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
1514+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
1515+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
1516+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
1517+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
1518+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
1519+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
1520+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
1521+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
1522+ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
1523+ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
1524+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
1525+ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
1526 < $(srcdir)/stdlib.in.h | \
1527 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
1528 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
1529@@ -766,7 +723,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
1530 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
1531 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
1532 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1533- -e '/definition of _Noreturn/r $(_NORETURN_H)' \
1534 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1535 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
1536 } > $@-t && \
1537@@ -793,15 +749,6 @@ EXTRA_libicrt_a_SOURCES += strerror.c
1538
1539 ## end gnulib module strerror
1540
1541-## begin gnulib module strerror-override
1542-
1543-
1544-EXTRA_DIST += strerror-override.c strerror-override.h
1545-
1546-EXTRA_libicrt_a_SOURCES += strerror-override.c
1547-
1548-## end gnulib module strerror-override
1549-
1550 ## begin gnulib module string
1551
1552 BUILT_SOURCES += string.h
1553@@ -811,52 +758,47 @@ BUILT_SOURCES += string.h
1554 string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1555 $(AM_V_GEN)rm -f $@-t $@ && \
1556 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1557- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1558- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1559+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1560 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1561 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1562 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
1563- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
1564- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
1565- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
1566- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
1567- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
1568- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
1569- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
1570- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
1571- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
1572- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
1573- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
1574- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
1575- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
1576- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
1577- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
1578- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
1579- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
1580- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
1581- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
1582- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
1583- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
1584- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
1585- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
1586- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
1587- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
1588- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
1589- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
1590- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
1591- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
1592- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
1593- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
1594- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
1595- -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
1596- -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
1597- -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
1598- -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
1599- -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
1600+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
1601+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
1602+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
1603+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
1604+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
1605+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
1606+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
1607+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
1608+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
1609+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
1610+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
1611+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
1612+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
1613+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
1614+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
1615+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
1616+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
1617+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
1618+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
1619+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
1620+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
1621+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
1622+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
1623+ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
1624+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
1625+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
1626+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
1627+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
1628+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
1629+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
1630+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
1631+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
1632+ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
1633+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
1634+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
1635 < $(srcdir)/string.in.h | \
1636- sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
1637- -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
1638- -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
1639+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
1640 -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
1641 -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
1642 -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
1643@@ -912,23 +854,22 @@ sys/stat.h: sys_stat.in.h $(top_builddir
1644 $(AM_V_at)$(MKDIR_P) sys
1645 $(AM_V_GEN)rm -f $@-t $@ && \
1646 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1647- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1648- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1649+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1650 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1651 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1652 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
1653- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
1654- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
1655- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
1656- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
1657- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
1658- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
1659- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
1660- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
1661- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
1662- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
1663- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
1664- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
1665+ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
1666+ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
1667+ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
1668+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
1669+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
1670+ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
1671+ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
1672+ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
1673+ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
1674+ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
1675+ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
1676+ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
1677 -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
1678 -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
1679 -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
1680@@ -971,16 +912,15 @@ BUILT_SOURCES += time.h
1681 time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1682 $(AM_V_GEN)rm -f $@-t $@ && \
1683 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1684- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1685- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1686+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1687 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1688 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1689 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
1690- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
1691- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
1692- -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
1693- -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
1694- -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
1695+ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
1696+ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
1697+ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
1698+ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
1699+ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
1700 -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
1701 -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
1702 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
1703@@ -1013,56 +953,55 @@ BUILT_SOURCES += unistd.h
1704 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1705 $(AM_V_GEN)rm -f $@-t $@ && \
1706 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1707- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1708- -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
1709+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
1710 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1711 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1712 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1713 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
1714- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
1715- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
1716- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
1717- -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
1718- -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
1719- -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
1720- -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
1721- -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
1722- -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
1723- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
1724- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
1725- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
1726- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
1727- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
1728- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
1729- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
1730- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
1731- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
1732- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
1733- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
1734- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
1735- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
1736- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
1737- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
1738- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
1739- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
1740- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
1741- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
1742- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
1743- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
1744- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
1745- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
1746- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
1747- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
1748- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
1749- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
1750- -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
1751- -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
1752- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
1753- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
1754- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
1755- -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
1756- -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
1757- -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
1758+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
1759+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
1760+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
1761+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
1762+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
1763+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
1764+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
1765+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
1766+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
1767+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
1768+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
1769+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
1770+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
1771+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
1772+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
1773+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
1774+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
1775+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
1776+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
1777+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
1778+ -e 's|@''GNULIB_GROUP_MEMBER''@|$(GNULIB_GROUP_MEMBER)|g' \
1779+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
1780+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
1781+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
1782+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
1783+ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
1784+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
1785+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
1786+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
1787+ -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \
1788+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
1789+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
1790+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
1791+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
1792+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
1793+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
1794+ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
1795+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
1796+ -e 's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \
1797+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
1798+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
1799+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
1800+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
1801+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
1802 < $(srcdir)/unistd.in.h | \
1803 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
1804 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
1805@@ -1198,6 +1137,25 @@ EXTRA_DIST += verify.h
1806
1807 ## end gnulib module verify
1808
1809+## begin gnulib module warn-on-use
1810+
1811+BUILT_SOURCES += warn-on-use.h
1812+# The warn-on-use.h that gets inserted into generated .h files is the same as
1813+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
1814+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
1815+ $(AM_V_GEN)rm -f $@-t $@ && \
1816+ sed -n -e '/^.ifndef/,$$p' \
1817+ < $(top_srcdir)/build-aux/warn-on-use.h \
1818+ > $@-t && \
1819+ mv $@-t $@
1820+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
1821+
1822+WARN_ON_USE_H=warn-on-use.h
1823+
1824+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
1825+
1826+## end gnulib module warn-on-use
1827+
1828 ## begin gnulib module xalloc
1829
1830 libicrt_a_SOURCES += xalloc.h xmalloc.c xstrdup.c
1831diff -Naurp libiconv-1.14.org//srclib/pathmax.h libiconv-1.14/srclib/pathmax.h
1832--- libiconv-1.14.org//srclib/pathmax.h 2011-08-07 06:42:06.000000000 -0700
1833+++ libiconv-1.14/srclib/pathmax.h 2012-01-08 02:07:40.218484451 -0800
1834@@ -19,27 +19,6 @@
1835 #ifndef _PATHMAX_H
1836 # define _PATHMAX_H
1837
1838-/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
1839- including the terminating NUL byte.
1840- <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
1841- PATH_MAX is not defined on systems which have no limit on filename length,
1842- such as GNU/Hurd.
1843-
1844- This file does *not* define PATH_MAX always. Programs that use this file
1845- can handle the GNU/Hurd case in several ways:
1846- - Either with a package-wide handling, or with a per-file handling,
1847- - Either through a
1848- #ifdef PATH_MAX
1849- or through a fallback like
1850- #ifndef PATH_MAX
1851- # define PATH_MAX 8192
1852- #endif
1853- or through a fallback like
1854- #ifndef PATH_MAX
1855- # define PATH_MAX pathconf ("/", _PC_PATH_MAX)
1856- #endif
1857- */
1858-
1859 # include <unistd.h>
1860
1861 # include <limits.h>
1862@@ -48,6 +27,11 @@
1863 # define _POSIX_PATH_MAX 256
1864 # endif
1865
1866+# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
1867+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
1868+ : pathconf ("/", _PC_PATH_MAX))
1869+# endif
1870+
1871 /* Don't include sys/param.h if it already has been. */
1872 # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
1873 # include <sys/param.h>
1874@@ -57,13 +41,8 @@
1875 # define PATH_MAX MAXPATHLEN
1876 # endif
1877
1878-# ifdef __hpux
1879-/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
1880- *not* including the terminating NUL byte, and is set to 1023.
1881- Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
1882- not defined at all any more. */
1883-# undef PATH_MAX
1884-# define PATH_MAX 1024
1885+# ifndef PATH_MAX
1886+# define PATH_MAX _POSIX_PATH_MAX
1887 # endif
1888
1889 #endif /* _PATHMAX_H */
1890diff -Naurp libiconv-1.14.org//srclib/relocwrapper.c libiconv-1.14/srclib/relocwrapper.c
1891--- libiconv-1.14.org//srclib/relocwrapper.c 2011-08-07 06:42:06.000000000 -0700
1892+++ libiconv-1.14/srclib/relocwrapper.c 2012-01-08 02:07:40.282484455 -0800
1893@@ -29,6 +29,7 @@
1894 -> relocatable
1895 -> setenv
1896 -> malloca
1897+ -> strerror
1898 -> c-ctype
1899
1900 Macros that need to be set while compiling this file:
1901diff -Naurp libiconv-1.14.org//srclib/safe-read.h libiconv-1.14/srclib/safe-read.h
1902--- libiconv-1.14.org//srclib/safe-read.h 2011-08-07 06:42:06.000000000 -0700
1903+++ libiconv-1.14/srclib/safe-read.h 2012-01-08 02:07:40.298484455 -0800
1904@@ -14,19 +14,6 @@
1905 You should have received a copy of the GNU General Public License
1906 along with this program. If not, see <http://www.gnu.org/licenses/>. */
1907
1908-/* Some system calls may be interrupted and fail with errno = EINTR in the
1909- following situations:
1910- - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user
1911- types Ctrl-Z) on some platforms: MacOS X.
1912- - The process receives a signal for which a signal handler was installed
1913- with sigaction() with an sa_flags field that does not contain
1914- SA_RESTART.
1915- - The process receives a signal for which a signal handler was installed
1916- with signal() and for which no call to siginterrupt(sig,0) was done,
1917- on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris.
1918-
1919- This module provides a wrapper around read() that handles EINTR. */
1920-
1921 #include <stddef.h>
1922
1923 #ifdef __cplusplus
1924diff -Naurp libiconv-1.14.org//srclib/signal.in.h libiconv-1.14/srclib/signal.in.h
1925--- libiconv-1.14.org//srclib/signal.in.h 2011-08-07 06:42:06.000000000 -0700
1926+++ libiconv-1.14/srclib/signal.in.h 2012-01-08 02:07:40.314484456 -0800
1927@@ -20,49 +20,21 @@
1928 #endif
1929 @PRAGMA_COLUMNS@
1930
1931-#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
1932-/* Special invocation convention:
1933- - Inside glibc header files.
1934- - On glibc systems we have a sequence of nested includes
1935- <signal.h> -> <ucontext.h> -> <signal.h>.
1936- In this situation, the functions are not yet declared, therefore we cannot
1937- provide the C++ aliases.
1938- - On glibc systems with GCC 4.3 we have a sequence of nested includes
1939- <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
1940- In this situation, some of the functions are not yet declared, therefore
1941- we cannot provide the C++ aliases. */
1942+#if defined __need_sig_atomic_t || defined __need_sigset_t
1943+/* Special invocation convention inside glibc header files. */
1944
1945 # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
1946
1947 #else
1948 /* Normal invocation convention. */
1949
1950-#ifndef _@GUARD_PREFIX@_SIGNAL_H
1951-
1952-#define _GL_ALREADY_INCLUDING_SIGNAL_H
1953-
1954-/* Define pid_t, uid_t.
1955- Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
1956- On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
1957- us; so include <sys/types.h> now, before the second inclusion guard. */
1958-#include <sys/types.h>
1959+#ifndef _GL_SIGNAL_H
1960
1961 /* The include_next requires a split double-inclusion guard. */
1962 #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
1963
1964-#undef _GL_ALREADY_INCLUDING_SIGNAL_H
1965-
1966-#ifndef _@GUARD_PREFIX@_SIGNAL_H
1967-#define _@GUARD_PREFIX@_SIGNAL_H
1968-
1969-/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
1970- pthread_sigmask in <pthread.h>, not in <signal.h>.
1971- But avoid namespace pollution on glibc systems.*/
1972-#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
1973- && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \
1974- && ! defined __GLIBC__
1975-# include <pthread.h>
1976-#endif
1977+#ifndef _GL_SIGNAL_H
1978+#define _GL_SIGNAL_H
1979
1980 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
1981
1982@@ -70,6 +42,10 @@
1983
1984 /* The definition of _GL_WARN_ON_USE is copied here. */
1985
1986+/* Define pid_t, uid_t.
1987+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
1988+#include <sys/types.h>
1989+
1990 /* On AIX, sig_atomic_t already includes volatile. C99 requires that
1991 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
1992 Hence, redefine this to a non-volatile type as needed. */
1993@@ -124,34 +100,6 @@ typedef void (*sighandler_t) (int);
1994 #endif
1995
1996
1997-#if @GNULIB_PTHREAD_SIGMASK@
1998-# if @REPLACE_PTHREAD_SIGMASK@
1999-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2000-# undef pthread_sigmask
2001-# define pthread_sigmask rpl_pthread_sigmask
2002-# endif
2003-_GL_FUNCDECL_RPL (pthread_sigmask, int,
2004- (int how, const sigset_t *new_mask, sigset_t *old_mask));
2005-_GL_CXXALIAS_RPL (pthread_sigmask, int,
2006- (int how, const sigset_t *new_mask, sigset_t *old_mask));
2007-# else
2008-# if !@HAVE_PTHREAD_SIGMASK@
2009-_GL_FUNCDECL_SYS (pthread_sigmask, int,
2010- (int how, const sigset_t *new_mask, sigset_t *old_mask));
2011-# endif
2012-_GL_CXXALIAS_SYS (pthread_sigmask, int,
2013- (int how, const sigset_t *new_mask, sigset_t *old_mask));
2014-# endif
2015-_GL_CXXALIASWARN (pthread_sigmask);
2016-#elif defined GNULIB_POSIXCHECK
2017-# undef pthread_sigmask
2018-# if HAVE_RAW_DECL_PTHREAD_SIGMASK
2019-_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
2020- "use gnulib module pthread_sigmask for portability");
2021-# endif
2022-#endif
2023-
2024-
2025 #if @GNULIB_SIGPROCMASK@
2026 # if !@HAVE_POSIX_SIGNALBLOCKING@
2027
2028@@ -423,6 +371,6 @@ _GL_WARN_ON_USE (sigaction, "sigaction i
2029 #endif
2030
2031
2032-#endif /* _@GUARD_PREFIX@_SIGNAL_H */
2033-#endif /* _@GUARD_PREFIX@_SIGNAL_H */
2034+#endif /* _GL_SIGNAL_H */
2035+#endif /* _GL_SIGNAL_H */
2036 #endif
2037diff -Naurp libiconv-1.14.org//srclib/stat.c libiconv-1.14/srclib/stat.c
2038--- libiconv-1.14.org//srclib/stat.c 2011-08-07 06:42:06.000000000 -0700
2039+++ libiconv-1.14/srclib/stat.c 2012-01-08 02:07:40.330484457 -0800
2040@@ -38,7 +38,6 @@ orig_stat (const char *filename, struct
2041 #include <stdbool.h>
2042 #include <string.h>
2043 #include "dosname.h"
2044-#include "verify.h"
2045
2046 /* Store information about NAME into ST. Work around bugs with
2047 trailing slashes. Mingw has other bugs (such as st_ino always
2048@@ -64,12 +63,6 @@ rpl_stat (char const *name, struct stat
2049 }
2050 #endif /* REPLACE_FUNC_STAT_FILE */
2051 #if REPLACE_FUNC_STAT_DIR
2052- /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
2053- have a constant PATH_MAX. */
2054-# ifndef PATH_MAX
2055-# error "Please port this replacement to your platform"
2056-# endif
2057-
2058 if (result == -1 && errno == ENOENT)
2059 {
2060 /* Due to mingw's oddities, there are some directories (like
2061@@ -84,7 +77,6 @@ rpl_stat (char const *name, struct stat
2062 char fixed_name[PATH_MAX + 1] = {0};
2063 size_t len = strlen (name);
2064 bool check_dir = false;
2065- verify (PATH_MAX <= 4096);
2066 if (PATH_MAX <= len)
2067 errno = ENAMETOOLONG;
2068 else if (len)
2069diff -Naurp libiconv-1.14.org//srclib/stddef.in.h libiconv-1.14/srclib/stddef.in.h
2070--- libiconv-1.14.org//srclib/stddef.in.h 2011-08-07 06:42:06.000000000 -0700
2071+++ libiconv-1.14/srclib/stddef.in.h 2012-01-08 02:07:40.346484458 -0800
2072@@ -38,9 +38,9 @@
2073 remember if special invocation has ever been used to obtain wint_t,
2074 in which case we need to clean up NULL yet again. */
2075
2076-# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
2077+# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
2078 # ifdef __need_wint_t
2079-# undef _@GUARD_PREFIX@_STDDEF_H
2080+# undef _GL_STDDEF_H
2081 # define _GL_STDDEF_WINT_T
2082 # endif
2083 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
2084@@ -49,14 +49,14 @@
2085 #else
2086 /* Normal invocation convention. */
2087
2088-# ifndef _@GUARD_PREFIX@_STDDEF_H
2089+# ifndef _GL_STDDEF_H
2090
2091 /* The include_next requires a split double-inclusion guard. */
2092
2093 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
2094
2095-# ifndef _@GUARD_PREFIX@_STDDEF_H
2096-# define _@GUARD_PREFIX@_STDDEF_H
2097+# ifndef _GL_STDDEF_H
2098+# define _GL_STDDEF_H
2099
2100 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
2101 #if @REPLACE_NULL@
2102@@ -82,6 +82,6 @@
2103 # define wchar_t int
2104 #endif
2105
2106-# endif /* _@GUARD_PREFIX@_STDDEF_H */
2107-# endif /* _@GUARD_PREFIX@_STDDEF_H */
2108+# endif /* _GL_STDDEF_H */
2109+# endif /* _GL_STDDEF_H */
2110 #endif /* __need_XXX */
2111diff -Naurp libiconv-1.14.org//srclib/stdint.in.h libiconv-1.14/srclib/stdint.in.h
2112--- libiconv-1.14.org//srclib/stdint.in.h 2011-08-07 06:42:06.000000000 -0700
2113+++ libiconv-1.14/srclib/stdint.in.h 2012-01-08 02:07:40.358484458 -0800
2114@@ -21,7 +21,7 @@
2115 * <http://www.opengroup.org/susv3xbd/stdint.h.html>
2116 */
2117
2118-#ifndef _@GUARD_PREFIX@_STDINT_H
2119+#ifndef _GL_STDINT_H
2120
2121 #if __GNUC__ >= 3
2122 @PRAGMA_SYSTEM_HEADER@
2123@@ -52,13 +52,13 @@
2124 /* Other systems may have an incomplete or buggy <stdint.h>.
2125 Include it before <inttypes.h>, since any "#include <stdint.h>"
2126 in <inttypes.h> would reinclude us, skipping our contents because
2127- _@GUARD_PREFIX@_STDINT_H is defined.
2128+ _GL_STDINT_H is defined.
2129 The include_next requires a split double-inclusion guard. */
2130 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
2131 #endif
2132
2133-#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
2134-#define _@GUARD_PREFIX@_STDINT_H
2135+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
2136+#define _GL_STDINT_H
2137
2138 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
2139 IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
2140@@ -270,36 +270,26 @@ typedef unsigned long int gl_uintptr_t;
2141 /* Note: These types are compiler dependent. It may be unwise to use them in
2142 public header files. */
2143
2144-/* If the system defines INTMAX_MAX, assume that intmax_t works, and
2145- similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
2146- assuming one type where another is used by the system. */
2147-
2148-#ifndef INTMAX_MAX
2149-# undef INTMAX_C
2150-# undef intmax_t
2151-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2152+#undef intmax_t
2153+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2154 typedef long long int gl_intmax_t;
2155-# define intmax_t gl_intmax_t
2156-# elif defined GL_INT64_T
2157-# define intmax_t int64_t
2158-# else
2159+# define intmax_t gl_intmax_t
2160+#elif defined GL_INT64_T
2161+# define intmax_t int64_t
2162+#else
2163 typedef long int gl_intmax_t;
2164-# define intmax_t gl_intmax_t
2165-# endif
2166+# define intmax_t gl_intmax_t
2167 #endif
2168
2169-#ifndef UINTMAX_MAX
2170-# undef UINTMAX_C
2171-# undef uintmax_t
2172-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2173+#undef uintmax_t
2174+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2175 typedef unsigned long long int gl_uintmax_t;
2176-# define uintmax_t gl_uintmax_t
2177-# elif defined GL_UINT64_T
2178-# define uintmax_t uint64_t
2179-# else
2180+# define uintmax_t gl_uintmax_t
2181+#elif defined GL_UINT64_T
2182+# define uintmax_t uint64_t
2183+#else
2184 typedef unsigned long int gl_uintmax_t;
2185-# define uintmax_t gl_uintmax_t
2186-# endif
2187+# define uintmax_t gl_uintmax_t
2188 #endif
2189
2190 /* Verify that intmax_t and uintmax_t have the same size. Too much code
2191@@ -441,23 +431,21 @@ typedef int _verify_intmax_size[sizeof (
2192
2193 /* 7.18.2.5. Limits of greatest-width integer types */
2194
2195-#ifndef INTMAX_MAX
2196-# undef INTMAX_MIN
2197-# ifdef INT64_MAX
2198-# define INTMAX_MIN INT64_MIN
2199-# define INTMAX_MAX INT64_MAX
2200-# else
2201-# define INTMAX_MIN INT32_MIN
2202-# define INTMAX_MAX INT32_MAX
2203-# endif
2204+#undef INTMAX_MIN
2205+#undef INTMAX_MAX
2206+#ifdef INT64_MAX
2207+# define INTMAX_MIN INT64_MIN
2208+# define INTMAX_MAX INT64_MAX
2209+#else
2210+# define INTMAX_MIN INT32_MIN
2211+# define INTMAX_MAX INT32_MAX
2212 #endif
2213
2214-#ifndef UINTMAX_MAX
2215-# ifdef UINT64_MAX
2216-# define UINTMAX_MAX UINT64_MAX
2217-# else
2218-# define UINTMAX_MAX UINT32_MAX
2219-# endif
2220+#undef UINTMAX_MAX
2221+#ifdef UINT64_MAX
2222+# define UINTMAX_MAX UINT64_MAX
2223+#else
2224+# define UINTMAX_MAX UINT32_MAX
2225 #endif
2226
2227 /* 7.18.3. Limits of other integer types */
2228@@ -580,27 +568,25 @@ typedef int _verify_intmax_size[sizeof (
2229
2230 /* 7.18.4.2. Macros for greatest-width integer constants */
2231
2232-#ifndef INTMAX_C
2233-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2234-# define INTMAX_C(x) x##LL
2235-# elif defined GL_INT64_T
2236-# define INTMAX_C(x) INT64_C(x)
2237-# else
2238-# define INTMAX_C(x) x##L
2239-# endif
2240+#undef INTMAX_C
2241+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2242+# define INTMAX_C(x) x##LL
2243+#elif defined GL_INT64_T
2244+# define INTMAX_C(x) INT64_C(x)
2245+#else
2246+# define INTMAX_C(x) x##L
2247 #endif
2248
2249-#ifndef UINTMAX_C
2250-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2251-# define UINTMAX_C(x) x##ULL
2252-# elif defined GL_UINT64_T
2253-# define UINTMAX_C(x) UINT64_C(x)
2254-# else
2255-# define UINTMAX_C(x) x##UL
2256-# endif
2257+#undef UINTMAX_C
2258+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2259+# define UINTMAX_C(x) x##ULL
2260+#elif defined GL_UINT64_T
2261+# define UINTMAX_C(x) UINT64_C(x)
2262+#else
2263+# define UINTMAX_C(x) x##UL
2264 #endif
2265
2266 #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
2267
2268-#endif /* _@GUARD_PREFIX@_STDINT_H */
2269-#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
2270+#endif /* _GL_STDINT_H */
2271+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
2272diff -Naurp libiconv-1.14.org//srclib/stdio.in.h libiconv-1.14/srclib/stdio.in.h
2273--- libiconv-1.14.org//srclib/stdio.in.h 2011-08-07 06:42:06.000000000 -0700
2274+++ libiconv-1.14/srclib/stdio.in.h 2012-01-08 02:07:40.378484459 -0800
2275@@ -35,7 +35,7 @@
2276 #else
2277 /* Normal invocation convention. */
2278
2279-#ifndef _@GUARD_PREFIX@_STDIO_H
2280+#ifndef _GL_STDIO_H
2281
2282 #define _GL_ALREADY_INCLUDING_STDIO_H
2283
2284@@ -44,8 +44,8 @@
2285
2286 #undef _GL_ALREADY_INCLUDING_STDIO_H
2287
2288-#ifndef _@GUARD_PREFIX@_STDIO_H
2289-#define _@GUARD_PREFIX@_STDIO_H
2290+#ifndef _GL_STDIO_H
2291+#define _GL_STDIO_H
2292
2293 /* Get va_list. Needed on many systems, including glibc 2.8. */
2294 #include <stdarg.h>
2295@@ -461,6 +461,25 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp
2296 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
2297 # endif
2298 _GL_CXXALIASWARN (fseeko);
2299+# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
2300+ /* Provide an fseek function that is consistent with fseeko. */
2301+ /* In order to avoid that fseek gets defined as a macro here, the
2302+ developer can request the 'fseek' module. */
2303+# if !GNULIB_defined_fseek_function
2304+# undef fseek
2305+# define fseek rpl_fseek
2306+static inline int _GL_ARG_NONNULL ((1))
2307+rpl_fseek (FILE *fp, long offset, int whence)
2308+{
2309+# if @REPLACE_FSEEKO@
2310+ return rpl_fseeko (fp, offset, whence);
2311+# else
2312+ return fseeko (fp, offset, whence);
2313+# endif
2314+}
2315+# define GNULIB_defined_fseek_function 1
2316+# endif
2317+# endif
2318 #elif defined GNULIB_POSIXCHECK
2319 # define _GL_FSEEK_WARN /* Category 1, above. */
2320 # undef fseek
2321@@ -520,6 +539,25 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *
2322 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
2323 # endif
2324 _GL_CXXALIASWARN (ftello);
2325+# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
2326+ /* Provide an ftell function that is consistent with ftello. */
2327+ /* In order to avoid that ftell gets defined as a macro here, the
2328+ developer can request the 'ftell' module. */
2329+# if !GNULIB_defined_ftell_function
2330+# undef ftell
2331+# define ftell rpl_ftell
2332+static inline long _GL_ARG_NONNULL ((1))
2333+rpl_ftell (FILE *f)
2334+{
2335+# if @REPLACE_FTELLO@
2336+ return rpl_ftello (f);
2337+# else
2338+ return ftello (f);
2339+# endif
2340+}
2341+# define GNULIB_defined_ftell_function 1
2342+# endif
2343+# endif
2344 #elif defined GNULIB_POSIXCHECK
2345 # define _GL_FTELL_WARN /* Category 1, above. */
2346 # undef ftell
2347@@ -1307,6 +1345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is
2348 #endif
2349
2350
2351-#endif /* _@GUARD_PREFIX@_STDIO_H */
2352-#endif /* _@GUARD_PREFIX@_STDIO_H */
2353+#endif /* _GL_STDIO_H */
2354+#endif /* _GL_STDIO_H */
2355 #endif
2356diff -Naurp libiconv-1.14.org//srclib/stdlib.in.h libiconv-1.14/srclib/stdlib.in.h
2357--- libiconv-1.14.org//srclib/stdlib.in.h 2011-08-07 06:42:06.000000000 -0700
2358+++ libiconv-1.14/srclib/stdlib.in.h 2012-01-08 02:07:40.390484459 -0800
2359@@ -28,13 +28,13 @@
2360 #else
2361 /* Normal invocation convention. */
2362
2363-#ifndef _@GUARD_PREFIX@_STDLIB_H
2364+#ifndef _GL_STDLIB_H
2365
2366 /* The include_next requires a split double-inclusion guard. */
2367 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
2368
2369-#ifndef _@GUARD_PREFIX@_STDLIB_H
2370-#define _@GUARD_PREFIX@_STDLIB_H
2371+#ifndef _GL_STDLIB_H
2372+#define _GL_STDLIB_H
2373
2374 /* NetBSD 5.0 mis-defines NULL. */
2375 #include <stddef.h>
2376@@ -89,7 +89,11 @@ struct random_data
2377 # include <unistd.h>
2378 #endif
2379
2380-/* The definition of _Noreturn is copied here. */
2381+#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
2382+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
2383+#else
2384+# define _GL_ATTRIBUTE_NORETURN
2385+#endif
2386
2387 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
2388
2389@@ -116,7 +120,7 @@ struct random_data
2390 /* Terminate the current process with the given return code, without running
2391 the 'atexit' handlers. */
2392 # if !@HAVE__EXIT@
2393-_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
2394+_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
2395 # endif
2396 _GL_CXXALIAS_SYS (_Exit, void, (int status));
2397 _GL_CXXALIASWARN (_Exit);
2398@@ -757,6 +761,6 @@ _GL_CXXALIASWARN (wctomb);
2399 #endif
2400
2401
2402-#endif /* _@GUARD_PREFIX@_STDLIB_H */
2403-#endif /* _@GUARD_PREFIX@_STDLIB_H */
2404+#endif /* _GL_STDLIB_H */
2405+#endif /* _GL_STDLIB_H */
2406 #endif
2407diff -Naurp libiconv-1.14.org//srclib/strerror.c libiconv-1.14/srclib/strerror.c
2408--- libiconv-1.14.org//srclib/strerror.c 2011-08-07 06:42:06.000000000 -0700
2409+++ libiconv-1.14/srclib/strerror.c 2012-01-08 02:07:40.406484461 -0800
2410@@ -17,54 +17,340 @@
2411
2412 #include <config.h>
2413
2414-/* Specification. */
2415 #include <string.h>
2416
2417-#include <errno.h>
2418-#include <stdio.h>
2419-#include <stdlib.h>
2420-#include <string.h>
2421+#if REPLACE_STRERROR
2422+
2423+# include <errno.h>
2424+# include <stdio.h>
2425+
2426+# if GNULIB_defined_ESOCK /* native Windows platforms */
2427+# if HAVE_WINSOCK2_H
2428+# include <winsock2.h>
2429+# endif
2430+# endif
2431
2432-#include "intprops.h"
2433-#include "strerror-override.h"
2434-#include "verify.h"
2435+# include "intprops.h"
2436
2437 /* Use the system functions, not the gnulib overrides in this file. */
2438-#undef sprintf
2439+# undef sprintf
2440+
2441+# undef strerror
2442+# if ! HAVE_DECL_STRERROR
2443+# define strerror(n) NULL
2444+# endif
2445
2446 char *
2447-strerror (int n)
2448-#undef strerror
2449+rpl_strerror (int n)
2450 {
2451- static char buf[STACKBUF_LEN];
2452- size_t len;
2453+ char const *msg = NULL;
2454+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
2455+ switch (n)
2456+ {
2457+# if GNULIB_defined_ETXTBSY
2458+ case ETXTBSY:
2459+ msg = "Text file busy";
2460+ break;
2461+# endif
2462+
2463+# if GNULIB_defined_ESOCK /* native Windows platforms */
2464+ /* EWOULDBLOCK is the same as EAGAIN. */
2465+ case EINPROGRESS:
2466+ msg = "Operation now in progress";
2467+ break;
2468+ case EALREADY:
2469+ msg = "Operation already in progress";
2470+ break;
2471+ case ENOTSOCK:
2472+ msg = "Socket operation on non-socket";
2473+ break;
2474+ case EDESTADDRREQ:
2475+ msg = "Destination address required";
2476+ break;
2477+ case EMSGSIZE:
2478+ msg = "Message too long";
2479+ break;
2480+ case EPROTOTYPE:
2481+ msg = "Protocol wrong type for socket";
2482+ break;
2483+ case ENOPROTOOPT:
2484+ msg = "Protocol not available";
2485+ break;
2486+ case EPROTONOSUPPORT:
2487+ msg = "Protocol not supported";
2488+ break;
2489+ case ESOCKTNOSUPPORT:
2490+ msg = "Socket type not supported";
2491+ break;
2492+ case EOPNOTSUPP:
2493+ msg = "Operation not supported";
2494+ break;
2495+ case EPFNOSUPPORT:
2496+ msg = "Protocol family not supported";
2497+ break;
2498+ case EAFNOSUPPORT:
2499+ msg = "Address family not supported by protocol";
2500+ break;
2501+ case EADDRINUSE:
2502+ msg = "Address already in use";
2503+ break;
2504+ case EADDRNOTAVAIL:
2505+ msg = "Cannot assign requested address";
2506+ break;
2507+ case ENETDOWN:
2508+ msg = "Network is down";
2509+ break;
2510+ case ENETUNREACH:
2511+ msg = "Network is unreachable";
2512+ break;
2513+ case ENETRESET:
2514+ msg = "Network dropped connection on reset";
2515+ break;
2516+ case ECONNABORTED:
2517+ msg = "Software caused connection abort";
2518+ break;
2519+ case ECONNRESET:
2520+ msg = "Connection reset by peer";
2521+ break;
2522+ case ENOBUFS:
2523+ msg = "No buffer space available";
2524+ break;
2525+ case EISCONN:
2526+ msg = "Transport endpoint is already connected";
2527+ break;
2528+ case ENOTCONN:
2529+ msg = "Transport endpoint is not connected";
2530+ break;
2531+ case ESHUTDOWN:
2532+ msg = "Cannot send after transport endpoint shutdown";
2533+ break;
2534+ case ETOOMANYREFS:
2535+ msg = "Too many references: cannot splice";
2536+ break;
2537+ case ETIMEDOUT:
2538+ msg = "Connection timed out";
2539+ break;
2540+ case ECONNREFUSED:
2541+ msg = "Connection refused";
2542+ break;
2543+ case ELOOP:
2544+ msg = "Too many levels of symbolic links";
2545+ break;
2546+ case EHOSTDOWN:
2547+ msg = "Host is down";
2548+ break;
2549+ case EHOSTUNREACH:
2550+ msg = "No route to host";
2551+ break;
2552+ case EPROCLIM:
2553+ msg = "Too many processes";
2554+ break;
2555+ case EUSERS:
2556+ msg = "Too many users";
2557+ break;
2558+ case EDQUOT:
2559+ msg = "Disk quota exceeded";
2560+ break;
2561+ case ESTALE:
2562+ msg = "Stale NFS file handle";
2563+ break;
2564+ case EREMOTE:
2565+ msg = "Object is remote";
2566+ break;
2567+# if HAVE_WINSOCK2_H
2568+ /* WSA_INVALID_HANDLE maps to EBADF */
2569+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
2570+ /* WSA_INVALID_PARAMETER maps to EINVAL */
2571+ case WSA_OPERATION_ABORTED:
2572+ msg = "Overlapped operation aborted";
2573+ break;
2574+ case WSA_IO_INCOMPLETE:
2575+ msg = "Overlapped I/O event object not in signaled state";
2576+ break;
2577+ case WSA_IO_PENDING:
2578+ msg = "Overlapped operations will complete later";
2579+ break;
2580+ /* WSAEINTR maps to EINTR */
2581+ /* WSAEBADF maps to EBADF */
2582+ /* WSAEACCES maps to EACCES */
2583+ /* WSAEFAULT maps to EFAULT */
2584+ /* WSAEINVAL maps to EINVAL */
2585+ /* WSAEMFILE maps to EMFILE */
2586+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
2587+ /* WSAEINPROGRESS is EINPROGRESS */
2588+ /* WSAEALREADY is EALREADY */
2589+ /* WSAENOTSOCK is ENOTSOCK */
2590+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
2591+ /* WSAEMSGSIZE is EMSGSIZE */
2592+ /* WSAEPROTOTYPE is EPROTOTYPE */
2593+ /* WSAENOPROTOOPT is ENOPROTOOPT */
2594+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
2595+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
2596+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
2597+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
2598+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
2599+ /* WSAEADDRINUSE is EADDRINUSE */
2600+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
2601+ /* WSAENETDOWN is ENETDOWN */
2602+ /* WSAENETUNREACH is ENETUNREACH */
2603+ /* WSAENETRESET is ENETRESET */
2604+ /* WSAECONNABORTED is ECONNABORTED */
2605+ /* WSAECONNRESET is ECONNRESET */
2606+ /* WSAENOBUFS is ENOBUFS */
2607+ /* WSAEISCONN is EISCONN */
2608+ /* WSAENOTCONN is ENOTCONN */
2609+ /* WSAESHUTDOWN is ESHUTDOWN */
2610+ /* WSAETOOMANYREFS is ETOOMANYREFS */
2611+ /* WSAETIMEDOUT is ETIMEDOUT */
2612+ /* WSAECONNREFUSED is ECONNREFUSED */
2613+ /* WSAELOOP is ELOOP */
2614+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
2615+ /* WSAEHOSTDOWN is EHOSTDOWN */
2616+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
2617+ /* WSAENOTEMPTY maps to ENOTEMPTY */
2618+ /* WSAEPROCLIM is EPROCLIM */
2619+ /* WSAEUSERS is EUSERS */
2620+ /* WSAEDQUOT is EDQUOT */
2621+ /* WSAESTALE is ESTALE */
2622+ /* WSAEREMOTE is EREMOTE */
2623+ case WSASYSNOTREADY:
2624+ msg = "Network subsystem is unavailable";
2625+ break;
2626+ case WSAVERNOTSUPPORTED:
2627+ msg = "Winsock.dll version out of range";
2628+ break;
2629+ case WSANOTINITIALISED:
2630+ msg = "Successful WSAStartup not yet performed";
2631+ break;
2632+ case WSAEDISCON:
2633+ msg = "Graceful shutdown in progress";
2634+ break;
2635+ case WSAENOMORE: case WSA_E_NO_MORE:
2636+ msg = "No more results";
2637+ break;
2638+ case WSAECANCELLED: case WSA_E_CANCELLED:
2639+ msg = "Call was canceled";
2640+ break;
2641+ case WSAEINVALIDPROCTABLE:
2642+ msg = "Procedure call table is invalid";
2643+ break;
2644+ case WSAEINVALIDPROVIDER:
2645+ msg = "Service provider is invalid";
2646+ break;
2647+ case WSAEPROVIDERFAILEDINIT:
2648+ msg = "Service provider failed to initialize";
2649+ break;
2650+ case WSASYSCALLFAILURE:
2651+ msg = "System call failure";
2652+ break;
2653+ case WSASERVICE_NOT_FOUND:
2654+ msg = "Service not found";
2655+ break;
2656+ case WSATYPE_NOT_FOUND:
2657+ msg = "Class type not found";
2658+ break;
2659+ case WSAEREFUSED:
2660+ msg = "Database query was refused";
2661+ break;
2662+ case WSAHOST_NOT_FOUND:
2663+ msg = "Host not found";
2664+ break;
2665+ case WSATRY_AGAIN:
2666+ msg = "Nonauthoritative host not found";
2667+ break;
2668+ case WSANO_RECOVERY:
2669+ msg = "Nonrecoverable error";
2670+ break;
2671+ case WSANO_DATA:
2672+ msg = "Valid name, no data record of requested type";
2673+ break;
2674+ /* WSA_QOS_* omitted */
2675+# endif
2676+# endif
2677+
2678+# if GNULIB_defined_ENOMSG
2679+ case ENOMSG:
2680+ msg = "No message of desired type";
2681+ break;
2682+# endif
2683+
2684+# if GNULIB_defined_EIDRM
2685+ case EIDRM:
2686+ msg = "Identifier removed";
2687+ break;
2688+# endif
2689+
2690+# if GNULIB_defined_ENOLINK
2691+ case ENOLINK:
2692+ msg = "Link has been severed";
2693+ break;
2694+# endif
2695+
2696+# if GNULIB_defined_EPROTO
2697+ case EPROTO:
2698+ msg = "Protocol error";
2699+ break;
2700+# endif
2701+
2702+# if GNULIB_defined_EMULTIHOP
2703+ case EMULTIHOP:
2704+ msg = "Multihop attempted";
2705+ break;
2706+# endif
2707+
2708+# if GNULIB_defined_EBADMSG
2709+ case EBADMSG:
2710+ msg = "Bad message";
2711+ break;
2712+# endif
2713+
2714+# if GNULIB_defined_EOVERFLOW
2715+ case EOVERFLOW:
2716+ msg = "Value too large for defined data type";
2717+ break;
2718+# endif
2719+
2720+# if GNULIB_defined_ENOTSUP
2721+ case ENOTSUP:
2722+ msg = "Not supported";
2723+ break;
2724+# endif
2725+
2726+# if GNULIB_defined_ESTALE
2727+ case ESTALE:
2728+ msg = "Stale NFS file handle";
2729+ break;
2730+# endif
2731+
2732+# if GNULIB_defined_EDQUOT
2733+ case EDQUOT:
2734+ msg = "Disk quota exceeded";
2735+ break;
2736+# endif
2737+
2738+# if GNULIB_defined_ECANCELED
2739+ case ECANCELED:
2740+ msg = "Operation canceled";
2741+ break;
2742+# endif
2743+ }
2744
2745- /* Cast away const, due to the historical signature of strerror;
2746- callers should not be modifying the string. */
2747- const char *msg = strerror_override (n);
2748 if (msg)
2749 return (char *) msg;
2750
2751- msg = strerror (n);
2752+ {
2753+ char *result = strerror (n);
2754
2755- /* Our strerror_r implementation might use the system's strerror
2756- buffer, so all other clients of strerror have to see the error
2757- copied into a buffer that we manage. This is not thread-safe,
2758- even if the system strerror is, but portable programs shouldn't
2759- be using strerror if they care about thread-safety. */
2760- if (!msg || !*msg)
2761- {
2762- static char const fmt[] = "Unknown error %d";
2763- verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
2764- sprintf (buf, fmt, n);
2765- errno = EINVAL;
2766- return buf;
2767- }
2768+ if (result == NULL || result[0] == '\0')
2769+ {
2770+ static char const fmt[] = "Unknown error (%d)";
2771+ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
2772+ sprintf (msg_buf, fmt, n);
2773+ return msg_buf;
2774+ }
2775
2776- /* Fix STACKBUF_LEN if this ever aborts. */
2777- len = strlen (msg);
2778- if (sizeof buf <= len)
2779- abort ();
2780-
2781- return memcpy (buf, msg, len + 1);
2782+ return result;
2783+ }
2784 }
2785+
2786+#endif
2787diff -Naurp libiconv-1.14.org//srclib/strerror-override.c libiconv-1.14/srclib/strerror-override.c
2788--- libiconv-1.14.org//srclib/strerror-override.c 2011-08-07 06:42:06.000000000 -0700
2789+++ libiconv-1.14/srclib/strerror-override.c 1969-12-31 16:00:00.000000000 -0800
2790@@ -1,279 +0,0 @@
2791-/* strerror-override.c --- POSIX compatible system error routine
2792-
2793- Copyright (C) 2010-2011 Free Software Foundation, Inc.
2794-
2795- This program is free software: you can redistribute it and/or modify
2796- it under the terms of the GNU General Public License as published by
2797- the Free Software Foundation; either version 3 of the License, or
2798- (at your option) any later version.
2799-
2800- This program is distributed in the hope that it will be useful,
2801- but WITHOUT ANY WARRANTY; without even the implied warranty of
2802- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2803- GNU General Public License for more details.
2804-
2805- You should have received a copy of the GNU General Public License
2806- along with this program. If not, see <http://www.gnu.org/licenses/>. */
2807-
2808-/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
2809-
2810-#include <config.h>
2811-
2812-#include "strerror-override.h"
2813-
2814-#include <errno.h>
2815-
2816-#if GNULIB_defined_ESOCK /* native Windows platforms */
2817-# if HAVE_WINSOCK2_H
2818-# include <winsock2.h>
2819-# endif
2820-#endif
2821-
2822-/* If ERRNUM maps to an errno value defined by gnulib, return a string
2823- describing the error. Otherwise return NULL. */
2824-const char *
2825-strerror_override (int errnum)
2826-{
2827- /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
2828- switch (errnum)
2829- {
2830-#if REPLACE_STRERROR_0
2831- case 0:
2832- return "Success";
2833-#endif
2834-
2835-#if GNULIB_defined_ETXTBSY
2836- case ETXTBSY:
2837- return "Text file busy";
2838-#endif
2839-
2840-#if GNULIB_defined_ESOCK /* native Windows platforms */
2841- /* EWOULDBLOCK is the same as EAGAIN. */
2842- case EINPROGRESS:
2843- return "Operation now in progress";
2844- case EALREADY:
2845- return "Operation already in progress";
2846- case ENOTSOCK:
2847- return "Socket operation on non-socket";
2848- case EDESTADDRREQ:
2849- return "Destination address required";
2850- case EMSGSIZE:
2851- return "Message too long";
2852- case EPROTOTYPE:
2853- return "Protocol wrong type for socket";
2854- case ENOPROTOOPT:
2855- return "Protocol not available";
2856- case EPROTONOSUPPORT:
2857- return "Protocol not supported";
2858- case ESOCKTNOSUPPORT:
2859- return "Socket type not supported";
2860- case EOPNOTSUPP:
2861- return "Operation not supported";
2862- case EPFNOSUPPORT:
2863- return "Protocol family not supported";
2864- case EAFNOSUPPORT:
2865- return "Address family not supported by protocol";
2866- case EADDRINUSE:
2867- return "Address already in use";
2868- case EADDRNOTAVAIL:
2869- return "Cannot assign requested address";
2870- case ENETDOWN:
2871- return "Network is down";
2872- case ENETUNREACH:
2873- return "Network is unreachable";
2874- case ENETRESET:
2875- return "Network dropped connection on reset";
2876- case ECONNABORTED:
2877- return "Software caused connection abort";
2878- case ECONNRESET:
2879- return "Connection reset by peer";
2880- case ENOBUFS:
2881- return "No buffer space available";
2882- case EISCONN:
2883- return "Transport endpoint is already connected";
2884- case ENOTCONN:
2885- return "Transport endpoint is not connected";
2886- case ESHUTDOWN:
2887- return "Cannot send after transport endpoint shutdown";
2888- case ETOOMANYREFS:
2889- return "Too many references: cannot splice";
2890- case ETIMEDOUT:
2891- return "Connection timed out";
2892- case ECONNREFUSED:
2893- return "Connection refused";
2894- case ELOOP:
2895- return "Too many levels of symbolic links";
2896- case EHOSTDOWN:
2897- return "Host is down";
2898- case EHOSTUNREACH:
2899- return "No route to host";
2900- case EPROCLIM:
2901- return "Too many processes";
2902- case EUSERS:
2903- return "Too many users";
2904- case EDQUOT:
2905- return "Disk quota exceeded";
2906- case ESTALE:
2907- return "Stale NFS file handle";
2908- case EREMOTE:
2909- return "Object is remote";
2910-# if HAVE_WINSOCK2_H
2911- /* WSA_INVALID_HANDLE maps to EBADF */
2912- /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
2913- /* WSA_INVALID_PARAMETER maps to EINVAL */
2914- case WSA_OPERATION_ABORTED:
2915- return "Overlapped operation aborted";
2916- case WSA_IO_INCOMPLETE:
2917- return "Overlapped I/O event object not in signaled state";
2918- case WSA_IO_PENDING:
2919- return "Overlapped operations will complete later";
2920- /* WSAEINTR maps to EINTR */
2921- /* WSAEBADF maps to EBADF */
2922- /* WSAEACCES maps to EACCES */
2923- /* WSAEFAULT maps to EFAULT */
2924- /* WSAEINVAL maps to EINVAL */
2925- /* WSAEMFILE maps to EMFILE */
2926- /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
2927- /* WSAEINPROGRESS is EINPROGRESS */
2928- /* WSAEALREADY is EALREADY */
2929- /* WSAENOTSOCK is ENOTSOCK */
2930- /* WSAEDESTADDRREQ is EDESTADDRREQ */
2931- /* WSAEMSGSIZE is EMSGSIZE */
2932- /* WSAEPROTOTYPE is EPROTOTYPE */
2933- /* WSAENOPROTOOPT is ENOPROTOOPT */
2934- /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
2935- /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
2936- /* WSAEOPNOTSUPP is EOPNOTSUPP */
2937- /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
2938- /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
2939- /* WSAEADDRINUSE is EADDRINUSE */
2940- /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
2941- /* WSAENETDOWN is ENETDOWN */
2942- /* WSAENETUNREACH is ENETUNREACH */
2943- /* WSAENETRESET is ENETRESET */
2944- /* WSAECONNABORTED is ECONNABORTED */
2945- /* WSAECONNRESET is ECONNRESET */
2946- /* WSAENOBUFS is ENOBUFS */
2947- /* WSAEISCONN is EISCONN */
2948- /* WSAENOTCONN is ENOTCONN */
2949- /* WSAESHUTDOWN is ESHUTDOWN */
2950- /* WSAETOOMANYREFS is ETOOMANYREFS */
2951- /* WSAETIMEDOUT is ETIMEDOUT */
2952- /* WSAECONNREFUSED is ECONNREFUSED */
2953- /* WSAELOOP is ELOOP */
2954- /* WSAENAMETOOLONG maps to ENAMETOOLONG */
2955- /* WSAEHOSTDOWN is EHOSTDOWN */
2956- /* WSAEHOSTUNREACH is EHOSTUNREACH */
2957- /* WSAENOTEMPTY maps to ENOTEMPTY */
2958- /* WSAEPROCLIM is EPROCLIM */
2959- /* WSAEUSERS is EUSERS */
2960- /* WSAEDQUOT is EDQUOT */
2961- /* WSAESTALE is ESTALE */
2962- /* WSAEREMOTE is EREMOTE */
2963- case WSASYSNOTREADY:
2964- return "Network subsystem is unavailable";
2965- case WSAVERNOTSUPPORTED:
2966- return "Winsock.dll version out of range";
2967- case WSANOTINITIALISED:
2968- return "Successful WSAStartup not yet performed";
2969- case WSAEDISCON:
2970- return "Graceful shutdown in progress";
2971- case WSAENOMORE: case WSA_E_NO_MORE:
2972- return "No more results";
2973- case WSAECANCELLED: case WSA_E_CANCELLED:
2974- return "Call was canceled";
2975- case WSAEINVALIDPROCTABLE:
2976- return "Procedure call table is invalid";
2977- case WSAEINVALIDPROVIDER:
2978- return "Service provider is invalid";
2979- case WSAEPROVIDERFAILEDINIT:
2980- return "Service provider failed to initialize";
2981- case WSASYSCALLFAILURE:
2982- return "System call failure";
2983- case WSASERVICE_NOT_FOUND:
2984- return "Service not found";
2985- case WSATYPE_NOT_FOUND:
2986- return "Class type not found";
2987- case WSAEREFUSED:
2988- return "Database query was refused";
2989- case WSAHOST_NOT_FOUND:
2990- return "Host not found";
2991- case WSATRY_AGAIN:
2992- return "Nonauthoritative host not found";
2993- case WSANO_RECOVERY:
2994- return "Nonrecoverable error";
2995- case WSANO_DATA:
2996- return "Valid name, no data record of requested type";
2997- /* WSA_QOS_* omitted */
2998-# endif
2999-#endif
3000-
3001-#if GNULIB_defined_ENOMSG
3002- case ENOMSG:
3003- return "No message of desired type";
3004-#endif
3005-
3006-#if GNULIB_defined_EIDRM
3007- case EIDRM:
3008- return "Identifier removed";
3009-#endif
3010-
3011-#if GNULIB_defined_ENOLINK
3012- case ENOLINK:
3013- return "Link has been severed";
3014-#endif
3015-
3016-#if GNULIB_defined_EPROTO
3017- case EPROTO:
3018- return "Protocol error";
3019-#endif
3020-
3021-#if GNULIB_defined_EMULTIHOP
3022- case EMULTIHOP:
3023- return "Multihop attempted";
3024-#endif
3025-
3026-#if GNULIB_defined_EBADMSG
3027- case EBADMSG:
3028- return "Bad message";
3029-#endif
3030-
3031-#if GNULIB_defined_EOVERFLOW
3032- case EOVERFLOW:
3033- return "Value too large for defined data type";
3034-#endif
3035-
3036-#if GNULIB_defined_ENOTSUP
3037- case ENOTSUP:
3038- return "Not supported";
3039-#endif
3040-
3041-#if GNULIB_defined_ENETRESET
3042- case ENETRESET:
3043- return "Network dropped connection on reset";
3044-#endif
3045-
3046-#if GNULIB_defined_ECONNABORTED
3047- case ECONNABORTED:
3048- return "Software caused connection abort";
3049-#endif
3050-
3051-#if GNULIB_defined_ESTALE
3052- case ESTALE:
3053- return "Stale NFS file handle";
3054-#endif
3055-
3056-#if GNULIB_defined_EDQUOT
3057- case EDQUOT:
3058- return "Disk quota exceeded";
3059-#endif
3060-
3061-#if GNULIB_defined_ECANCELED
3062- case ECANCELED:
3063- return "Operation canceled";
3064-#endif
3065-
3066- default:
3067- return NULL;
3068- }
3069-}
3070diff -Naurp libiconv-1.14.org//srclib/strerror-override.h libiconv-1.14/srclib/strerror-override.h
3071--- libiconv-1.14.org//srclib/strerror-override.h 2011-08-07 06:42:06.000000000 -0700
3072+++ libiconv-1.14/srclib/strerror-override.h 1969-12-31 16:00:00.000000000 -0800
3073@@ -1,52 +0,0 @@
3074-/* strerror-override.h --- POSIX compatible system error routine
3075-
3076- Copyright (C) 2010-2011 Free Software Foundation, Inc.
3077-
3078- This program is free software: you can redistribute it and/or modify
3079- it under the terms of the GNU General Public License as published by
3080- the Free Software Foundation; either version 3 of the License, or
3081- (at your option) any later version.
3082-
3083- This program is distributed in the hope that it will be useful,
3084- but WITHOUT ANY WARRANTY; without even the implied warranty of
3085- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3086- GNU General Public License for more details.
3087-
3088- You should have received a copy of the GNU General Public License
3089- along with this program. If not, see <http://www.gnu.org/licenses/>. */
3090-
3091-#ifndef _GL_STRERROR_OVERRIDE_H
3092-# define _GL_STRERROR_OVERRIDE_H
3093-
3094-# include <errno.h>
3095-# include <stddef.h>
3096-
3097-/* Reasonable buffer size that should never trigger ERANGE; if this
3098- proves too small, we intentionally abort(), to remind us to fix
3099- this value. */
3100-# define STACKBUF_LEN 256
3101-
3102-/* If ERRNUM maps to an errno value defined by gnulib, return a string
3103- describing the error. Otherwise return NULL. */
3104-# if REPLACE_STRERROR_0 \
3105- || GNULIB_defined_ETXTBSY \
3106- || GNULIB_defined_ESOCK \
3107- || GNULIB_defined_ENOMSG \
3108- || GNULIB_defined_EIDRM \
3109- || GNULIB_defined_ENOLINK \
3110- || GNULIB_defined_EPROTO \
3111- || GNULIB_defined_EMULTIHOP \
3112- || GNULIB_defined_EBADMSG \
3113- || GNULIB_defined_EOVERFLOW \
3114- || GNULIB_defined_ENOTSUP \
3115- || GNULIB_defined_ENETRESET \
3116- || GNULIB_defined_ECONNABORTED \
3117- || GNULIB_defined_ESTALE \
3118- || GNULIB_defined_EDQUOT \
3119- || GNULIB_defined_ECANCELED
3120-extern const char *strerror_override (int errnum);
3121-# else
3122-# define strerror_override(ignored) NULL
3123-# endif
3124-
3125-#endif /* _GL_STRERROR_OVERRIDE_H */
3126diff -Naurp libiconv-1.14.org//srclib/string.in.h libiconv-1.14/srclib/string.in.h
3127--- libiconv-1.14.org//srclib/string.in.h 2011-08-07 06:42:06.000000000 -0700
3128+++ libiconv-1.14/srclib/string.in.h 2012-01-08 02:07:40.418484461 -0800
3129@@ -16,7 +16,7 @@
3130 along with this program; if not, write to the Free Software Foundation,
3131 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
3132
3133-#ifndef _@GUARD_PREFIX@_STRING_H
3134+#ifndef _GL_STRING_H
3135
3136 #if __GNUC__ >= 3
3137 @PRAGMA_SYSTEM_HEADER@
3138@@ -26,8 +26,8 @@
3139 /* The include_next requires a split double-inclusion guard. */
3140 #@INCLUDE_NEXT@ @NEXT_STRING_H@
3141
3142-#ifndef _@GUARD_PREFIX@_STRING_H
3143-#define _@GUARD_PREFIX@_STRING_H
3144+#ifndef _GL_STRING_H
3145+#define _GL_STRING_H
3146
3147 /* NetBSD 5.0 mis-defines NULL. */
3148 #include <stddef.h>
3149@@ -59,36 +59,6 @@
3150 /* The definition of _GL_WARN_ON_USE is copied here. */
3151
3152
3153-/* Find the index of the least-significant set bit. */
3154-#if @GNULIB_FFSL@
3155-# if !@HAVE_FFSL@
3156-_GL_FUNCDECL_SYS (ffsl, int, (long int i));
3157-# endif
3158-_GL_CXXALIAS_SYS (ffsl, int, (long int i));
3159-_GL_CXXALIASWARN (ffsl);
3160-#elif defined GNULIB_POSIXCHECK
3161-# undef ffsl
3162-# if HAVE_RAW_DECL_FFSL
3163-_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
3164-# endif
3165-#endif
3166-
3167-
3168-/* Find the index of the least-significant set bit. */
3169-#if @GNULIB_FFSLL@
3170-# if !@HAVE_FFSLL@
3171-_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
3172-# endif
3173-_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
3174-_GL_CXXALIASWARN (ffsll);
3175-#elif defined GNULIB_POSIXCHECK
3176-# undef ffsll
3177-# if HAVE_RAW_DECL_FFSLL
3178-_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
3179-# endif
3180-#endif
3181-
3182-
3183 /* Return the first instance of C within N bytes of S, or NULL. */
3184 #if @GNULIB_MEMCHR@
3185 # if @REPLACE_MEMCHR@
3186@@ -1007,5 +977,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp
3187 #endif
3188
3189
3190-#endif /* _@GUARD_PREFIX@_STRING_H */
3191-#endif /* _@GUARD_PREFIX@_STRING_H */
3192+#endif /* _GL_STRING_H */
3193+#endif /* _GL_STRING_H */
3194diff -Naurp libiconv-1.14.org//srclib/sys_stat.in.h libiconv-1.14/srclib/sys_stat.in.h
3195--- libiconv-1.14.org//srclib/sys_stat.in.h 2011-08-07 06:42:06.000000000 -0700
3196+++ libiconv-1.14/srclib/sys_stat.in.h 2012-01-08 02:07:40.430484461 -0800
3197@@ -34,7 +34,7 @@
3198 #else
3199 /* Normal invocation convention. */
3200
3201-#ifndef _@GUARD_PREFIX@_SYS_STAT_H
3202+#ifndef _GL_SYS_STAT_H
3203
3204 /* Get nlink_t. */
3205 #include <sys/types.h>
3206@@ -45,8 +45,8 @@
3207 /* The include_next requires a split double-inclusion guard. */
3208 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
3209
3210-#ifndef _@GUARD_PREFIX@_SYS_STAT_H
3211-#define _@GUARD_PREFIX@_SYS_STAT_H
3212+#ifndef _GL_SYS_STAT_H
3213+#define _GL_SYS_STAT_H
3214
3215 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
3216
3217@@ -653,6 +653,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat i
3218 #endif
3219
3220
3221-#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
3222-#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
3223+#endif /* _GL_SYS_STAT_H */
3224+#endif /* _GL_SYS_STAT_H */
3225 #endif
3226diff -Naurp libiconv-1.14.org//srclib/time.in.h libiconv-1.14/srclib/time.in.h
3227--- libiconv-1.14.org//srclib/time.in.h 2011-08-07 06:42:06.000000000 -0700
3228+++ libiconv-1.14/srclib/time.in.h 2012-01-08 02:07:40.438484462 -0800
3229@@ -28,13 +28,13 @@
3230 without adding our own declarations. */
3231 #if (defined __need_time_t || defined __need_clock_t \
3232 || defined __need_timespec \
3233- || defined _@GUARD_PREFIX@_TIME_H)
3234+ || defined _GL_TIME_H)
3235
3236 # @INCLUDE_NEXT@ @NEXT_TIME_H@
3237
3238 #else
3239
3240-# define _@GUARD_PREFIX@_TIME_H
3241+# define _GL_TIME_H
3242
3243 # @INCLUDE_NEXT@ @NEXT_TIME_H@
3244
3245diff -Naurp libiconv-1.14.org//srclib/unistd.in.h libiconv-1.14/srclib/unistd.in.h
3246--- libiconv-1.14.org//srclib/unistd.in.h 2011-08-07 06:42:06.000000000 -0700
3247+++ libiconv-1.14/srclib/unistd.in.h 2012-01-08 02:07:40.450484462 -0800
3248@@ -36,7 +36,7 @@
3249 # define _GL_WINSOCK2_H_WITNESS
3250
3251 /* Normal invocation. */
3252-#elif !defined _@GUARD_PREFIX@_UNISTD_H
3253+#elif !defined _GL_UNISTD_H
3254
3255 /* The include_next requires a split double-inclusion guard. */
3256 #if @HAVE_UNISTD_H@
3257@@ -51,8 +51,8 @@
3258 # undef _GL_INCLUDING_WINSOCK2_H
3259 #endif
3260
3261-#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
3262-#define _@GUARD_PREFIX@_UNISTD_H
3263+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
3264+#define _GL_UNISTD_H
3265
3266 /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
3267 #include <stddef.h>
3268@@ -117,77 +117,78 @@
3269 /* The definition of _GL_WARN_ON_USE is copied here. */
3270
3271
3272-/* Hide some function declarations from <winsock2.h>. */
3273-
3274-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
3275-# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
3276-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3277-# undef socket
3278-# define socket socket_used_without_including_sys_socket_h
3279-# undef connect
3280-# define connect connect_used_without_including_sys_socket_h
3281-# undef accept
3282-# define accept accept_used_without_including_sys_socket_h
3283-# undef bind
3284-# define bind bind_used_without_including_sys_socket_h
3285-# undef getpeername
3286-# define getpeername getpeername_used_without_including_sys_socket_h
3287-# undef getsockname
3288-# define getsockname getsockname_used_without_including_sys_socket_h
3289-# undef getsockopt
3290-# define getsockopt getsockopt_used_without_including_sys_socket_h
3291-# undef listen
3292-# define listen listen_used_without_including_sys_socket_h
3293-# undef recv
3294-# define recv recv_used_without_including_sys_socket_h
3295-# undef send
3296-# define send send_used_without_including_sys_socket_h
3297-# undef recvfrom
3298-# define recvfrom recvfrom_used_without_including_sys_socket_h
3299-# undef sendto
3300-# define sendto sendto_used_without_including_sys_socket_h
3301-# undef setsockopt
3302-# define setsockopt setsockopt_used_without_including_sys_socket_h
3303-# undef shutdown
3304-# define shutdown shutdown_used_without_including_sys_socket_h
3305-# else
3306- _GL_WARN_ON_USE (socket,
3307- "socket() used without including <sys/socket.h>");
3308- _GL_WARN_ON_USE (connect,
3309- "connect() used without including <sys/socket.h>");
3310- _GL_WARN_ON_USE (accept,
3311- "accept() used without including <sys/socket.h>");
3312- _GL_WARN_ON_USE (bind,
3313- "bind() used without including <sys/socket.h>");
3314- _GL_WARN_ON_USE (getpeername,
3315- "getpeername() used without including <sys/socket.h>");
3316- _GL_WARN_ON_USE (getsockname,
3317- "getsockname() used without including <sys/socket.h>");
3318- _GL_WARN_ON_USE (getsockopt,
3319- "getsockopt() used without including <sys/socket.h>");
3320- _GL_WARN_ON_USE (listen,
3321- "listen() used without including <sys/socket.h>");
3322- _GL_WARN_ON_USE (recv,
3323- "recv() used without including <sys/socket.h>");
3324- _GL_WARN_ON_USE (send,
3325- "send() used without including <sys/socket.h>");
3326- _GL_WARN_ON_USE (recvfrom,
3327- "recvfrom() used without including <sys/socket.h>");
3328- _GL_WARN_ON_USE (sendto,
3329- "sendto() used without including <sys/socket.h>");
3330- _GL_WARN_ON_USE (setsockopt,
3331- "setsockopt() used without including <sys/socket.h>");
3332- _GL_WARN_ON_USE (shutdown,
3333- "shutdown() used without including <sys/socket.h>");
3334+#if @GNULIB_GETHOSTNAME@
3335+/* Get all possible declarations of gethostname(). */
3336+# if @UNISTD_H_HAVE_WINSOCK2_H@
3337+# if !defined _GL_SYS_SOCKET_H
3338+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3339+# undef socket
3340+# define socket socket_used_without_including_sys_socket_h
3341+# undef connect
3342+# define connect connect_used_without_including_sys_socket_h
3343+# undef accept
3344+# define accept accept_used_without_including_sys_socket_h
3345+# undef bind
3346+# define bind bind_used_without_including_sys_socket_h
3347+# undef getpeername
3348+# define getpeername getpeername_used_without_including_sys_socket_h
3349+# undef getsockname
3350+# define getsockname getsockname_used_without_including_sys_socket_h
3351+# undef getsockopt
3352+# define getsockopt getsockopt_used_without_including_sys_socket_h
3353+# undef listen
3354+# define listen listen_used_without_including_sys_socket_h
3355+# undef recv
3356+# define recv recv_used_without_including_sys_socket_h
3357+# undef send
3358+# define send send_used_without_including_sys_socket_h
3359+# undef recvfrom
3360+# define recvfrom recvfrom_used_without_including_sys_socket_h
3361+# undef sendto
3362+# define sendto sendto_used_without_including_sys_socket_h
3363+# undef setsockopt
3364+# define setsockopt setsockopt_used_without_including_sys_socket_h
3365+# undef shutdown
3366+# define shutdown shutdown_used_without_including_sys_socket_h
3367+# else
3368+ _GL_WARN_ON_USE (socket,
3369+ "socket() used without including <sys/socket.h>");
3370+ _GL_WARN_ON_USE (connect,
3371+ "connect() used without including <sys/socket.h>");
3372+ _GL_WARN_ON_USE (accept,
3373+ "accept() used without including <sys/socket.h>");
3374+ _GL_WARN_ON_USE (bind,
3375+ "bind() used without including <sys/socket.h>");
3376+ _GL_WARN_ON_USE (getpeername,
3377+ "getpeername() used without including <sys/socket.h>");
3378+ _GL_WARN_ON_USE (getsockname,
3379+ "getsockname() used without including <sys/socket.h>");
3380+ _GL_WARN_ON_USE (getsockopt,
3381+ "getsockopt() used without including <sys/socket.h>");
3382+ _GL_WARN_ON_USE (listen,
3383+ "listen() used without including <sys/socket.h>");
3384+ _GL_WARN_ON_USE (recv,
3385+ "recv() used without including <sys/socket.h>");
3386+ _GL_WARN_ON_USE (send,
3387+ "send() used without including <sys/socket.h>");
3388+ _GL_WARN_ON_USE (recvfrom,
3389+ "recvfrom() used without including <sys/socket.h>");
3390+ _GL_WARN_ON_USE (sendto,
3391+ "sendto() used without including <sys/socket.h>");
3392+ _GL_WARN_ON_USE (setsockopt,
3393+ "setsockopt() used without including <sys/socket.h>");
3394+ _GL_WARN_ON_USE (shutdown,
3395+ "shutdown() used without including <sys/socket.h>");
3396+# endif
3397 # endif
3398-# endif
3399-# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
3400-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3401-# undef select
3402-# define select select_used_without_including_sys_select_h
3403-# else
3404- _GL_WARN_ON_USE (select,
3405- "select() used without including <sys/select.h>");
3406+# if !defined _GL_SYS_SELECT_H
3407+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3408+# undef select
3409+# define select select_used_without_including_sys_select_h
3410+# else
3411+ _GL_WARN_ON_USE (select,
3412+ "select() used without including <sys/select.h>");
3413+# endif
3414 # endif
3415 # endif
3416 #endif
3417@@ -1061,7 +1062,6 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unport
3418 specification <http://www.opengroup.org/susv3xsh/pread.html>. */
3419 # if @REPLACE_PREAD@
3420 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3421-# undef pread
3422 # define pread rpl_pread
3423 # endif
3424 _GL_FUNCDECL_RPL (pread, ssize_t,
3425@@ -1096,7 +1096,6 @@ _GL_WARN_ON_USE (pread, "pread is unport
3426 <http://www.opengroup.org/susv3xsh/pwrite.html>. */
3427 # if @REPLACE_PWRITE@
3428 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
3429-# undef pwrite
3430 # define pwrite rpl_pwrite
3431 # endif
3432 _GL_FUNCDECL_RPL (pwrite, ssize_t,
3433@@ -1417,5 +1416,5 @@ _GL_CXXALIASWARN (write);
3434 #endif
3435
3436
3437-#endif /* _@GUARD_PREFIX@_UNISTD_H */
3438-#endif /* _@GUARD_PREFIX@_UNISTD_H */
3439+#endif /* _GL_UNISTD_H */
3440+#endif /* _GL_UNISTD_H */
3441diff -Naurp libiconv-1.14.org//srclib/verify.h libiconv-1.14/srclib/verify.h
3442--- libiconv-1.14.org//srclib/verify.h 2011-08-07 06:42:07.000000000 -0700
3443+++ libiconv-1.14/srclib/verify.h 2012-01-08 02:07:40.494484464 -0800
3444@@ -164,13 +164,10 @@
3445 (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
3446
3447 # ifdef __cplusplus
3448-# if !GNULIB_defined_struct__gl_verify_type
3449 template <int w>
3450 struct _gl_verify_type {
3451 unsigned int _gl_verify_error_if_negative: w;
3452 };
3453-# define GNULIB_defined_struct__gl_verify_type 1
3454-# endif
3455 # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
3456 _gl_verify_type<(R) ? 1 : -1>
3457 # elif defined _GL_HAVE__STATIC_ASSERT
3458@@ -209,7 +206,7 @@ template <int w>
3459 # endif
3460 # endif
3461
3462-/* @assert.h omit start@ */
3463+# ifdef _GL_VERIFY_H
3464
3465 /* Each of these macros verifies that its argument R is nonzero. To
3466 be portable, R should be an integer constant expression. Unlike
3467@@ -221,23 +218,15 @@ template <int w>
3468 contexts, e.g., the top level. */
3469
3470 /* Verify requirement R at compile-time, as an integer constant expression.
3471- Return 1. This is equivalent to verify_expr (R, 1).
3472-
3473- verify_true is obsolescent; please use verify_expr instead. */
3474-
3475-# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
3476+ Return 1. */
3477
3478-/* Verify requirement R at compile-time. Return the value of the
3479- expression E. */
3480-
3481-# define verify_expr(R, E) \
3482- (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
3483+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
3484
3485 /* Verify requirement R at compile-time, as a declaration without a
3486 trailing ';'. */
3487
3488-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
3489+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
3490
3491-/* @assert.h omit end@ */
3492+# endif
3493
3494 #endif
3495diff -Naurp libiconv-1.14.org//srcm4/canonicalize.m4 libiconv-1.14/srcm4/canonicalize.m4
3496--- libiconv-1.14.org//srcm4/canonicalize.m4 2011-08-07 06:42:07.000000000 -0700
3497+++ libiconv-1.14/srcm4/canonicalize.m4 2012-01-08 02:07:40.566484469 -0800
3498@@ -1,4 +1,4 @@
3499-# canonicalize.m4 serial 23
3500+# canonicalize.m4 serial 21
3501
3502 dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
3503
3504@@ -10,6 +10,8 @@ dnl with or without modifications, as lo
3505 # not provide or fix realpath.
3506 AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
3507 [
3508+ AC_LIBOBJ([canonicalize])
3509+
3510 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
3511 AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
3512 AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
3513@@ -28,14 +30,16 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
3514 AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
3515 if test $ac_cv_func_canonicalize_file_name = no; then
3516 HAVE_CANONICALIZE_FILE_NAME=0
3517+ AC_LIBOBJ([canonicalize-lgpl])
3518 if test $ac_cv_func_realpath = no; then
3519 HAVE_REALPATH=0
3520 elif test "$gl_cv_func_realpath_works" != yes; then
3521 REPLACE_REALPATH=1
3522 fi
3523 elif test "$gl_cv_func_realpath_works" != yes; then
3524- REPLACE_CANONICALIZE_FILE_NAME=1
3525+ AC_LIBOBJ([canonicalize-lgpl])
3526 REPLACE_REALPATH=1
3527+ REPLACE_CANONICALIZE_FILE_NAME=1
3528 fi
3529 ])
3530
3531diff -Naurp libiconv-1.14.org//srcm4/errno_h.m4 libiconv-1.14/srcm4/errno_h.m4
3532--- libiconv-1.14.org//srcm4/errno_h.m4 2011-08-07 06:42:07.000000000 -0700
3533+++ libiconv-1.14/srcm4/errno_h.m4 2012-01-08 02:07:40.590484469 -0800
3534@@ -1,4 +1,4 @@
3535-# errno_h.m4 serial 10
3536+# errno_h.m4 serial 9
3537 dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
3538 dnl This file is free software; the Free Software Foundation
3539 dnl gives unlimited permission to copy and/or distribute it,
3540@@ -34,12 +34,6 @@ booboo
3541 #if !defined ENOTSUP
3542 booboo
3543 #endif
3544-#if !defined ENETRESET
3545-booboo
3546-#endif
3547-#if !defined ECONNABORTED
3548-booboo
3549-#endif
3550 #if !defined ESTALE
3551 booboo
3552 #endif
3553diff -Naurp libiconv-1.14.org//srcm4/error.m4 libiconv-1.14/srcm4/error.m4
3554--- libiconv-1.14.org//srcm4/error.m4 2011-08-07 06:42:07.000000000 -0700
3555+++ libiconv-1.14/srcm4/error.m4 2012-01-08 02:07:40.598484470 -0800
3556@@ -1,4 +1,4 @@
3557-#serial 14
3558+#serial 13
3559
3560 # Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
3561 #
3562@@ -8,8 +8,16 @@
3563
3564 AC_DEFUN([gl_ERROR],
3565 [
3566- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
3567- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
3568+ AC_FUNC_ERROR_AT_LINE
3569+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
3570+ gl_PREREQ_ERROR
3571+])
3572+
3573+# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
3574+# Autoconf.
3575+AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
3576+[
3577+ AC_LIBSOURCES([error.h, error.c])dnl
3578 AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
3579 [AC_LINK_IFELSE(
3580 [AC_LANG_PROGRAM(
3581@@ -17,6 +25,9 @@ AC_DEFUN([gl_ERROR],
3582 [[error_at_line (0, 0, "", 0, "an error occurred");]])],
3583 [ac_cv_lib_error_at_line=yes],
3584 [ac_cv_lib_error_at_line=no])])
3585+ if test $ac_cv_lib_error_at_line = no; then
3586+ AC_LIBOBJ([error])
3587+ fi
3588 ])
3589
3590 # Prerequisites of lib/error.c.
3591diff -Naurp libiconv-1.14.org//srcm4/extensions.m4 libiconv-1.14/srcm4/extensions.m4
3592--- libiconv-1.14.org//srcm4/extensions.m4 2011-08-07 06:42:07.000000000 -0700
3593+++ libiconv-1.14/srcm4/extensions.m4 2012-01-08 02:07:40.606484471 -0800
3594@@ -1,4 +1,4 @@
3595-# serial 10 -*- Autoconf -*-
3596+# serial 9 -*- Autoconf -*-
3597 # Enable extensions on systems that normally disable them.
3598
3599 # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
3600@@ -67,10 +67,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
3601 #ifndef _ALL_SOURCE
3602 # undef _ALL_SOURCE
3603 #endif
3604-/* Enable general extensions on MacOS X. */
3605-#ifndef _DARWIN_C_SOURCE
3606-# undef _DARWIN_C_SOURCE
3607-#endif
3608 /* Enable GNU extensions on systems that have them. */
3609 #ifndef _GNU_SOURCE
3610 # undef _GNU_SOURCE
3611@@ -99,7 +95,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
3612 test $ac_cv_safe_to_define___extensions__ = yes &&
3613 AC_DEFINE([__EXTENSIONS__])
3614 AC_DEFINE([_ALL_SOURCE])
3615- AC_DEFINE([_DARWIN_C_SOURCE])
3616 AC_DEFINE([_GNU_SOURCE])
3617 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
3618 AC_DEFINE([_TANDEM_SOURCE])
3619diff -Naurp libiconv-1.14.org//srcm4/gnulib-cache.m4 libiconv-1.14/srcm4/gnulib-cache.m4
3620--- libiconv-1.14.org//srcm4/gnulib-cache.m4 2011-08-07 06:42:11.000000000 -0700
3621+++ libiconv-1.14/srcm4/gnulib-cache.m4 2012-01-08 02:07:43.154484593 -0800
3622@@ -15,7 +15,7 @@
3623
3624
3625 # Specification in the form of a command-line invocation:
3626-# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
3627+# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
3628
3629 # Specification in the form of a few gnulib-tool.m4 macro invocations:
3630 gl_LOCAL_DIR([gnulib-local])
3631@@ -28,6 +28,7 @@ gl_MODULES([
3632 mbstate
3633 memmove
3634 progname
3635+ relocatable
3636 relocatable-prog
3637 safe-read
3638 sigpipe
3639@@ -49,5 +50,4 @@ gl_LIB([libicrt])
3640 gl_MAKEFILE_NAME([Makefile.gnulib])
3641 gl_MACRO_PREFIX([gl])
3642 gl_PO_DOMAIN([])
3643-gl_WITNESS_C_DOMAIN([])
3644 gl_VC_FILES([false])
3645diff -Naurp libiconv-1.14.org//srcm4/gnulib-common.m4 libiconv-1.14/srcm4/gnulib-common.m4
3646--- libiconv-1.14.org//srcm4/gnulib-common.m4 2011-08-07 06:42:07.000000000 -0700
3647+++ libiconv-1.14/srcm4/gnulib-common.m4 2012-01-08 02:07:40.634484471 -0800
3648@@ -1,4 +1,4 @@
3649-# gnulib-common.m4 serial 29
3650+# gnulib-common.m4 serial 24
3651 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
3652 dnl This file is free software; the Free Software Foundation
3653 dnl gives unlimited permission to copy and/or distribute it,
3654@@ -12,19 +12,6 @@ AC_DEFUN([gl_COMMON], [
3655 AC_REQUIRE([gl_COMMON_BODY])
3656 ])
3657 AC_DEFUN([gl_COMMON_BODY], [
3658- AH_VERBATIM([_Noreturn],
3659-[/* The _Noreturn keyword of draft C1X. */
3660-#ifndef _Noreturn
3661-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
3662- || 0x5110 <= __SUNPRO_C)
3663-# define _Noreturn __attribute__ ((__noreturn__))
3664-# elif 1200 <= _MSC_VER
3665-# define _Noreturn __declspec (noreturn)
3666-# else
3667-# define _Noreturn
3668-# endif
3669-#endif
3670-])
3671 AH_VERBATIM([isoc99_inline],
3672 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
3673 the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
3674@@ -47,20 +34,6 @@ AC_DEFUN([gl_COMMON_BODY], [
3675 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
3676 is a misnomer outside of parameter lists. */
3677 #define _UNUSED_PARAMETER_ _GL_UNUSED
3678-
3679-/* The __pure__ attribute was added in gcc 2.96. */
3680-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
3681-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
3682-#else
3683-# define _GL_ATTRIBUTE_PURE /* empty */
3684-#endif
3685-
3686-/* The __const__ attribute was added in gcc 2.95. */
3687-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
3688-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
3689-#else
3690-# define _GL_ATTRIBUTE_CONST /* empty */
3691-#endif
3692 ])
3693 dnl Preparation for running test programs:
3694 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
3695@@ -74,49 +47,16 @@ AC_DEFUN([gl_COMMON_BODY], [
3696 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
3697 # whether a gnulib module that has been requested shall be considered present
3698 # or not.
3699-m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
3700+AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
3701
3702 # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
3703 # sets the shell variable that indicates the presence of the given module to
3704 # a C preprocessor expression that will evaluate to 1.
3705 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
3706 [
3707- gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
3708- [GNULIB_[]m4_translit([[$1]],
3709- [abcdefghijklmnopqrstuvwxyz./-],
3710- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
3711- [gl_MODULE_INDICATOR_CONDITION])
3712-])
3713-
3714-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
3715-# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
3716-# The shell variable's value is a C preprocessor expression that evaluates
3717-# to 0 or 1.
3718-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
3719-[
3720- m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
3721- [
3722- dnl Simplify the expression VALUE || 1 to 1.
3723- $1=1
3724- ],
3725- [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
3726- [gl_MODULE_INDICATOR_CONDITION])])
3727-])
3728-
3729-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
3730-# modifies the shell variable to include the given condition. The shell
3731-# variable's value is a C preprocessor expression that evaluates to 0 or 1.
3732-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
3733-[
3734- dnl Simplify the expression 1 || CONDITION to 1.
3735- if test "$[]$1" != 1; then
3736- dnl Simplify the expression 0 || CONDITION to CONDITION.
3737- if test "$[]$1" = 0; then
3738- $1=$2
3739- else
3740- $1="($[]$1 || $2)"
3741- fi
3742- fi
3743+ GNULIB_[]m4_translit([[$1]],
3744+ [abcdefghijklmnopqrstuvwxyz./-],
3745+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
3746 ])
3747
3748 # gl_MODULE_INDICATOR([modulename])
3749@@ -211,35 +151,6 @@ m4_ifndef([AS_VAR_IF],
3750 [m4_define([AS_VAR_IF],
3751 [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
3752
3753-# gl_PROG_AR_RANLIB
3754-# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
3755-AC_DEFUN([gl_PROG_AR_RANLIB],
3756-[
3757- dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
3758- dnl as "cc", and GCC as "gcc". They have different object file formats and
3759- dnl library formats. In particular, the GNU binutils programs ar, ranlib
3760- dnl produce libraries that work only with gcc, not with cc.
3761- AC_REQUIRE([AC_PROG_CC])
3762- AC_EGREP_CPP([Amsterdam],
3763- [
3764-#ifdef __ACK__
3765-Amsterdam
3766-#endif
3767- ],
3768- [AR='cc -c.a'
3769- ARFLAGS='-o'
3770- RANLIB=':'
3771- ],
3772- [dnl Use the Automake-documented default values for AR and ARFLAGS.
3773- AR='ar'
3774- ARFLAGS='cru'
3775- dnl Use the ranlib program if it is available.
3776- AC_PROG_RANLIB
3777- ])
3778- AC_SUBST([AR])
3779- AC_SUBST([ARFLAGS])
3780-])
3781-
3782 # AC_PROG_MKDIR_P
3783 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
3784 # for interoperability with automake-1.9.6 from autoconf-2.62.
3785diff -Naurp libiconv-1.14.org//srcm4/gnulib-comp.m4 libiconv-1.14/srcm4/gnulib-comp.m4
3786--- libiconv-1.14.org//srcm4/gnulib-comp.m4 2011-08-07 06:42:12.000000000 -0700
3787+++ libiconv-1.14/srcm4/gnulib-comp.m4 2012-01-08 02:07:43.922484630 -0800
3788@@ -25,12 +25,14 @@ AC_DEFUN([gl_EARLY],
3789 m4_pattern_allow([^gl_ES$])dnl a valid locale name
3790 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
3791 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
3792- AC_REQUIRE([gl_PROG_AR_RANLIB])
3793+ AC_REQUIRE([AC_PROG_RANLIB])
3794 AC_REQUIRE([AM_PROG_CC_C_O])
3795 # Code from module alloca-opt:
3796 # Code from module allocator:
3797 # Code from module areadlink:
3798+ # Code from module arg-nonnull:
3799 # Code from module binary-io:
3800+ # Code from module c++defs:
3801 # Code from module canonicalize-lgpl:
3802 # Code from module careadlinkat:
3803 # Code from module dosname:
3804@@ -46,7 +48,6 @@ AC_DEFUN([gl_EARLY],
3805 # Code from module havelib:
3806 # Code from module include_next:
3807 # Code from module intprops:
3808- # Code from module largefile:
3809 # Code from module libiconv-misc:
3810 # Code from module lstat:
3811 # Code from module malloca:
3812@@ -64,10 +65,6 @@ AC_DEFUN([gl_EARLY],
3813 # Code from module signal:
3814 # Code from module sigpipe:
3815 # Code from module sigprocmask:
3816- # Code from module snippet/_Noreturn:
3817- # Code from module snippet/arg-nonnull:
3818- # Code from module snippet/c++defs:
3819- # Code from module snippet/warn-on-use:
3820 # Code from module ssize_t:
3821 # Code from module stat:
3822 # Code from module stdbool:
3823@@ -77,7 +74,6 @@ AC_DEFUN([gl_EARLY],
3824 # Code from module stdlib:
3825 # Code from module streq:
3826 # Code from module strerror:
3827- # Code from module strerror-override:
3828 # Code from module string:
3829 # Code from module sys_stat:
3830 # Code from module time:
3831@@ -87,6 +83,7 @@ AC_DEFUN([gl_EARLY],
3832 # Code from module uniwidth/width:
3833 # Code from module unlocked-io:
3834 # Code from module verify:
3835+ # Code from module warn-on-use:
3836 # Code from module xalloc:
3837 # Code from module xreadlink:
3838 ])
3839@@ -109,9 +106,6 @@ AC_DEFUN([gl_INIT],
3840 gl_source_base='srclib'
3841 gl_FUNC_ALLOCA
3842 gl_CANONICALIZE_LGPL
3843-if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
3844- AC_LIBOBJ([canonicalize-lgpl])
3845-fi
3846 gl_MODULE_INDICATOR([canonicalize-lgpl])
3847 gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
3848 gl_STDLIB_MODULE_INDICATOR([realpath])
3849@@ -121,10 +115,6 @@ gl_ENVIRON
3850 gl_UNISTD_MODULE_INDICATOR([environ])
3851 gl_HEADER_ERRNO_H
3852 gl_ERROR
3853-if test $ac_cv_lib_error_at_line = no; then
3854- AC_LIBOBJ([error])
3855- gl_PREREQ_ERROR
3856-fi
3857 m4_ifdef([AM_XGETTEXT_OPTION],
3858 [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
3859 AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
3860@@ -134,43 +124,26 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
3861 AC_SUBST([LIBINTL])
3862 AC_SUBST([LTLIBINTL])
3863 gl_FUNC_LSTAT
3864-if test $REPLACE_LSTAT = 1; then
3865- AC_LIBOBJ([lstat])
3866- gl_PREREQ_LSTAT
3867-fi
3868 gl_SYS_STAT_MODULE_INDICATOR([lstat])
3869 gl_MALLOCA
3870 AC_TYPE_MBSTATE_T
3871 gl_FUNC_MEMMOVE
3872-if test $ac_cv_func_memmove = no; then
3873- AC_LIBOBJ([memmove])
3874- gl_PREREQ_MEMMOVE
3875-fi
3876 gl_MULTIARCH
3877 gl_PATHMAX
3878 AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
3879 AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
3880 gl_FUNC_READ
3881-if test $REPLACE_READ = 1; then
3882- AC_LIBOBJ([read])
3883-fi
3884 gl_UNISTD_MODULE_INDICATOR([read])
3885 gl_FUNC_READLINK
3886-if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3887- AC_LIBOBJ([readlink])
3888- gl_PREREQ_READLINK
3889-fi
3890 gl_UNISTD_MODULE_INDICATOR([readlink])
3891 gl_RELOCATABLE([$gl_source_base])
3892-if test $RELOCATABLE = yes; then
3893- AC_LIBOBJ([progreloc])
3894-fi
3895 gl_FUNC_READLINK_SEPARATE
3896 gl_CANONICALIZE_LGPL_SEPARATE
3897 gl_MALLOCA
3898-gl_RELOCATABLE_LIBRARY
3899+gl_RELOCATABLE_LIBRARY_SEPARATE
3900 gl_FUNC_SETENV_SEPARATE
3901-gl_PREREQ_SAFE_READ
3902+gl_FUNC_STRERROR_SEPARATE
3903+gl_SAFE_READ
3904 gl_SIGNAL_H
3905 gl_SIGNAL_SIGPIPE
3906 dnl Define the C macro GNULIB_SIGPIPE to 1.
3907@@ -186,17 +159,9 @@ dnl Define the substituted variable GNUL
3908 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
3909 GNULIB_UNISTD_H_SIGPIPE=1
3910 gl_SIGNALBLOCKING
3911-if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
3912- AC_LIBOBJ([sigprocmask])
3913- gl_PREREQ_SIGPROCMASK
3914-fi
3915 gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
3916 gt_TYPE_SSIZE_T
3917 gl_FUNC_STAT
3918-if test $REPLACE_STAT = 1; then
3919- AC_LIBOBJ([stat])
3920- gl_PREREQ_STAT
3921-fi
3922 gl_SYS_STAT_MODULE_INDICATOR([stat])
3923 AM_STDBOOL_H
3924 gl_STDDEF_H
3925@@ -204,17 +169,7 @@ gl_STDINT_H
3926 gl_STDIO_H
3927 gl_STDLIB_H
3928 gl_FUNC_STRERROR
3929-if test $REPLACE_STRERROR = 1; then
3930- AC_LIBOBJ([strerror])
3931-fi
3932-gl_MODULE_INDICATOR([strerror])
3933 gl_STRING_MODULE_INDICATOR([strerror])
3934-AC_REQUIRE([gl_HEADER_ERRNO_H])
3935-AC_REQUIRE([gl_FUNC_STRERROR_0])
3936-if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
3937- AC_LIBOBJ([strerror-override])
3938- gl_PREREQ_SYS_H_WINSOCK2
3939-fi
3940 gl_HEADER_STRING_H
3941 gl_HEADER_SYS_STAT_H
3942 AC_PROG_MKDIR_P
3943@@ -364,14 +319,13 @@ AC_DEFUN([gltests_LIBSOURCES], [
3944 # This macro records the list of files which have been installed by
3945 # gnulib-tool and may be removed by future gnulib-tool invocations.
3946 AC_DEFUN([gl_FILE_LIST], [
3947+ build-aux/arg-nonnull.h
3948+ build-aux/c++defs.h
3949 build-aux/config.libpath
3950 build-aux/config.rpath
3951 build-aux/install-reloc
3952 build-aux/reloc-ldflags
3953- build-aux/snippet/_Noreturn.h
3954- build-aux/snippet/arg-nonnull.h
3955- build-aux/snippet/c++defs.h
3956- build-aux/snippet/warn-on-use.h
3957+ build-aux/warn-on-use.h
3958 doc/relocatable.texi
3959 lib/alloca.in.h
3960 lib/allocator.c
3961@@ -419,8 +373,6 @@ AC_DEFUN([gl_FILE_LIST], [
3962 lib/stdio.in.h
3963 lib/stdlib.in.h
3964 lib/streq.h
3965- lib/strerror-override.c
3966- lib/strerror-override.h
3967 lib/strerror.c
3968 lib/string.in.h
3969 lib/sys_stat.in.h
3970@@ -463,7 +415,6 @@ AC_DEFUN([gl_FILE_LIST], [
3971 m4/intmax.m4
3972 m4/inttypes-pri.m4
3973 m4/inttypes_h.m4
3974- m4/largefile.m4
3975 m4/lcmessage.m4
3976 m4/lib-ld.m4
3977 m4/lib-link.m4
3978@@ -502,7 +453,6 @@ AC_DEFUN([gl_FILE_LIST], [
3979 m4/stdlib_h.m4
3980 m4/strerror.m4
3981 m4/string_h.m4
3982- m4/sys_socket_h.m4
3983 m4/sys_stat_h.m4
3984 m4/threadlib.m4
3985 m4/time_h.m4
3986diff -Naurp libiconv-1.14.org//srcm4/include_next.m4 libiconv-1.14/srcm4/include_next.m4
3987--- libiconv-1.14.org//srcm4/include_next.m4 2011-08-07 06:42:07.000000000 -0700
3988+++ libiconv-1.14/srcm4/include_next.m4 2012-01-08 02:07:40.650484472 -0800
3989@@ -1,4 +1,4 @@
3990-# include_next.m4 serial 20
3991+# include_next.m4 serial 18
3992 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
3993 dnl This file is free software; the Free Software Foundation
3994 dnl gives unlimited permission to copy and/or distribute it,
3995@@ -175,13 +175,11 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
3996 [AC_CHECK_HEADERS_ONCE([$1])
3997 ])
3998
3999-dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
4000-dnl until we can assume autoconf 2.64 or newer.
4001 m4_foreach_w([gl_HEADER_NAME], [$1],
4002 [AS_VAR_PUSHDEF([gl_next_header],
4003 [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
4004 if test $gl_cv_have_include_next = yes; then
4005- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
4006+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
4007 else
4008 AC_CACHE_CHECK(
4009 [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
4010@@ -210,7 +208,7 @@ dnl until we can assume autoconf 2.64 or
4011 dnl eval is necessary to expand gl_absname_cpp.
4012 dnl Ultrix and Pyramid sh refuse to redirect output of eval,
4013 dnl so use subshell.
4014- AS_VAR_SET(gl_next_header,
4015+ AS_VAR_SET([gl_next_header],
4016 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
4017 sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
4018 s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
4019@@ -220,20 +218,20 @@ dnl until we can assume autoconf 2.64 or
4020 }'`'"'])
4021 m4_if([$2], [check],
4022 [else
4023- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
4024+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
4025 fi
4026 ])
4027 ])
4028 fi
4029 AC_SUBST(
4030 AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
4031- [AS_VAR_GET(gl_next_header)])
4032+ [AS_VAR_GET([gl_next_header])])
4033 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
4034 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
4035 gl_next_as_first_directive='<'gl_HEADER_NAME'>'
4036 else
4037 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
4038- gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
4039+ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
4040 fi
4041 AC_SUBST(
4042 AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
4043diff -Naurp libiconv-1.14.org//srcm4/largefile.m4 libiconv-1.14/srcm4/largefile.m4
4044--- libiconv-1.14.org//srcm4/largefile.m4 2011-08-07 06:42:07.000000000 -0700
4045+++ libiconv-1.14/srcm4/largefile.m4 1969-12-31 16:00:00.000000000 -0800
4046@@ -1,104 +0,0 @@
4047-# Enable large files on systems where this is not the default.
4048-
4049-# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc.
4050-# This file is free software; the Free Software Foundation
4051-# gives unlimited permission to copy and/or distribute it,
4052-# with or without modifications, as long as this notice is preserved.
4053-
4054-# The following implementation works around a problem in autoconf <= 2.68;
4055-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
4056-m4_version_prereq([2.69], [] ,[
4057-
4058-# _AC_SYS_LARGEFILE_TEST_INCLUDES
4059-# -------------------------------
4060-m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
4061-[@%:@include <sys/types.h>
4062- /* Check that off_t can represent 2**63 - 1 correctly.
4063- We can't simply define LARGE_OFF_T to be 9223372036854775807,
4064- since some C++ compilers masquerading as C compilers
4065- incorrectly reject 9223372036854775807. */
4066-@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4067- int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
4068- && LARGE_OFF_T % 2147483647 == 1)
4069- ? 1 : -1]];[]dnl
4070-])
4071-
4072-
4073-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
4074-# CACHE-VAR,
4075-# DESCRIPTION,
4076-# PROLOGUE, [FUNCTION-BODY])
4077-# --------------------------------------------------------
4078-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
4079-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
4080-[while :; do
4081- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
4082- [AC_LANG_PROGRAM([$5], [$6])],
4083- [$3=no; break])
4084- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
4085- [AC_LANG_PROGRAM([@%:@define $1 $2
4086-$5], [$6])],
4087- [$3=$2; break])
4088- $3=unknown
4089- break
4090-done])
4091-case $$3 in #(
4092- no | unknown) ;;
4093- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
4094-esac
4095-rm -rf conftest*[]dnl
4096-])# _AC_SYS_LARGEFILE_MACRO_VALUE
4097-
4098-
4099-# AC_SYS_LARGEFILE
4100-# ----------------
4101-# By default, many hosts won't let programs access large files;
4102-# one must use special compiler options to get large-file access to work.
4103-# For more details about this brain damage please see:
4104-# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
4105-AC_DEFUN([AC_SYS_LARGEFILE],
4106-[AC_ARG_ENABLE(largefile,
4107- [ --disable-largefile omit support for large files])
4108-if test "$enable_largefile" != no; then
4109-
4110- AC_CACHE_CHECK([for special C compiler options needed for large files],
4111- ac_cv_sys_largefile_CC,
4112- [ac_cv_sys_largefile_CC=no
4113- if test "$GCC" != yes; then
4114- ac_save_CC=$CC
4115- while :; do
4116- # IRIX 6.2 and later do not support large files by default,
4117- # so use the C compiler's -n32 option if that helps.
4118- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
4119- AC_COMPILE_IFELSE([], [break])
4120- CC="$CC -n32"
4121- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
4122- break
4123- done
4124- CC=$ac_save_CC
4125- rm -f conftest.$ac_ext
4126- fi])
4127- if test "$ac_cv_sys_largefile_CC" != no; then
4128- CC=$CC$ac_cv_sys_largefile_CC
4129- fi
4130-
4131- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
4132- ac_cv_sys_file_offset_bits,
4133- [Number of bits in a file offset, on hosts where this is settable.],
4134- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
4135- if test $ac_cv_sys_file_offset_bits = unknown; then
4136- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
4137- ac_cv_sys_large_files,
4138- [Define for large files, on AIX-style hosts.],
4139- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
4140- fi
4141-
4142- AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
4143-[/* Enable large inode numbers on Mac OS X. */
4144-#ifndef _DARWIN_USE_64_BIT_INODE
4145-# define _DARWIN_USE_64_BIT_INODE 1
4146-#endif])
4147-fi
4148-])# AC_SYS_LARGEFILE
4149-
4150-])# m4_version_prereq 2.69
4151diff -Naurp libiconv-1.14.org//srcm4/lstat.m4 libiconv-1.14/srcm4/lstat.m4
4152--- libiconv-1.14.org//srcm4/lstat.m4 2011-08-07 06:42:07.000000000 -0700
4153+++ libiconv-1.14/srcm4/lstat.m4 2012-01-08 02:07:40.722484476 -0800
4154@@ -1,4 +1,4 @@
4155-# serial 23
4156+# serial 21
4157
4158 # Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
4159 #
4160@@ -15,28 +15,24 @@ AC_DEFUN([gl_FUNC_LSTAT],
4161 dnl "#define lstat stat", and lstat.c is a no-op.
4162 AC_CHECK_FUNCS_ONCE([lstat])
4163 if test $ac_cv_func_lstat = yes; then
4164- AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
4165- if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
4166+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
4167+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
4168+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
4169 REPLACE_LSTAT=1
4170 fi
4171+ # Prerequisites of lib/lstat.c.
4172+ AC_REQUIRE([AC_C_INLINE])
4173 else
4174 HAVE_LSTAT=0
4175 fi
4176 ])
4177
4178-# Prerequisites of lib/lstat.c.
4179-AC_DEFUN([gl_PREREQ_LSTAT],
4180+# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
4181+# maintained in Autoconf.
4182+AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
4183 [
4184- AC_REQUIRE([AC_C_INLINE])
4185- :
4186-])
4187-
4188-AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
4189-[
4190- dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
4191- dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
4192 AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
4193- [gl_cv_func_lstat_dereferences_slashed_symlink],
4194+ [ac_cv_func_lstat_dereferences_slashed_symlink],
4195 [rm -f conftest.sym conftest.file
4196 echo >conftest.file
4197 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
4198@@ -49,22 +45,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_
4199 have to compile and use the lstat wrapper. */
4200 return lstat ("conftest.sym/", &sbuf) == 0;
4201 ]])],
4202- [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
4203- [gl_cv_func_lstat_dereferences_slashed_symlink=no],
4204+ [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
4205+ [ac_cv_func_lstat_dereferences_slashed_symlink=no],
4206 [# When cross-compiling, be pessimistic so we will end up using the
4207 # replacement version of lstat that checks for trailing slashes and
4208 # calls lstat a second time when necessary.
4209- gl_cv_func_lstat_dereferences_slashed_symlink=no
4210+ ac_cv_func_lstat_dereferences_slashed_symlink=no
4211 ])
4212 else
4213 # If the 'ln -s' command failed, then we probably don't even
4214 # have an lstat function.
4215- gl_cv_func_lstat_dereferences_slashed_symlink=no
4216+ ac_cv_func_lstat_dereferences_slashed_symlink=no
4217 fi
4218 rm -f conftest.sym conftest.file
4219 ])
4220- test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
4221+ test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
4222 AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
4223 [Define to 1 if `lstat' dereferences a symlink specified
4224 with a trailing slash.])
4225+ if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
4226+ AC_LIBOBJ([lstat])
4227+ fi
4228 ])
4229diff -Naurp libiconv-1.14.org//srcm4/memmove.m4 libiconv-1.14/srcm4/memmove.m4
4230--- libiconv-1.14.org//srcm4/memmove.m4 2011-08-07 06:42:07.000000000 -0700
4231+++ libiconv-1.14/srcm4/memmove.m4 2012-01-08 02:07:40.738484477 -0800
4232@@ -1,4 +1,4 @@
4233-# memmove.m4 serial 4
4234+# memmove.m4 serial 3
4235 dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
4236 dnl This file is free software; the Free Software Foundation
4237 dnl gives unlimited permission to copy and/or distribute it,
4238@@ -6,7 +6,10 @@ dnl with or without modifications, as lo
4239
4240 AC_DEFUN([gl_FUNC_MEMMOVE],
4241 [
4242- AC_CHECK_FUNCS([memmove])
4243+ AC_REPLACE_FUNCS([memmove])
4244+ if test $ac_cv_func_memmove = no; then
4245+ gl_PREREQ_MEMMOVE
4246+ fi
4247 ])
4248
4249 # Prerequisites of lib/memmove.c.
4250diff -Naurp libiconv-1.14.org//srcm4/pathmax.m4 libiconv-1.14/srcm4/pathmax.m4
4251--- libiconv-1.14.org//srcm4/pathmax.m4 2011-08-07 06:42:07.000000000 -0700
4252+++ libiconv-1.14/srcm4/pathmax.m4 2012-01-08 02:07:40.758484478 -0800
4253@@ -1,4 +1,4 @@
4254-# pathmax.m4 serial 9
4255+# pathmax.m4 serial 8
4256 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
4257 dnl Inc.
4258 dnl This file is free software; the Free Software Foundation
4259@@ -8,5 +8,6 @@ dnl with or without modifications, as lo
4260 AC_DEFUN([gl_PATHMAX],
4261 [
4262 dnl Prerequisites of lib/pathmax.h.
4263+ AC_CHECK_FUNCS_ONCE([pathconf])
4264 AC_CHECK_HEADERS_ONCE([sys/param.h])
4265 ])
4266diff -Naurp libiconv-1.14.org//srcm4/po.m4 libiconv-1.14/srcm4/po.m4
4267--- libiconv-1.14.org//srcm4/po.m4 2011-08-07 06:42:07.000000000 -0700
4268+++ libiconv-1.14/srcm4/po.m4 2012-01-08 02:07:40.766484477 -0800
4269@@ -1,4 +1,4 @@
4270-# po.m4 serial 17a
4271+# po.m4 serial 17 (gettext-0.18)
4272 dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
4273 dnl This file is free software; the Free Software Foundation
4274 dnl gives unlimited permission to copy and/or distribute it,
4275@@ -118,8 +118,7 @@ changequote([,])dnl
4276 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4277 rm -f "$ac_dir/POTFILES"
4278 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4279- gt_tab=`printf '\t'`
4280- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4281+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4282 POMAKEFILEDEPS="POTFILES.in"
4283 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
4284 # on $ac_dir but don't depend on user-specified configuration
4285@@ -255,7 +254,6 @@ EOT
4286 fi
4287
4288 # A sed script that extracts the value of VARIABLE from a Makefile.
4289- tab=`printf '\t'`
4290 sed_x_variable='
4291 # Test if the hold space is empty.
4292 x
4293@@ -263,9 +261,9 @@ s/P/P/
4294 x
4295 ta
4296 # Yes it was empty. Look if we have the expected variable definition.
4297-/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
4298+/^[ ]*VARIABLE[ ]*=/{
4299 # Seen the first line of the variable definition.
4300- s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
4301+ s/^[ ]*VARIABLE[ ]*=//
4302 ba
4303 }
4304 bd
4305@@ -407,15 +405,14 @@ changequote([,])dnl
4306 fi
4307
4308 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
4309- tab=`printf '\t'`
4310 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
4311 # Add dependencies that cannot be formulated as a simple suffix rule.
4312 for lang in $ALL_LINGUAS; do
4313 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
4314 cat >> "$ac_file.tmp" <<EOF
4315 $frobbedlang.msg: $lang.po
4316-${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
4317-${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
4318+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
4319+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
4320 EOF
4321 done
4322 fi
4323@@ -425,8 +422,8 @@ EOF
4324 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
4325 cat >> "$ac_file.tmp" <<EOF
4326 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
4327-${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
4328-${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
4329+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
4330+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
4331 EOF
4332 done
4333 fi
4334diff -Naurp libiconv-1.14.org//srcm4/readlink.m4 libiconv-1.14/srcm4/readlink.m4
4335--- libiconv-1.14.org//srcm4/readlink.m4 2011-08-07 06:42:07.000000000 -0700
4336+++ libiconv-1.14/srcm4/readlink.m4 2012-01-08 02:07:40.790484479 -0800
4337@@ -1,4 +1,4 @@
4338-# readlink.m4 serial 11
4339+# readlink.m4 serial 10
4340 dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
4341 dnl This file is free software; the Free Software Foundation
4342 dnl gives unlimited permission to copy and/or distribute it,
4343@@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_READLINK],
4344 AC_CHECK_FUNCS_ONCE([readlink])
4345 if test $ac_cv_func_readlink = no; then
4346 HAVE_READLINK=0
4347+ AC_LIBOBJ([readlink])
4348+ gl_PREREQ_READLINK
4349 else
4350 AC_CACHE_CHECK([whether readlink signature is correct],
4351 [gl_cv_decl_readlink_works],
4352@@ -38,8 +40,10 @@ AC_DEFUN([gl_FUNC_READLINK],
4353 AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
4354 fails to recognize a trailing slash.])
4355 REPLACE_READLINK=1
4356+ AC_LIBOBJ([readlink])
4357 elif test "$gl_cv_decl_readlink_works" != yes; then
4358 REPLACE_READLINK=1
4359+ AC_LIBOBJ([readlink])
4360 fi
4361 fi
4362 ])
4363diff -Naurp libiconv-1.14.org//srcm4/read.m4 libiconv-1.14/srcm4/read.m4
4364--- libiconv-1.14.org//srcm4/read.m4 2011-08-07 06:42:07.000000000 -0700
4365+++ libiconv-1.14/srcm4/read.m4 2012-01-08 02:07:40.782484478 -0800
4366@@ -1,4 +1,4 @@
4367-# read.m4 serial 2
4368+# read.m4 serial 1
4369 dnl Copyright (C) 2011 Free Software Foundation, Inc.
4370 dnl This file is free software; the Free Software Foundation
4371 dnl gives unlimited permission to copy and/or distribute it,
4372@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_READ],
4373 gl_NONBLOCKING_IO
4374 if test $gl_cv_have_nonblocking != yes; then
4375 REPLACE_READ=1
4376+ AC_LIBOBJ([read])
4377 fi
4378 ])
4379 ])
4380diff -Naurp libiconv-1.14.org//srcm4/relocatable-lib.m4 libiconv-1.14/srcm4/relocatable-lib.m4
4381--- libiconv-1.14.org//srcm4/relocatable-lib.m4 2011-08-07 06:42:07.000000000 -0700
4382+++ libiconv-1.14/srcm4/relocatable-lib.m4 2012-01-08 02:07:40.798484480 -0800
4383@@ -1,4 +1,4 @@
4384-# relocatable-lib.m4 serial 6
4385+# relocatable-lib.m4 serial 5
4386 dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
4387 dnl This file is free software; the Free Software Foundation
4388 dnl gives unlimited permission to copy and/or distribute it,
4389@@ -10,6 +10,9 @@ dnl Support for relocatable libraries.
4390 AC_DEFUN([gl_RELOCATABLE_LIBRARY],
4391 [
4392 AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
4393+ if test $RELOCATABLE = yes; then
4394+ AC_LIBOBJ([relocatable])
4395+ fi
4396 ])
4397 AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
4398 [
4399@@ -29,6 +32,13 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
4400 fi
4401 ])
4402
4403+dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation
4404+dnl (no AC_LIBOBJ).
4405+AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE],
4406+[
4407+ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
4408+])
4409+
4410 dnl Support for relocatable packages for which it is a nop.
4411 AC_DEFUN([gl_RELOCATABLE_NOP],
4412 [
4413diff -Naurp libiconv-1.14.org//srcm4/relocatable.m4 libiconv-1.14/srcm4/relocatable.m4
4414--- libiconv-1.14.org//srcm4/relocatable.m4 2011-08-07 06:42:07.000000000 -0700
4415+++ libiconv-1.14/srcm4/relocatable.m4 2012-01-08 02:07:40.802484479 -0800
4416@@ -1,4 +1,4 @@
4417-# relocatable.m4 serial 17
4418+# relocatable.m4 serial 16
4419 dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
4420 dnl This file is free software; the Free Software Foundation
4421 dnl gives unlimited permission to copy and/or distribute it,
4422@@ -14,6 +14,9 @@ AC_DEFUN([gl_RELOCATABLE],
4423 [
4424 AC_REQUIRE([gl_RELOCATABLE_BODY])
4425 gl_RELOCATABLE_LIBRARY
4426+ if test $RELOCATABLE = yes; then
4427+ AC_LIBOBJ([progreloc])
4428+ fi
4429 : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'}
4430 RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base"
4431 RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base"
4432diff -Naurp libiconv-1.14.org//srcm4/safe-read.m4 libiconv-1.14/srcm4/safe-read.m4
4433--- libiconv-1.14.org//srcm4/safe-read.m4 2011-08-07 06:42:07.000000000 -0700
4434+++ libiconv-1.14/srcm4/safe-read.m4 2012-01-08 02:07:40.810484480 -0800
4435@@ -1,10 +1,17 @@
4436-# safe-read.m4 serial 6
4437+# safe-read.m4 serial 5
4438 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
4439 dnl Inc.
4440 dnl This file is free software; the Free Software Foundation
4441 dnl gives unlimited permission to copy and/or distribute it,
4442 dnl with or without modifications, as long as this notice is preserved.
4443
4444+AC_DEFUN([gl_SAFE_READ],
4445+[
4446+ AC_LIBOBJ([safe-read])
4447+
4448+ gl_PREREQ_SAFE_READ
4449+])
4450+
4451 # Prerequisites of lib/safe-read.c.
4452 AC_DEFUN([gl_PREREQ_SAFE_READ],
4453 [
4454diff -Naurp libiconv-1.14.org//srcm4/setenv.m4 libiconv-1.14/srcm4/setenv.m4
4455--- libiconv-1.14.org//srcm4/setenv.m4 2011-08-07 06:42:07.000000000 -0700
4456+++ libiconv-1.14/srcm4/setenv.m4 2012-01-08 02:07:40.818484481 -0800
4457@@ -1,4 +1,4 @@
4458-# setenv.m4 serial 24
4459+# setenv.m4 serial 22
4460 dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
4461 dnl This file is free software; the Free Software Foundation
4462 dnl gives unlimited permission to copy and/or distribute it,
4463@@ -38,6 +38,9 @@ AC_DEFUN([gl_FUNC_SETENV],
4464 REPLACE_SETENV=1
4465 fi
4466 fi
4467+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
4468+ AC_LIBOBJ([setenv])
4469+ fi
4470 ])
4471
4472 # Like gl_FUNC_SETENV, except prepare for separate compilation
4473@@ -62,9 +65,9 @@ AC_DEFUN([gl_FUNC_UNSETENV],
4474 fi
4475 AC_CHECK_FUNCS([unsetenv])
4476 if test $ac_cv_func_unsetenv = no; then
4477- HAVE_UNSETENV=0
4478+ AC_LIBOBJ([unsetenv])
4479+ gl_PREREQ_UNSETENV
4480 else
4481- HAVE_UNSETENV=1
4482 dnl Some BSDs return void, failing to do error checking.
4483 AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
4484 [AC_COMPILE_IFELSE(
4485@@ -90,6 +93,7 @@ int unsetenv();
4486 AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
4487 instead of int.])
4488 REPLACE_UNSETENV=1
4489+ AC_LIBOBJ([unsetenv])
4490 fi
4491
4492 dnl Solaris 10 unsetenv does not remove all copies of a name.
4493@@ -122,6 +126,7 @@ int unsetenv();
4494 [gl_cv_func_unsetenv_works="guessing no"])])
4495 if test "$gl_cv_func_unsetenv_works" != yes; then
4496 REPLACE_UNSETENV=1
4497+ AC_LIBOBJ([unsetenv])
4498 fi
4499 fi
4500 ])
4501diff -Naurp libiconv-1.14.org//srcm4/signalblocking.m4 libiconv-1.14/srcm4/signalblocking.m4
4502--- libiconv-1.14.org//srcm4/signalblocking.m4 2011-08-07 06:42:07.000000000 -0700
4503+++ libiconv-1.14/srcm4/signalblocking.m4 2012-01-08 02:07:40.834484482 -0800
4504@@ -1,4 +1,4 @@
4505-# signalblocking.m4 serial 12
4506+# signalblocking.m4 serial 10
4507 dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
4508 dnl This file is free software; the Free Software Foundation
4509 dnl gives unlimited permission to copy and/or distribute it,
4510@@ -12,14 +12,31 @@ dnl with or without modifications, as lo
4511 AC_DEFUN([gl_SIGNALBLOCKING],
4512 [
4513 AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
4514- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
4515- if test $gl_cv_type_sigset_t = yes; then
4516+ signals_not_posix=
4517+ AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
4518+ if test -z "$signals_not_posix"; then
4519 AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
4520 fi
4521 if test -z "$gl_cv_func_sigprocmask"; then
4522 HAVE_POSIX_SIGNALBLOCKING=0
4523+ AC_LIBOBJ([sigprocmask])
4524+ gl_PREREQ_SIGPROCMASK
4525 fi
4526 ])
4527
4528-# Prerequisites of lib/sigprocmask.c.
4529-AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
4530+# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
4531+AC_DEFUN([gl_PREREQ_SIGPROCMASK],
4532+[
4533+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
4534+ AC_CHECK_TYPES([sigset_t],
4535+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
4536+ [#include <signal.h>
4537+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
4538+#include <sys/types.h>])
4539+ if test $gl_cv_type_sigset_t != yes; then
4540+ HAVE_SIGSET_T=0
4541+ fi
4542+ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
4543+ dnl the sigset_t type.
4544+ AC_SUBST([HAVE_SIGSET_T])
4545+])
4546diff -Naurp libiconv-1.14.org//srcm4/signal_h.m4 libiconv-1.14/srcm4/signal_h.m4
4547--- libiconv-1.14.org//srcm4/signal_h.m4 2011-08-07 06:42:07.000000000 -0700
4548+++ libiconv-1.14/srcm4/signal_h.m4 2012-01-08 02:07:40.826484480 -0800
4549@@ -1,4 +1,4 @@
4550-# signal_h.m4 serial 16
4551+# signal_h.m4 serial 12
4552 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
4553 dnl This file is free software; the Free Software Foundation
4554 dnl gives unlimited permission to copy and/or distribute it,
4555@@ -7,7 +7,6 @@ dnl with or without modifications, as lo
4556 AC_DEFUN([gl_SIGNAL_H],
4557 [
4558 AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
4559- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
4560 gl_NEXT_HEADERS([signal.h])
4561
4562 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
4563@@ -28,25 +27,10 @@ AC_DEFUN([gl_SIGNAL_H],
4564 dnl Check for declarations of anything we want to poison if the
4565 dnl corresponding gnulib module is not in use.
4566 gl_WARN_ON_USE_PREPARE([[#include <signal.h>
4567- ]], [pthread_sigmask sigaction
4568- sigaddset sigdelset sigemptyset sigfillset sigismember
4569+ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
4570 sigpending sigprocmask])
4571 ])
4572
4573-AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
4574-[
4575- AC_CHECK_TYPES([sigset_t],
4576- [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
4577- [[
4578- #include <signal.h>
4579- /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
4580- #include <sys/types.h>
4581- ]])
4582- if test $gl_cv_type_sigset_t != yes; then
4583- HAVE_SIGSET_T=0
4584- fi
4585-])
4586-
4587 AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
4588 [
4589 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
4590@@ -58,13 +42,11 @@ AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
4591
4592 AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
4593 [
4594- GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
4595 GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
4596 GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
4597 GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
4598 dnl Assume proper GNU behavior unless another module says otherwise.
4599 HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
4600- HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
4601 HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
4602 HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
4603 HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
4604@@ -73,5 +55,4 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
4605 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
4606 AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
4607 HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
4608- REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
4609 ])
4610diff -Naurp libiconv-1.14.org//srcm4/stat.m4 libiconv-1.14/srcm4/stat.m4
4611--- libiconv-1.14.org//srcm4/stat.m4 2011-08-07 06:42:07.000000000 -0700
4612+++ libiconv-1.14/srcm4/stat.m4 2012-01-08 02:07:40.854484483 -0800
4613@@ -1,4 +1,4 @@
4614-# serial 8
4615+# serial 7
4616
4617 # Copyright (C) 2009-2011 Free Software Foundation, Inc.
4618 #
4619@@ -58,11 +58,9 @@ AC_DEFUN([gl_FUNC_STAT],
4620 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
4621 help when passed a file name with a trailing slash]);;
4622 esac
4623-])
4624-
4625-# Prerequisites of lib/stat.c.
4626-AC_DEFUN([gl_PREREQ_STAT],
4627-[
4628- AC_REQUIRE([AC_C_INLINE])
4629- :
4630+ if test $REPLACE_STAT = 1; then
4631+ AC_LIBOBJ([stat])
4632+ dnl Prerequisites of lib/stat.c.
4633+ AC_REQUIRE([AC_C_INLINE])
4634+ fi
4635 ])
4636diff -Naurp libiconv-1.14.org//srcm4/strerror.m4 libiconv-1.14/srcm4/strerror.m4
4637--- libiconv-1.14.org//srcm4/strerror.m4 2011-08-07 06:42:07.000000000 -0700
4638+++ libiconv-1.14/srcm4/strerror.m4 2012-01-08 02:07:40.890484484 -0800
4639@@ -1,4 +1,4 @@
4640-# strerror.m4 serial 16
4641+# strerror.m4 serial 9
4642 dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
4643 dnl This file is free software; the Free Software Foundation
4644 dnl gives unlimited permission to copy and/or distribute it,
4645@@ -6,73 +6,63 @@ dnl with or without modifications, as lo
4646
4647 AC_DEFUN([gl_FUNC_STRERROR],
4648 [
4649+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
4650+ if test $REPLACE_STRERROR = 1; then
4651+ AC_LIBOBJ([strerror])
4652+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
4653+ [Define this to 1 if strerror is broken.])
4654+ fi
4655+])
4656+
4657+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
4658+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
4659+[
4660 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
4661 AC_REQUIRE([gl_HEADER_ERRNO_H])
4662- AC_REQUIRE([gl_FUNC_STRERROR_0])
4663- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
4664- AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
4665- ])
4666- if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
4667+ if test -z "$ERRNO_H"; then
4668 AC_CACHE_CHECK([for working strerror function],
4669 [gl_cv_func_working_strerror],
4670 [AC_RUN_IFELSE(
4671 [AC_LANG_PROGRAM(
4672 [[#include <string.h>
4673 ]],
4674- [[if (!*strerror (-2)) return 1;]])],
4675+ [[return !*strerror (-2);]])],
4676 [gl_cv_func_working_strerror=yes],
4677 [gl_cv_func_working_strerror=no],
4678- [dnl Be pessimistic on cross-compiles for now.
4679- gl_cv_func_working_strerror="guessing no"])
4680+ [dnl Assume crossbuild works if it compiles.
4681+ AC_COMPILE_IFELSE(
4682+ [AC_LANG_PROGRAM(
4683+ [[#include <string.h>
4684+ ]],
4685+ [[return !*strerror (-2);]])],
4686+ [gl_cv_func_working_strerror=yes],
4687+ [gl_cv_func_working_strerror=no])
4688+ ])
4689 ])
4690- if test "$gl_cv_func_working_strerror" != yes; then
4691+ if test $gl_cv_func_working_strerror = no; then
4692 dnl The system's strerror() fails to return a string for out-of-range
4693 dnl integers. Replace it.
4694 REPLACE_STRERROR=1
4695 fi
4696- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
4697- dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
4698- dnl buffer, we must replace strerror.
4699- case "$gl_cv_func_strerror_r_works" in
4700- *no) REPLACE_STRERROR=1 ;;
4701- esac
4702- ])
4703 else
4704 dnl The system's strerror() cannot know about the new errno values we add
4705- dnl to <errno.h>, or any fix for strerror(0). Replace it.
4706+ dnl to <errno.h>. Replace it.
4707 REPLACE_STRERROR=1
4708 fi
4709+ if test $REPLACE_STRERROR = 1; then
4710+ gl_PREREQ_STRERROR
4711+ fi
4712 ])
4713
4714-dnl Detect if strerror(0) passes (that is, does not set errno, and does not
4715-dnl return a string that matches strerror(-1)).
4716-AC_DEFUN([gl_FUNC_STRERROR_0],
4717-[
4718- REPLACE_STRERROR_0=0
4719- AC_CACHE_CHECK([whether strerror(0) succeeds],
4720- [gl_cv_func_strerror_0_works],
4721- [AC_RUN_IFELSE(
4722- [AC_LANG_PROGRAM(
4723- [[#include <string.h>
4724- #include <errno.h>
4725- ]],
4726- [[int result = 0;
4727- char *str;
4728- errno = 0;
4729- str = strerror (0);
4730- if (!*str) result |= 1;
4731- if (errno) result |= 2;
4732- if (strstr (str, "nknown") || strstr (str, "ndefined"))
4733- result |= 4;
4734- return result;]])],
4735- [gl_cv_func_strerror_0_works=yes],
4736- [gl_cv_func_strerror_0_works=no],
4737- [dnl Be pessimistic on cross-compiles for now.
4738- gl_cv_func_strerror_0_works="guessing no"])
4739- ])
4740- if test "$gl_cv_func_strerror_0_works" != yes; then
4741- REPLACE_STRERROR_0=1
4742- AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
4743- does not return a message implying success.])
4744+# Prerequisites of lib/strerror.c.
4745+AC_DEFUN([gl_PREREQ_STRERROR], [
4746+ AC_CHECK_DECLS([strerror])
4747+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
4748+ if test $ac_cv_header_sys_socket_h != yes; then
4749+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
4750+ dnl the check for those headers unconditional; yet cygwin reports
4751+ dnl that the headers are present but cannot be compiled (since on
4752+ dnl cygwin, all socket information should come from sys/socket.h).
4753+ AC_CHECK_HEADERS([winsock2.h])
4754 fi
4755 ])
4756diff -Naurp libiconv-1.14.org//srcm4/string_h.m4 libiconv-1.14/srcm4/string_h.m4
4757--- libiconv-1.14.org//srcm4/string_h.m4 2011-08-07 06:42:07.000000000 -0700
4758+++ libiconv-1.14/srcm4/string_h.m4 2012-01-08 02:07:40.894484485 -0800
4759@@ -5,7 +5,7 @@
4760 # gives unlimited permission to copy and/or distribute it,
4761 # with or without modifications, as long as this notice is preserved.
4762
4763-# serial 21
4764+# serial 20
4765
4766 # Written by Paul Eggert.
4767
4768@@ -27,9 +27,9 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
4769 dnl guaranteed by C89.
4770 gl_WARN_ON_USE_PREPARE([[#include <string.h>
4771 ]],
4772- [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
4773- strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
4774- strerror_r strsignal strverscmp])
4775+ [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
4776+ strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
4777+ strsignal strverscmp])
4778 ])
4779
4780 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
4781@@ -43,8 +43,6 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
4782
4783 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
4784 [
4785- GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
4786- GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
4787 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
4788 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
4789 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
4790@@ -82,8 +80,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
4791 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
4792 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
4793 dnl Assume proper GNU behavior unless another module says otherwise.
4794- HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
4795- HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
4796 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
4797 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
4798 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
4799diff -Naurp libiconv-1.14.org//srcm4/sys_socket_h.m4 libiconv-1.14/srcm4/sys_socket_h.m4
4800--- libiconv-1.14.org//srcm4/sys_socket_h.m4 2011-08-07 06:42:07.000000000 -0700
4801+++ libiconv-1.14/srcm4/sys_socket_h.m4 1969-12-31 16:00:00.000000000 -0800
4802@@ -1,177 +0,0 @@
4803-# sys_socket_h.m4 serial 22
4804-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
4805-dnl This file is free software; the Free Software Foundation
4806-dnl gives unlimited permission to copy and/or distribute it,
4807-dnl with or without modifications, as long as this notice is preserved.
4808-
4809-dnl From Simon Josefsson.
4810-
4811-AC_DEFUN([gl_HEADER_SYS_SOCKET],
4812-[
4813- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
4814- AC_REQUIRE([AC_CANONICAL_HOST])
4815- AC_REQUIRE([AC_C_INLINE])
4816-
4817- dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
4818- dnl old-style declarations (with return type 'int' instead of 'ssize_t')
4819- dnl unless _POSIX_PII_SOCKET is defined.
4820- case "$host_os" in
4821- osf*)
4822- AC_DEFINE([_POSIX_PII_SOCKET], [1],
4823- [Define to 1 in order to get the POSIX compatible declarations
4824- of socket functions.])
4825- ;;
4826- esac
4827-
4828- AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
4829- [gl_cv_header_sys_socket_h_selfcontained],
4830- [
4831- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
4832- [gl_cv_header_sys_socket_h_selfcontained=yes],
4833- [gl_cv_header_sys_socket_h_selfcontained=no])
4834- ])
4835- if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
4836- dnl If the shutdown function exists, <sys/socket.h> should define
4837- dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
4838- AC_CHECK_FUNCS([shutdown])
4839- if test $ac_cv_func_shutdown = yes; then
4840- AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
4841- [gl_cv_header_sys_socket_h_shut],
4842- [
4843- AC_COMPILE_IFELSE(
4844- [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
4845- [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
4846- [gl_cv_header_sys_socket_h_shut=yes],
4847- [gl_cv_header_sys_socket_h_shut=no])
4848- ])
4849- if test $gl_cv_header_sys_socket_h_shut = no; then
4850- SYS_SOCKET_H='sys/socket.h'
4851- fi
4852- fi
4853- fi
4854- # We need to check for ws2tcpip.h now.
4855- gl_PREREQ_SYS_H_SOCKET
4856- AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
4857- /* sys/types.h is not needed according to POSIX, but the
4858- sys/socket.h in i386-unknown-freebsd4.10 and
4859- powerpc-apple-darwin5.5 required it. */
4860-#include <sys/types.h>
4861-#ifdef HAVE_SYS_SOCKET_H
4862-#include <sys/socket.h>
4863-#endif
4864-#ifdef HAVE_WS2TCPIP_H
4865-#include <ws2tcpip.h>
4866-#endif
4867-])
4868- if test $ac_cv_type_struct_sockaddr_storage = no; then
4869- HAVE_STRUCT_SOCKADDR_STORAGE=0
4870- fi
4871- if test $ac_cv_type_sa_family_t = no; then
4872- HAVE_SA_FAMILY_T=0
4873- fi
4874- if test $ac_cv_type_struct_sockaddr_storage != no; then
4875- AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
4876- [],
4877- [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
4878- [#include <sys/types.h>
4879- #ifdef HAVE_SYS_SOCKET_H
4880- #include <sys/socket.h>
4881- #endif
4882- #ifdef HAVE_WS2TCPIP_H
4883- #include <ws2tcpip.h>
4884- #endif
4885- ])
4886- fi
4887- if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
4888- || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
4889- SYS_SOCKET_H='sys/socket.h'
4890- fi
4891- gl_PREREQ_SYS_H_WINSOCK2
4892-
4893- dnl Check for declarations of anything we want to poison if the
4894- dnl corresponding gnulib module is not in use.
4895- gl_WARN_ON_USE_PREPARE([[
4896-/* Some systems require prerequisite headers. */
4897-#include <sys/types.h>
4898-#include <sys/socket.h>
4899- ]], [socket connect accept bind getpeername getsockname getsockopt
4900- listen recv send recvfrom sendto setsockopt shutdown accept4])
4901-])
4902-
4903-AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
4904-[
4905- dnl Check prerequisites of the <sys/socket.h> replacement.
4906- AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
4907- gl_CHECK_NEXT_HEADERS([sys/socket.h])
4908- if test $ac_cv_header_sys_socket_h = yes; then
4909- HAVE_SYS_SOCKET_H=1
4910- HAVE_WS2TCPIP_H=0
4911- else
4912- HAVE_SYS_SOCKET_H=0
4913- if test $ac_cv_header_ws2tcpip_h = yes; then
4914- HAVE_WS2TCPIP_H=1
4915- else
4916- HAVE_WS2TCPIP_H=0
4917- fi
4918- fi
4919- AC_SUBST([HAVE_SYS_SOCKET_H])
4920- AC_SUBST([HAVE_WS2TCPIP_H])
4921-])
4922-
4923-# Common prerequisites of the <sys/socket.h> replacement and of the
4924-# <sys/select.h> replacement.
4925-# Sets and substitutes HAVE_WINSOCK2_H.
4926-AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
4927-[
4928- m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
4929- m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
4930- AC_CHECK_HEADERS_ONCE([sys/socket.h])
4931- if test $ac_cv_header_sys_socket_h != yes; then
4932- dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
4933- dnl the check for those headers unconditional; yet cygwin reports
4934- dnl that the headers are present but cannot be compiled (since on
4935- dnl cygwin, all socket information should come from sys/socket.h).
4936- AC_CHECK_HEADERS([winsock2.h])
4937- fi
4938- if test "$ac_cv_header_winsock2_h" = yes; then
4939- HAVE_WINSOCK2_H=1
4940- UNISTD_H_HAVE_WINSOCK2_H=1
4941- SYS_IOCTL_H_HAVE_WINSOCK2_H=1
4942- else
4943- HAVE_WINSOCK2_H=0
4944- fi
4945- AC_SUBST([HAVE_WINSOCK2_H])
4946-])
4947-
4948-AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
4949-[
4950- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
4951- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
4952- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
4953- dnl Define it also as a C macro, for the benefit of the unit tests.
4954- gl_MODULE_INDICATOR_FOR_TESTS([$1])
4955-])
4956-
4957-AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
4958-[
4959- GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET])
4960- GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT])
4961- GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT])
4962- GNULIB_BIND=0; AC_SUBST([GNULIB_BIND])
4963- GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
4964- GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
4965- GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT])
4966- GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN])
4967- GNULIB_RECV=0; AC_SUBST([GNULIB_RECV])
4968- GNULIB_SEND=0; AC_SUBST([GNULIB_SEND])
4969- GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM])
4970- GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO])
4971- GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT])
4972- GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN])
4973- GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4])
4974- HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
4975- HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
4976- AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
4977- HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T])
4978- HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4])
4979-])
4980diff -Naurp libiconv-1.14.org//srcm4/warn-on-use.m4 libiconv-1.14/srcm4/warn-on-use.m4
4981--- libiconv-1.14.org//srcm4/warn-on-use.m4 2011-08-07 06:42:07.000000000 -0700
4982+++ libiconv-1.14/srcm4/warn-on-use.m4 2012-01-08 02:07:40.934484487 -0800
4983@@ -1,4 +1,4 @@
4984-# warn-on-use.m4 serial 4
4985+# warn-on-use.m4 serial 2
4986 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
4987 dnl This file is free software; the Free Software Foundation
4988 dnl gives unlimited permission to copy and/or distribute it,
4989@@ -27,8 +27,6 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
4990 [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
4991 [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
4992 undefining macros.])])dnl
4993-dnl FIXME: gl_Symbol must be used unquoted until we can assume
4994-dnl autoconf 2.64 or newer.
4995 for gl_func in m4_flatten([$2]); do
4996 AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
4997 AC_CACHE_CHECK([whether $gl_func is declared without a macro],
4998@@ -37,8 +35,8 @@ dnl autoconf 2.64 or newer.
4999 [@%:@undef $gl_func
5000 (void) $gl_func;])],
5001 [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
5002- AS_VAR_IF(gl_Symbol, [yes],
5003- [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
5004+ AS_VAR_IF(gl_Symbol, [yes],
5005+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
5006 dnl shortcut - if the raw declaration exists, then set a cache
5007 dnl variable to allow skipping any later AC_CHECK_DECL efforts
5008 eval ac_cv_have_decl_$gl_func=yes])
diff --git a/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
new file mode 100644
index 0000000000..5d34ce7c0e
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
@@ -0,0 +1,50 @@
1It adds the variables that are needed
2for autoconf 2.65 to reconfigure libiconv and delete the m4 macros
3directory. Its imported from OE.
4
5Upstream-Status: Pending
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Index: libiconv-1.13.1/configure.ac
10===================================================================
11--- libiconv-1.13.1.orig/configure.ac
12+++ libiconv-1.13.1/configure.ac
13@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
14 AM_INIT_AUTOMAKE([libiconv], [1.13.1])
15 AC_CONFIG_HEADERS([config.h lib/config.h])
16 AC_PROG_MAKE_SET
17-
18+AC_CONFIG_MACRO_DIR([m4])
19 dnl checks for basic programs
20
21 AC_PROG_CC
22Index: libiconv-1.13.1/libcharset/configure.ac
23===================================================================
24--- libiconv-1.13.1.orig/libcharset/configure.ac
25+++ libiconv-1.13.1/libcharset/configure.ac
26@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
27 dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
28 dnl Fifth Floor, Boston, MA 02110-1301, USA.
29
30-AC_PREREQ([2.13])
31+AC_PREREQ(2.61)
32+AC_INIT([libcharset],[1.4] )
33+AC_CONFIG_SRCDIR([lib/localcharset.c])
34
35-PACKAGE=libcharset
36-VERSION=1.4
37-
38-AC_INIT([lib/localcharset.c])
39 AC_CONFIG_AUX_DIR([build-aux])
40 AC_CONFIG_HEADER([config.h])
41 AC_PROG_MAKE_SET
42-AC_SUBST([PACKAGE])
43-AC_SUBST([VERSION])
44+dnl AC_SUBST(PACKAGE)
45+dnl AC_SUBST(VERSION)
46+
47+AC_CONFIG_MACRO_DIR([m4])
48
49 dnl checks for basic programs
50
diff --git a/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
new file mode 100644
index 0000000000..abf739bfa1
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Character encoding support library"
2DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
3multiple character encodings, but that support lacks from your system."
4HOMEPAGE = "http://www.gnu.org/software/libiconv"
5SECTION = "libs"
6NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
7PROVIDES = "virtual/libiconv"
8LICENSE = "LGPL"
9LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
10 file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
11SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
12 file://autoconf.patch \
13 file://shared_preloadable_libiconv_linux.patch \
14 "
15
16SRC_URI[md5sum] = "d42b97f6ef5dd0ba4469d520ed732fed"
17SRC_URI[sha256sum] = "e78c347a1a0cb15f2648519e9799151f4b4a934b61ad9ee7424478efe2b8257f"
18
19S = "${WORKDIR}/libiconv-${PV}"
20
21inherit autotools pkgconfig gettext
22
23python __anonymous() {
24 if d.getVar("TCLIBC", True) == "glibc":
25 raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
26}
27
28EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
29
30LEAD_SONAME = "libiconv.so"
31
32do_configure_prepend () {
33 rm -f m4/libtool.m4 libcharset/m4/libtool.m4
34}
diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
new file mode 100644
index 0000000000..1b6fe09bb7
--- /dev/null
+++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -0,0 +1,51 @@
1SUMMARY = "Character encoding support library"
2DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
3multiple character encodings, but that support lacks from your system."
4HOMEPAGE = "http://www.gnu.org/software/libiconv"
5SECTION = "libs"
6NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
7PROVIDES = "virtual/libiconv"
8PR = "r1"
9LICENSE = "LGPLv3"
10LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
11 file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
12
13SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
14 file://autoconf.patch \
15 file://add-relocatable-module.patch \
16 "
17
18SRC_URI[md5sum] = "e34509b1623cec449dfeb73d7ce9c6c6"
19SRC_URI[sha256sum] = "72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613"
20
21S = "${WORKDIR}/libiconv-${PV}"
22
23inherit autotools pkgconfig gettext
24
25python __anonymous() {
26 if d.getVar("TARGET_OS", True) != "linux":
27 return
28 if d.getVar("TCLIBC", True) == "glibc":
29 raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
30}
31
32EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
33
34LEAD_SONAME = "libiconv.so"
35
36do_configure_prepend () {
37 rm -f ${S}/m4/libtool.m4 ${S}/m4/ltoptions.m4 ${S}/m4/ltsugar.m4 ${S}/m4/ltversion.m4 ${S}/m4/lt~obsolete.m4 ${S}/libcharset/m4/libtool.m4 ${S}/libcharset/m4/ltoptions.m4 ${S}/libcharset/m4/ltsugar.m4 ${S}/libcharset/m4/ltversion.m4 ${S}/libcharset/m4/lt~obsolete.m4
38}
39
40do_configure_append () {
41 # forcibly remove RPATH from libtool
42 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
43 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
44}
45
46do_install_append () {
47 rm -rf ${D}${libdir}/preloadable_libiconv.so
48 rm -rf ${D}${libdir}/charset.alias
49}
50
51BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
new file mode 100644
index 0000000000..0f136fd6a4
--- /dev/null
+++ b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -0,0 +1,152 @@
1Upstream-Status: Rejected
2
3Add pkgconfig support to libksba.
4This patch is rejected by upstream for the reason below:
5They think pkgconfig adds no portability and maintaining them is not worthwhile.
6
7Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
8
9Index: libksba-1.3.0/Makefile.am
10===================================================================
11--- libksba-1.3.0.orig/Makefile.am 2014-05-13 21:39:22.390385646 +0000
12+++ libksba-1.3.0/Makefile.am 2014-05-13 21:39:22.462385646 +0000
13@@ -21,6 +21,9 @@
14 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
15 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
16
17+pkgconfigdir = ${libdir}/pkgconfig
18+pkgconfig_DATA = ksba.pc
19+
20 # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
21 GITLOG_TO_CHANGELOG=gitlog-to-changelog
22
23Index: libksba-1.3.0/configure.ac
24===================================================================
25--- libksba-1.3.0.orig/configure.ac 2014-05-13 21:39:22.390385646 +0000
26+++ libksba-1.3.0/configure.ac 2014-05-13 21:39:22.462385646 +0000
27@@ -400,6 +400,7 @@
28 src/Makefile
29 src/ksba-config
30 src/versioninfo.rc
31+ksba.pc
32 tests/Makefile
33 doc/Makefile
34 ])
35Index: libksba-1.3.0/ksba.pc.in
36===================================================================
37--- /dev/null 1970-01-01 00:00:00.000000000 +0000
38+++ libksba-1.3.0/ksba.pc.in 2014-05-13 21:39:22.462385646 +0000
39@@ -0,0 +1,17 @@
40+prefix=@prefix@
41+exec_prefix=@exec_prefix@
42+libdir=@libdir@
43+includedir=@includedir@
44+
45+# API info
46+api_version=@KSBA_CONFIG_API_VERSION@
47+host=@KSBA_CONFIG_HOST@
48+
49+Name: ksba
50+Description: Libksba provides an easy API to create and parse X.509 and CMS related objects
51+Requires:
52+Version: @VERSION@
53+Libs: -L${libdir} -lksba
54+Libs.private: -L{libdir} -lgpg-error
55+Cflags: -I${includedir}
56+
57Index: libksba-1.3.0/src/ksba.m4
58===================================================================
59--- libksba-1.3.0.orig/src/ksba.m4 2014-05-13 21:39:22.390385646 +0000
60+++ libksba-1.3.0/src/ksba.m4 2014-05-13 21:49:03.650382696 +0000
61@@ -22,18 +22,7 @@
62 dnl
63 AC_DEFUN([AM_PATH_KSBA],
64 [AC_REQUIRE([AC_CANONICAL_HOST])
65- AC_ARG_WITH(ksba-prefix,
66- AC_HELP_STRING([--with-ksba-prefix=PFX],
67- [prefix where KSBA is installed (optional)]),
68- ksba_config_prefix="$withval", ksba_config_prefix="")
69- if test x$ksba_config_prefix != x ; then
70- ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix"
71- if test x${KSBA_CONFIG+set} != xset ; then
72- KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config
73- fi
74- fi
75
76- AC_PATH_PROG(KSBA_CONFIG, ksba-config, no)
77 tmp=ifelse([$1], ,1:1.0.0,$1)
78 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
79 req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
80@@ -43,48 +32,13 @@
81 min_ksba_version="$tmp"
82 fi
83
84- AC_MSG_CHECKING(for KSBA - version >= $min_ksba_version)
85- ok=no
86- if test "$KSBA_CONFIG" != "no" ; then
87- req_major=`echo $min_ksba_version | \
88- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
89- req_minor=`echo $min_ksba_version | \
90- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
91- req_micro=`echo $min_ksba_version | \
92- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
93- ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version`
94- major=`echo $ksba_config_version | \
95- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
96- minor=`echo $ksba_config_version | \
97- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
98- micro=`echo $ksba_config_version | \
99- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
100- if test "$major" -gt "$req_major"; then
101- ok=yes
102- else
103- if test "$major" -eq "$req_major"; then
104- if test "$minor" -gt "$req_minor"; then
105- ok=yes
106- else
107- if test "$minor" -eq "$req_minor"; then
108- if test "$micro" -ge "$req_micro"; then
109- ok=yes
110- fi
111- fi
112- fi
113- fi
114- fi
115- fi
116- if test $ok = yes; then
117- AC_MSG_RESULT([yes ($ksba_config_version)])
118- else
119- AC_MSG_RESULT(no)
120- fi
121+ PKG_CHECK_MODULES(KSBA, [ksba >= $min_ksba_version], [ok=yes], [ok=no])
122+
123 if test $ok = yes; then
124 # Even if we have a recent libksba, we should check that the
125 # API is compatible.
126 if test "$req_ksba_api" -gt 0 ; then
127- tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0`
128+ tmp=`$PKG_CONFIG --variable=api_version ksba`
129 if test "$tmp" -gt 0 ; then
130 AC_MSG_CHECKING([KSBA API version])
131 if test "$req_ksba_api" -eq "$tmp" ; then
132@@ -97,10 +51,8 @@
133 fi
134 fi
135 if test $ok = yes; then
136- KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags`
137- KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs`
138 ifelse([$2], , :, [$2])
139- libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none`
140+ libksba_config_host=`$PKG_CONFIG --variable=host ksba`
141 if test x"$libksba_config_host" != xnone ; then
142 if test x"$libksba_config_host" != x"$host" ; then
143 AC_MSG_WARN([[
144@@ -114,8 +66,6 @@
145 fi
146 fi
147 else
148- KSBA_CFLAGS=""
149- KSBA_LIBS=""
150 ifelse([$3], , :, [$3])
151 fi
152 AC_SUBST(KSBA_CFLAGS)
diff --git a/meta/recipes-support/libksba/libksba_1.3.0.bb b/meta/recipes-support/libksba/libksba_1.3.0.bb
new file mode 100644
index 0000000000..13ad437629
--- /dev/null
+++ b/meta/recipes-support/libksba/libksba_1.3.0.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
2HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
3LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
5 file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
7 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
8 "
9PR = "r1"
10
11DEPENDS = "libgpg-error"
12
13BINCONFIG = "${bindir}/ksba-config"
14
15inherit autotools binconfig-disabled pkgconfig texinfo
16
17SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
18 file://ksba-add-pkgconfig-support.patch"
19
20SRC_URI[md5sum] = "cd86fad9c9d360b2cf80449f8a4a4075"
21SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971"
22
23do_configure_prepend () {
24 # Else these could be used in preference to those in aclocal-copy
25 rm -f ${S}/m4/gpg-error.m4
26}
diff --git a/meta/recipes-support/libmpc/libmpc.inc b/meta/recipes-support/libmpc/libmpc.inc
new file mode 100644
index 0000000000..b3742543df
--- /dev/null
+++ b/meta/recipes-support/libmpc/libmpc.inc
@@ -0,0 +1,7 @@
1SUMMARY = "C library for complex number arithmetic with arbitrary precision and correct rounding"
2DESCRIPTION = "Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr"
3HOMEPAGE = "http://www.multiprecision.org/"
4LICENSE = "LGPLv3"
5SECTION = "libs"
6
7inherit autotools texinfo
diff --git a/meta/recipes-support/libmpc/libmpc_1.0.2.bb b/meta/recipes-support/libmpc/libmpc_1.0.2.bb
new file mode 100644
index 0000000000..41177ebd9b
--- /dev/null
+++ b/meta/recipes-support/libmpc/libmpc_1.0.2.bb
@@ -0,0 +1,13 @@
1require libmpc.inc
2
3DEPENDS = "gmp mpfr"
4
5LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
6SRC_URI = "http://www.multiprecision.org/mpc/download/mpc-${PV}.tar.gz"
7
8SRC_URI[md5sum] = "68fadff3358fb3e7976c7a398a0af4c3"
9SRC_URI[sha256sum] = "b561f54d8a479cee3bc891ee52735f18ff86712ba30f036f8b8537bae380c488"
10
11S = "${WORKDIR}/mpc-${PV}"
12BBCLASSEXTEND = "native nativesdk"
13
diff --git a/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/meta/recipes-support/libnl/libnl/fix-pc-file.patch
new file mode 100644
index 0000000000..fe8b833a1c
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/fix-pc-file.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3Some packages are asking only for libnl-2.0, but expects to get also
4libnl-genl, libnl-nf libnl-route, easiest way to fix them is here.
5
6Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
7Index: libnl-3.2.14/libnl-3.0.pc.in
8===================================================================
9--- libnl-3.2.14.orig/libnl-3.0.pc.in
10+++ libnl-3.2.14/libnl-3.0.pc.in
11@@ -6,5 +6,5 @@ includedir=@includedir@
12 Name: libnl
13 Description: Convenience library for netlink sockets
14 Version: @PACKAGE_VERSION@
15-Libs: -L${libdir} -lnl-@MAJ_VERSION@
16+Libs: -L${libdir} -lnl-@MAJ_VERSION@ -lnl-genl-@MAJ_VERSION@ -lnl-nf-@MAJ_VERSION@ -lnl-route-@MAJ_VERSION@
17 Cflags: -I${includedir}/libnl@MAJ_VERSION@
diff --git a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
new file mode 100644
index 0000000000..79aa0bdf11
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
@@ -0,0 +1,36 @@
1Upstream-Status: Inappropriate [configuration]
2
3libnl has progressed to 0.3.2 and there does not appear to be any
4"make -j" issues with this build after my limited testing on that
5newer version so we can assume this issue is fixed upstream
6
7Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
8
9Index: libnl-3.2.25/lib/Makefile.am
10===================================================================
11--- libnl-3.2.25.orig/lib/Makefile.am
12+++ libnl-3.2.25/lib/Makefile.am
13@@ -46,9 +46,12 @@ CLEANFILES = \
14
15 # Hack to avoid using ylwrap. It does not function correctly in combination
16 # with --header-file=
17+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
18+route/pktloc_grammar.h: route/pktloc_grammar.c
19 route/pktloc_grammar.c: route/pktloc_grammar.l
20 $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
21
22+route/pktloc_syntax.h: route/pktloc_syntax.c
23 route/pktloc_syntax.c: route/pktloc_syntax.y
24 $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
25
26@@ -102,7 +105,9 @@ BUILT_SOURCES = \
27 route/cls/ematch_grammar.c \
28 route/cls/ematch_syntax.c \
29 route/pktloc_grammar.c \
30- route/pktloc_syntax.c
31+ route/pktloc_syntax.c \
32+ route/pktloc_syntax.h \
33+ route/pktloc_grammar.h
34
35 EXTRA_DIST = \
36 route/pktloc_grammar.l \
diff --git a/meta/recipes-support/libnl/libnl_3.2.25.bb b/meta/recipes-support/libnl/libnl_3.2.25.bb
new file mode 100644
index 0000000000..dcaa85d3af
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl_3.2.25.bb
@@ -0,0 +1,43 @@
1SUMMARY = "A library for applications dealing with netlink sockets"
2HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
3SECTION = "libs/network"
4
5PE = "1"
6
7LICENSE = "LGPLv2.1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
9
10DEPENDS = "flex-native bison-native"
11
12SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
13 file://fix-pktloc_syntax_h-race.patch \
14 file://fix-pc-file.patch \
15 "
16
17SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c"
18SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5"
19
20inherit autotools-brokensep pkgconfig
21
22FILES_${PN} = "${libdir}/libnl-3.so.* \
23 ${libdir}/libnl.so.* \
24 ${sysconfdir}"
25RREPLACES_${PN} = "libnl2"
26RCONFLICTS_${PN} = "libnl2"
27FILES_${PN}-dbg += "${libdir}/libnl/cli/*/.debug"
28FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.so \
29 ${libdir}/libnl/cli/*/*.la"
30FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
31
32PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl ${PN}-idiag"
33FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
34 ${libdir}/libnl/cli/*/*.so.* \
35 ${sbindir}/nl-*"
36FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
37FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
38FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
39FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
40 ${libdir}/libnl-genl.so.* \
41 ${sbindir}/genl-ctrl-list"
42RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
43RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
diff --git a/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch b/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
new file mode 100644
index 0000000000..aff1cb1842
--- /dev/null
+++ b/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Inappropriate [configuration]
2
3From 1921498bcc06408e8b051a3a9e9ce4182998f748 Mon Sep 17 00:00:00 2001
4From: David Schleef <ds@schleef.org>
5Date: Fri, 8 Apr 2011 10:05:49 -0700
6Subject: [PATCH 10/10] Fix --enable-vfp flag
7
8Patch from Christophe Lyon, fixes #36084.
9---
10 configure.ac | 4 ++--
11 liboil/arm/Makefile.am | 1 +
12 2 files changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/configure.ac b/configure.ac
15index 98c81fb..407d88c 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -188,8 +188,8 @@ fi
19 AC_ARG_ENABLE(vfp,
20 AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]),
21 enable_vfp=$enableval,enable_vfp=yes)
22-if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
23- AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"],
24+if test "x$enable_vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
25+ AS_COMPILER_FLAG(["-mfpu=vfp"],
26 [VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"],
27 true)
28 #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"],
29diff --git a/liboil/arm/Makefile.am b/liboil/arm/Makefile.am
30index ead08ed..cd8d9fa 100644
31--- a/liboil/arm/Makefile.am
32+++ b/liboil/arm/Makefile.am
33@@ -6,4 +6,5 @@ libarm_la_SOURCES = \
34 math_vfp_asm.S
35
36 libarm_la_CFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
37+libarm_la_CCASFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
38
39--
401.7.6
41
diff --git a/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch b/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
new file mode 100644
index 0000000000..c8e3c1f721
--- /dev/null
+++ b/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
@@ -0,0 +1,19 @@
1Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=31358
2
3configure: fix whitelisting of x86_64 unaligned memory access
4
5Fix typo in whitelist so cross-compile works for x86_64.
6
7Upstream-Status: Inappropriate [configuration]
8
9--- liboil-0.3.17/m4/as-unaligned-access.m4.orig 2009-02-26 14:40:08.000000000 -0500
10+++ liboil-0.3.17/m4/as-unaligned-access.m4 2010-11-03 12:19:55.000000000 -0400
11@@ -9,7 +9,7 @@
12 _AS_ECHO_N([(blacklisted) ])
13 as_cv_unaligned_access=no
14 ;;
15- i?86*|x86_64|amd64|powerpc*|m68k*|cris*)
16+ i?86*|x86_64*|amd64*|powerpc*|m68k*|cris*)
17 _AS_ECHO_N([(whitelisted) ])
18 as_cv_unaligned_access=yes
19 ;;
diff --git a/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch b/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
new file mode 100644
index 0000000000..473380e9fc
--- /dev/null
+++ b/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
@@ -0,0 +1,222 @@
1Upstream-Status: Pending
2
3Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
4
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
62011/12/01
7
8
9Index: liboil-0.3.17/liboil/amd64/wavelet.c
10===================================================================
11--- liboil-0.3.17.orig/liboil/amd64/wavelet.c
12+++ liboil-0.3.17/liboil/amd64/wavelet.c
13@@ -21,14 +21,14 @@ deinterleave2_asm (int16_t *d1, int16_t
14 asm volatile ("\n"
15 " sub $2, %%rcx\n"
16 "1:\n"
17- " movw (%1,%%rcx,4), %%ax\n"
18- " movw %%ax, (%0,%%rcx,2)\n"
19- " movw 2(%1,%%rcx,4), %%ax\n"
20- " movw %%ax, (%2,%%rcx,2)\n"
21- " movw 4(%1,%%rcx,4), %%ax\n"
22- " movw %%ax, 2(%0,%%rcx,2)\n"
23- " movw 6(%1,%%rcx,4), %%ax\n"
24- " movw %%ax, 2(%2,%%rcx,2)\n"
25+ " movw (%q1,%%rcx,4), %%ax\n"
26+ " movw %%ax, (%q0,%%rcx,2)\n"
27+ " movw 2(%q1,%%rcx,4), %%ax\n"
28+ " movw %%ax, (%q2,%%rcx,2)\n"
29+ " movw 4(%q1,%%rcx,4), %%ax\n"
30+ " movw %%ax, 2(%q0,%%rcx,2)\n"
31+ " movw 6(%q1,%%rcx,4), %%ax\n"
32+ " movw %%ax, 2(%q2,%%rcx,2)\n"
33 " sub $2, %%rcx\n"
34 " jge 1b\n"
35 : "+r" (d1), "+r" (s_2xn), "+r" (d2), "+c" (n)
36@@ -53,20 +53,20 @@ deinterleave2_mmx (int16_t *d1, int16_t
37 asm volatile ("\n"
38 " xor %%rcx, %%rcx\n"
39 "1:\n"
40- " movq (%1,%%rcx,4), %%mm0\n"
41- " movq 8(%1,%%rcx,4), %%mm1\n"
42+ " movq (%q1,%%rcx,4), %%mm0\n"
43+ " movq 8(%q1,%%rcx,4), %%mm1\n"
44 " pslld $16, %%mm0\n"
45 " pslld $16, %%mm1\n"
46 " psrad $16, %%mm0\n"
47 " psrad $16, %%mm1\n"
48 " packssdw %%mm1, %%mm0\n"
49- " movq %%mm0, (%0,%%rcx,2)\n"
50- " movq (%1,%%rcx,4), %%mm0\n"
51- " movq 8(%1,%%rcx,4), %%mm1\n"
52+ " movq %%mm0, (%q0,%%rcx,2)\n"
53+ " movq (%q1,%%rcx,4), %%mm0\n"
54+ " movq 8(%q1,%%rcx,4), %%mm1\n"
55 " psrad $16, %%mm0\n"
56 " psrad $16, %%mm1\n"
57 " packssdw %%mm1, %%mm0\n"
58- " movq %%mm0, (%2,%%rcx,2)\n"
59+ " movq %%mm0, (%q2,%%rcx,2)\n"
60 " add $4, %%rcx\n"
61 " cmp %3, %%ecx\n"
62 " jl 1b\n"
63@@ -93,10 +93,10 @@ deinterleave2_mmx_2 (int16_t *d1, int16_
64 asm volatile ("\n"
65 " xor %%rcx, %%rcx\n"
66 "1:\n"
67- " pshufw $0xd8, (%1,%%rcx,4), %%mm0\n"
68- " movd %%mm0, (%0,%%rcx,2)\n"
69- " pshufw $0x8d, (%1,%%rcx,4), %%mm0\n"
70- " movd %%mm0, (%2,%%rcx,2)\n"
71+ " pshufw $0xd8, (%q1,%%rcx,4), %%mm0\n"
72+ " movd %%mm0, (%q0,%%rcx,2)\n"
73+ " pshufw $0x8d, (%q1,%%rcx,4), %%mm0\n"
74+ " movd %%mm0, (%q2,%%rcx,2)\n"
75 " add $2, %%rcx\n"
76 " cmp %3, %%ecx\n"
77 " jl 1b\n"
78@@ -123,16 +123,16 @@ deinterleave2_mmx_3 (int16_t *d1, int16_
79 asm volatile ("\n"
80 " xor %%rcx, %%rcx\n"
81 "1:\n"
82- " movq (%1,%%rcx,4), %%mm1\n"
83- " movq (%1,%%rcx,4), %%mm2\n"
84- " movq 8(%1,%%rcx,4), %%mm0\n"
85+ " movq (%q1,%%rcx,4), %%mm1\n"
86+ " movq (%q1,%%rcx,4), %%mm2\n"
87+ " movq 8(%q1,%%rcx,4), %%mm0\n"
88 " punpcklwd %%mm0, %%mm1\n"
89 " punpckhwd %%mm0, %%mm2\n"
90 " movq %%mm1, %%mm0\n"
91 " punpcklwd %%mm2, %%mm0\n"
92 " punpckhwd %%mm2, %%mm1\n"
93- " movq %%mm0, (%0,%%rcx,2)\n"
94- " movq %%mm1, (%2,%%rcx,2)\n"
95+ " movq %%mm0, (%q0,%%rcx,2)\n"
96+ " movq %%mm1, (%q2,%%rcx,2)\n"
97 " add $4, %%rcx\n"
98 " cmp %3, %%ecx\n"
99 " jl 1b\n"
100@@ -159,26 +159,26 @@ deinterleave2_mmx_4 (int16_t *d1, int16_
101 asm volatile ("\n"
102 " xor %%rcx, %%rcx\n"
103 "1:\n"
104- " movq (%1,%%rcx,4), %%mm1\n"
105+ " movq (%q1,%%rcx,4), %%mm1\n"
106 " movq %%mm1, %%mm2\n"
107- " movq 8(%1,%%rcx,4), %%mm0\n"
108- " movq 16(%1,%%rcx,4), %%mm5\n"
109+ " movq 8(%q1,%%rcx,4), %%mm0\n"
110+ " movq 16(%q1,%%rcx,4), %%mm5\n"
111 " punpcklwd %%mm0, %%mm1\n"
112 " movq %%mm5, %%mm6\n"
113 " punpckhwd %%mm0, %%mm2\n"
114- " movq 24(%1,%%rcx,4), %%mm4\n"
115+ " movq 24(%q1,%%rcx,4), %%mm4\n"
116 " movq %%mm1, %%mm0\n"
117 " punpcklwd %%mm4, %%mm5\n"
118 " punpcklwd %%mm2, %%mm0\n"
119 " punpckhwd %%mm4, %%mm6\n"
120 " punpckhwd %%mm2, %%mm1\n"
121 " movq %%mm5, %%mm4\n"
122- " movq %%mm0, (%0,%%rcx,2)\n"
123+ " movq %%mm0, (%q0,%%rcx,2)\n"
124 " punpcklwd %%mm6, %%mm4\n"
125- " movq %%mm1, (%2,%%rcx,2)\n"
126+ " movq %%mm1, (%q2,%%rcx,2)\n"
127 " punpckhwd %%mm6, %%mm5\n"
128- " movq %%mm4, 8(%0,%%rcx,2)\n"
129- " movq %%mm5, 8(%2,%%rcx,2)\n"
130+ " movq %%mm4, 8(%q0,%%rcx,2)\n"
131+ " movq %%mm5, 8(%q2,%%rcx,2)\n"
132 " add $8, %%rcx\n"
133 " cmp %3, %%ecx\n"
134 " jl 1b\n"
135@@ -252,13 +252,13 @@ interleave2_mmx (int16_t *d_2xn, int16_t
136 asm volatile ("\n"
137 " xor %%rcx, %%rcx\n"
138 "1:\n"
139- " movq (%1,%%rcx,2), %%mm0\n"
140- " movq (%2,%%rcx,2), %%mm1\n"
141+ " movq (%q1,%%rcx,2), %%mm0\n"
142+ " movq (%q2,%%rcx,2), %%mm1\n"
143 " movq %%mm0, %%mm2\n"
144 " punpckhwd %%mm1, %%mm0\n"
145 " punpcklwd %%mm1, %%mm2\n"
146- " movq %%mm2, (%0,%%rcx,4)\n"
147- " movq %%mm0, 8(%0,%%rcx,4)\n"
148+ " movq %%mm2, (%q0,%%rcx,4)\n"
149+ " movq %%mm0, 8(%q0,%%rcx,4)\n"
150 " add $4, %%rcx\n"
151 " cmp %3, %%ecx\n"
152 " jl 1b\n"
153@@ -285,12 +285,12 @@ lift_add_shift1_mmx (int16_t *d, int16_t
154 asm volatile ("\n"
155 " xor %%rcx, %%rcx\n"
156 "1:\n"
157- " movq (%2,%%rcx,2), %%mm1\n"
158- " movq (%3,%%rcx,2), %%mm2\n"
159+ " movq (%q2,%%rcx,2), %%mm1\n"
160+ " movq (%q3,%%rcx,2), %%mm2\n"
161 " paddw %%mm2, %%mm1\n"
162 " psraw $1, %%mm1\n"
163- " paddw (%1,%%rcx,2), %%mm1\n"
164- " movq %%mm1, (%0,%%rcx,2)\n"
165+ " paddw (%q1,%%rcx,2), %%mm1\n"
166+ " movq %%mm1, (%q0,%%rcx,2)\n"
167 " add $4, %%rcx\n"
168 " cmp %4, %%ecx\n"
169 " jl 1b\n"
170@@ -317,13 +317,13 @@ lift_sub_shift1_mmx (int16_t *d, int16_t
171 asm volatile ("\n"
172 " xor %%rcx, %%rcx\n"
173 "1:\n"
174- " movq (%2,%%rcx,2), %%mm1\n"
175- " movq (%3,%%rcx,2), %%mm2\n"
176- " movq (%1,%%rcx,2), %%mm0\n"
177+ " movq (%q2,%%rcx,2), %%mm1\n"
178+ " movq (%q3,%%rcx,2), %%mm2\n"
179+ " movq (%q1,%%rcx,2), %%mm0\n"
180 " paddw %%mm2, %%mm1\n"
181 " psraw $1, %%mm1\n"
182 " psubw %%mm1, %%mm0\n"
183- " movq %%mm0, (%0,%%rcx,2)\n"
184+ " movq %%mm0, (%q0,%%rcx,2)\n"
185 " add $4, %%rcx\n"
186 " cmp %4, %%ecx\n"
187 " jl 1b\n"
188@@ -350,12 +350,12 @@ lift_add_shift2_mmx (int16_t *d, int16_t
189 asm volatile ("\n"
190 " xor %%rcx, %%rcx\n"
191 "1:\n"
192- " movq (%2,%%rcx,2), %%mm1\n"
193- " movq (%3,%%rcx,2), %%mm2\n"
194+ " movq (%q2,%%rcx,2), %%mm1\n"
195+ " movq (%q3,%%rcx,2), %%mm2\n"
196 " paddw %%mm2, %%mm1\n"
197 " psraw $2, %%mm1\n"
198- " paddw (%1,%%rcx,2), %%mm1\n"
199- " movq %%mm1, (%0,%%rcx,2)\n"
200+ " paddw (%q1,%%rcx,2), %%mm1\n"
201+ " movq %%mm1, (%q0,%%rcx,2)\n"
202 " add $4, %%rcx\n"
203 " cmp %4, %%ecx\n"
204 " jl 1b\n"
205@@ -382,13 +382,13 @@ lift_sub_shift2_mmx (int16_t *d, int16_t
206 asm volatile ("\n"
207 " xor %%rcx, %%rcx\n"
208 "1:\n"
209- " movq (%2,%%rcx,2), %%mm1\n"
210- " movq (%3,%%rcx,2), %%mm2\n"
211- " movq (%1,%%rcx,2), %%mm0\n"
212+ " movq (%q2,%%rcx,2), %%mm1\n"
213+ " movq (%q3,%%rcx,2), %%mm2\n"
214+ " movq (%q1,%%rcx,2), %%mm0\n"
215 " paddw %%mm2, %%mm1\n"
216 " psraw $2, %%mm1\n"
217 " psubw %%mm1, %%mm0\n"
218- " movq %%mm0, (%0,%%rcx,2)\n"
219+ " movq %%mm0, (%q0,%%rcx,2)\n"
220 " add $4, %%rcx\n"
221 " cmp %4, %%ecx\n"
222 " jl 1b\n"
diff --git a/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch b/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
new file mode 100644
index 0000000000..892d441310
--- /dev/null
+++ b/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Inappropriate [disable feature]
2
3--- liboil-0.3.9/liboil/liboilfunction.c.old 2006-09-18 13:03:20.000000000 +0100
4+++ liboil-0.3.9/liboil/liboilfunction.c 2006-09-18 13:04:10.000000000 +0100
5@@ -345,7 +345,9 @@
6 return;
7 }
8
9- test = oil_test_new (klass);
10+ klass->chosen_impl = klass->reference_impl;
11+ klass->func = klass->reference_impl->func;
12+/* test = oil_test_new (klass);
13 if (test == NULL) {
14 OIL_ERROR ("failed to test function class %s", klass->name);
15 return;
16@@ -385,7 +387,7 @@
17 klass->chosen_impl = min_impl;
18 klass->func = min_impl->func;
19
20- oil_test_free (test);
21+ oil_test_free (test);*/
22 }
23
24 static void
diff --git a/meta/recipes-support/liboil/liboil_0.3.17.bb b/meta/recipes-support/liboil/liboil_0.3.17.bb
new file mode 100644
index 0000000000..03b7785215
--- /dev/null
+++ b/meta/recipes-support/liboil/liboil_0.3.17.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Library of simple functions optimized for various CPUs"
2HOMEPAGE = "http://liboil.freedesktop.org/"
3BUGTRACKER = "https://bugs.freedesktop.org/"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ad80780d9c5205d63481a0184e199a15 \
7 file://liboil/liboil.h;endline=28;md5=95c794a66b88800d949fed17e437d9fb \
8 file://liboil/liboilcpu.c;endline=28;md5=89da69a61d88eedcba066f42353fb75a \
9 file://examples/example1.c;endline=29;md5=9d4dad9fcbbdf0441ee063f8af5170c9 \
10 file://testsuite/trans.c;endline=29;md5=380ecd43121fe3dcc0d8d7e5984f283d"
11
12DEPENDS = "glib-2.0"
13PR = "r5"
14
15SRC_URI = "http://liboil.freedesktop.org/download/${BPN}-${PV}.tar.gz \
16 file://no-tests.patch \
17 file://fix-unaligned-whitelist.patch \
18 file://0001-Fix-enable-vfp-flag.patch \
19 file://liboil_fix_for_x32.patch \
20 "
21
22SRC_URI[md5sum] = "47dc734f82faeb2964d97771cfd2e701"
23SRC_URI[sha256sum] = "105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69"
24
25inherit autotools pkgconfig
26
27ARM_INSTRUCTION_SET = "arm"
diff --git a/meta/recipes-support/libpcre/libpcre/Makefile b/meta/recipes-support/libpcre/libpcre/Makefile
new file mode 100644
index 0000000000..5419d71f7f
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/Makefile
@@ -0,0 +1,183 @@
1TESTS = pcre_stringpiece_unittest RunTest RunGrepTest
2subdir = .
3am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
4am__vpath_adj = case $$p in \
5 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
6 *) f=$$p;; \
7 esac;
8am__tty_colors_dummy = \
9 mgn= red= grn= lgn= blu= brg= std=; \
10 am__color_tests=no
11am__tty_colors = { \
12 $(am__tty_colors_dummy); \
13 if test "X$(AM_COLOR_TESTS)" = Xno; then \
14 am__color_tests=no; \
15 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
16 am__color_tests=yes; \
17 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
18 am__color_tests=yes; \
19 fi; \
20 if test $$am__color_tests = yes; then \
21 red=''; \
22 grn=''; \
23 lgn=''; \
24 blu=''; \
25 mgn=''; \
26 brg=''; \
27 std=''; \
28 fi; \
29}
30am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
31am__sh_e_setup = case $$- in *e*) set +e;; esac
32am__common_driver_flags = \
33 --color-tests "$$am__color_tests" \
34 --enable-hard-errors "$$am__enable_hard_errors" \
35 --expect-failure "$$am__expect_failure"
36am__check_pre = \
37$(am__sh_e_setup); \
38$(am__vpath_adj_setup) $(am__vpath_adj) \
39$(am__tty_colors); \
40srcdir=$(srcdir); export srcdir; \
41case "$@" in \
42 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
43 *) am__odir=.;; \
44esac; \
45test "x$$am__odir" = x"." || test -d "$$am__odir" \
46 || $(MKDIR_P) "$$am__odir" || exit $$?; \
47if test -f "./$$f"; then dir=./; \
48elif test -f "$$f"; then dir=; \
49else dir="$(srcdir)/"; fi; \
50tst=$$dir$$f; log='$@'; \
51if test -n '$(DISABLE_HARD_ERRORS)'; then \
52 am__enable_hard_errors=no; \
53else \
54 am__enable_hard_errors=yes; \
55fi;
56am__set_TESTS_bases = \
57 bases='$(TEST_LOGS)'; \
58 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
59 bases=`echo $$bases`
60RECHECK_LOGS = $(TEST_LOGS)
61TEST_SUITE_LOG = test-suite.log
62TEST_EXTENSIONS = .test
63LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
64am__test_logs1 = $(TESTS:=.log)
65am__test_logs2 = $(am__test_logs1:.log=.log)
66TEST_LOGS = $(am__test_logs2:.test.log=.log)
67MKDIR_P = /bin/mkdir -p
68PACKAGE_STRING = PCRE 8.34
69SHELL = /bin/sh
70srcdir = .
71top_srcdir = .
72$(TEST_SUITE_LOG): $(TEST_LOGS)
73 @$(am__set_TESTS_bases); \
74 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
75 redo_bases=`for i in $$bases; do \
76 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
77 done`; \
78 st=0; \
79 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
80 for i in $$redo_bases; do \
81 test -f $$i.trs && test -r $$i.trs \
82 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
83 test -f $$i.log && test -r $$i.log \
84 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
85 done; \
86 test $$st -eq 0 || exit 1;
87 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
88 ws='[ ]'; \
89 results=`for b in $$bases; do echo $$b.trs; done`; \
90 test -n "$$results" || results=/dev/null; \
91 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
92 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
93 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
94 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
95 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
96 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
97 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
98 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
99 success=true; \
100 else \
101 success=false; \
102 fi; \
103 br='==================='; br=$$br$$br$$br$$br; \
104 result_count () \
105 { \
106 if test x"$$1" = x"--maybe-color"; then \
107 maybe_colorize=yes; \
108 elif test x"$$1" = x"--no-color"; then \
109 maybe_colorize=no; \
110 else \
111 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
112 fi; \
113 shift; \
114 desc=$$1 count=$$2; \
115 if test $$maybe_colorize = yes && test $$count -gt 0; then \
116 color_start=$$3 color_end=$$std; \
117 else \
118 color_start= color_end=; \
119 fi; \
120 echo "$${color_start}# $$desc $$count$${color_end}"; \
121 }; \
122 create_testsuite_report () \
123 { \
124 result_count $$1 "TOTAL:" $$all "$$brg"; \
125 result_count $$1 "PASS: " $$pass "$$grn"; \
126 result_count $$1 "SKIP: " $$skip "$$blu"; \
127 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
128 result_count $$1 "FAIL: " $$fail "$$red"; \
129 result_count $$1 "XPASS:" $$xpass "$$red"; \
130 result_count $$1 "ERROR:" $$error "$$mgn"; \
131 }; \
132 { \
133 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
134 $(am__rst_title); \
135 create_testsuite_report --no-color; \
136 echo; \
137 echo ".. contents:: :depth: 2"; \
138 echo; \
139 for b in $$bases; do echo $$b; done; \
140 } >$(TEST_SUITE_LOG).tmp || exit 1; \
141 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
142 if $$success; then \
143 col="$$grn"; \
144 else \
145 col="$$red"; \
146 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
147 fi; \
148 echo "$${col}$$br$${std}"; \
149 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
150 echo "$${col}$$br$${std}"; \
151 create_testsuite_report --maybe-color; \
152 echo "$$col$$br$$std"; \
153 if $$success; then :; else \
154 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
155 echo "$$col$$br$$std"; \
156 fi; \
157 $$success || exit 1
158check-TESTS:
159 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
160 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
161 @set +e; $(am__set_TESTS_bases); \
162 log_list=`for i in $$bases; do echo $$i.log; done`; \
163 log_list=`echo $$log_list`; \
164 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
165 exit $$?;
166pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT)
167 @p='pcre_stringpiece_unittest$(EXEEXT)'; \
168 b='pcre_stringpiece_unittest'; \
169 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
170 --log-file $$b.log --trs-file $$b.trs \
171 $(am__common_driver_flags) -- "$$tst"
172RunTest.log: RunTest
173 @p='RunTest'; \
174 b='RunTest'; \
175 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
176 --log-file $$b.log --trs-file $$b.trs \
177 $(am__common_driver_flags) -- "$$tst"
178RunGrepTest.log: RunGrepTest
179 @p='RunGrepTest'; \
180 b='RunGrepTest'; \
181 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
182 --log-file $$b.log --trs-file $$b.trs \
183 $(am__common_driver_flags) -- "$$tst"
diff --git a/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
new file mode 100644
index 0000000000..89b44f6aa6
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Inappropriate [debian patch]
2
3This patch address a namespace collision with libc.
4
5Although there is no "#include <regex.h>" in the source file, at
6runtime, it's unintentionally linked to the libc version, the regcomp of
7libc is called instead the pcre one using pcre's data structure...
8that looks like a disaster.
9
10Can patch is from Debian (and Ubuntu 11.04alpha has it also).
11
12[sgw: added patch comment]
13Signed-off-by: Qing He <qing.he@intel.com>
14Signed-off-by: Saul Wold <sgw@linux.intel.com>
15
16--- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800
17+++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800
18@@ -133,14 +130,19 @@
19
20 /* The functions */
21
22-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
23-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
24+PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int);
25+PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t,
26 regmatch_t *, int);
27-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
28-PCREPOSIX_EXP_DECL void regfree(regex_t *);
29+PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t);
30+PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *);
31
32 #ifdef __cplusplus
33 } /* extern "C" */
34 #endif
35
36+#define regcomp pcreposix_regcomp
37+#define regexec pcreposix_regexec
38+#define regerror pcreposix_regerror
39+#define regfree pcreposix_regfree
40+
41 #endif /* End of pcreposix.h */
diff --git a/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
new file mode 100644
index 0000000000..83880f7098
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
@@ -0,0 +1,48 @@
1Upstream-Status: Pending
2
3--- pcre-8.32.orig/Makefile.am
4+++ pcre-8.32/Makefile.am
5@@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config
6
7+CC_FOR_BUILD = @CC_FOR_BUILD@
8+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
9+CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
10+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
11+
12 if WITH_REBUILD_CHARTABLES
13
14 noinst_PROGRAMS += dftables
15 dftables_SOURCES = dftables.c
16+dftables_LINK = $(CCLD_FOR_BUILD) -o $@
17+dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
18+
19+dftables.o: $(srcdir)/dftables.c
20+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c
21
22 pcre_chartables.c: dftables$(EXEEXT)
23 ./dftables$(EXEEXT) $@
24--- pcre-8.32.orig/configure.ac
25+++ pcre-8.32/configure.ac
26@@ -72,6 +72,22 @@ then
27 fi
28 fi
29
30+if test x"$cross_compiling" = xyes; then
31+ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
32+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
33+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
34+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
35+else
36+ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
37+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
38+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
39+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
40+fi
41+AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
42+AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
43+AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
44+AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
45+
46 # AC_PROG_CXX will return "g++" even if no c++ compiler is installed.
47 # Check for that case, and just disable c++ code if g++ doesn't run.
48 AC_LANG_PUSH(C++)
diff --git a/meta/recipes-support/libpcre/libpcre/run-ptest b/meta/recipes-support/libpcre/libpcre/run-ptest
new file mode 100644
index 0000000000..990d4a12ad
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make check-TESTS
diff --git a/meta/recipes-support/libpcre/libpcre_8.35.bb b/meta/recipes-support/libpcre/libpcre_8.35.bb
new file mode 100644
index 0000000000..92098c8c51
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre_8.35.bb
@@ -0,0 +1,75 @@
1DESCRIPTION = "The PCRE library is a set of functions that implement regular \
2expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
3has its own native API, as well as a set of wrapper functions that correspond \
4to the POSIX regular expression API."
5SUMMARY = "Perl Compatible Regular Expressions"
6HOMEPAGE = "http://www.pcre.org"
7SECTION = "devel"
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=ded617e975f28e15952dc68b84a7ac1a"
10SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \
11 file://pcre-cross.patch \
12 file://fix-pcre-name-collision.patch \
13 file://run-ptest \
14 file://Makefile \
15"
16
17SRC_URI[md5sum] = "6aacb23986adccd9b3bc626c00979958"
18SRC_URI[sha256sum] = "a961c1c78befef263cc130756eeca7b674b4e73a81533293df44e4265236865b"
19
20S = "${WORKDIR}/pcre-${PV}"
21
22PROVIDES += "pcre"
23DEPENDS += "bzip2 zlib"
24
25PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
26
27BINCONFIG = "${bindir}/pcre-config"
28
29inherit autotools binconfig-disabled ptest
30
31PARALLEL_MAKE = ""
32
33EXTRA_OECONF = "\
34 --enable-newline-is-lf \
35 --enable-rebuild-chartables \
36 --enable-utf8 \
37 --with-link-size=2 \
38 --with-match-limit=10000000 \
39"
40
41# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
42# set CFLAGS_FOR_BUILD, required for the libpcre build.
43BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
44CFLAGS += "-D_REENTRANT"
45CXXFLAGS_append_powerpc = " -lstdc++"
46
47PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
48
49SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
50SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
51SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
52SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
53SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
54SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
55
56FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
57FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
58FILES_pcregrep = "${bindir}/pcregrep"
59FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
60FILES_pcretest = "${bindir}/pcretest"
61FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
62
63BBCLASSEXTEND = "native nativesdk"
64
65do_install_ptest() {
66 t=${D}${PTEST_PATH}
67 cp ${WORKDIR}/Makefile $t
68 cp -r ${S}/testdata $t
69 for i in pcre_stringpiece_unittest pcregrep pcretest; \
70 do cp ${B}/.libs/$i $t; \
71 done
72 for i in RunTest RunGrepTest test-driver; \
73 do cp ${S}/$i $t; \
74 done
75}
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
new file mode 100644
index 0000000000..a53a197615
--- /dev/null
+++ b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Library providing automatic proxy configuration management"
2HOMEPAGE = "http://code.google.com/p/libproxy/"
3BUGTRACKER = "http://code.google.com/p/libproxy/issues/list"
4SECTION = "libs"
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
7 file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
8
9DEPENDS = "gconf glib-2.0"
10
11SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.zip \
12 "
13
14SRC_URI[md5sum] = "06be230b8b612e64997f8f15af6373aa"
15SRC_URI[sha256sum] = "3175abcb49c0b37fd82c697927783bf7d53de3884a8559bc594e59caa09bdb04"
16
17inherit cmake pkgconfig
18
19EXTRA_OECMAKE = "-DWITH_WEBKIT=no -DWITH_GNOME=yes -DWITH_KDE4=no \
20 -DWITH_PYTHON=no -DWITH_PERL=no -DWITH_MOZJS=no -DWITH_NM=no -DLIB_INSTALL_DIR=${libdir} -DLIBEXEC_INSTALL_DIR=${libexecdir}"
21
22FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
23FILES_${PN}-dev += "${datadir}/cmake"
24FILES_${PN}-dbg += "${libdir}/${BPN}/${PV}/plugins/.debug/ ${libdir}/${BPN}/${PV}/modules/.debug/"
25
26do_configure_prepend() {
27 export HOST_SYS=${HOST_SYS}
28 export BUILD_SYS=${BUILD_SYS}
29}
30
31python() {
32 if bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
33 d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE").replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
34 d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS").split() if i != "gconf"))
35}
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
new file mode 100644
index 0000000000..81da911926
--- /dev/null
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
@@ -0,0 +1,29 @@
1SUMMARY = "An HTTP library implementation in C"
2HOMEPAGE = "http://www.gnome.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
7
8SECTION = "x11/gnome/libs"
9
10DEPENDS = "glib-2.0 gnutls libxml2 sqlite3 intltool-native"
11
12# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Enable
13# by default but let it be easily disabled.
14PACKAGECONFIG ??= "gnome"
15PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
16
17SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
18SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
19
20
21SRC_URI[md5sum] = "86765c0093efaf3006fa2960d170d097"
22SRC_URI[sha256sum] = "fa3d5574c1a2df521242e2ca624a2b3057121798cab9f8f40525aa186a7b15a3"
23
24S = "${WORKDIR}/libsoup-${PV}"
25
26inherit autotools gettext pkgconfig
27
28# glib-networking is needed for SSL, proxies, etc.
29RRECOMMENDS_${PN} = "glib-networking"
diff --git a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
new file mode 100644
index 0000000000..a330c73412
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -0,0 +1,42 @@
1From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 16 Sep 2013 18:16:12 +0800
4Subject: [PATCH] remove the test to convert euc-jp
5
6Remove the test "Test against HP-UX 11.11 bug:
7No converter from EUC-JP to UTF-8 is provided"
8since we don't support HP-UX and if the euc-jp is not
9installed on the host, libunistring will be built without
10iconv support and will cause guild-native configure fail.
11
12Upstream-Status: Inappropriate [OE specific]
13
14Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
15---
16 gnulib-m4/iconv.m4 | 11 -----------
17 1 files changed, 0 insertions(+), 11 deletions(-)
18
19diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
20index f46ff14..de0a5e9 100644
21--- a/gnulib-m4/iconv.m4
22+++ b/gnulib-m4/iconv.m4
23@@ -126,17 +126,6 @@ int main ()
24 }
25 }
26 #endif
27- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
28- provided. */
29- if (/* Try standardized names. */
30- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
31- /* Try IRIX, OSF/1 names. */
32- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
33- /* Try AIX names. */
34- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
35- /* Try HP-UX names. */
36- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
37- return 1;
38 return 0;
39 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
40 [case "$host_os" in
41--
421.7.4
diff --git a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
new file mode 100644
index 0000000000..5d831d5491
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
@@ -0,0 +1,81 @@
1Upstream-Status: Pending
2
3automake 1.12 has deprecated use of mkdir_p, and it recommends
4use of MKDIR_P instead. Changed the code to avoid these kind
5of warning-errors.
6
7| make[2]: /build/tmp/work/x86_64-linux/libunistring-native-0.9.3-r2/image/srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/doc/libunistring: Command not found
8| make[2]: *** [install-html-split] Error 127
9
10Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
112012/07/10
12
13Index: libunistring-0.9.3/doc/Makefile.am
14===================================================================
15--- libunistring-0.9.3.orig/doc/Makefile.am
16+++ libunistring-0.9.3/doc/Makefile.am
17@@ -87,7 +87,7 @@ TEXI2DVI = @TEXI2DVI@ $(TEXINCLUDES)
18 # The install-dvi target is already defined by automake.
19
20 installdirs-dvi:
21- $(mkdir_p) $(DESTDIR)$(dvidir)
22+ $(MKDIR_P) $(DESTDIR)$(dvidir)
23
24 uninstall-dvi:
25 $(RM) $(DESTDIR)$(dvidir)/libunistring.dvi
26@@ -105,7 +105,7 @@ libunistring.ps: libunistring.dvi
27 # The install-ps target is already defined by automake.
28
29 installdirs-ps:
30- $(mkdir_p) $(DESTDIR)$(psdir)
31+ $(MKDIR_P) $(DESTDIR)$(psdir)
32
33 uninstall-ps:
34 $(RM) $(DESTDIR)$(psdir)/libunistring.ps
35@@ -120,7 +120,7 @@ TEXI2PDF = @TEXI2DVI@ --pdf $(TEXINCLUDE
36 # The install-pdf target is already defined by automake.
37
38 installdirs-pdf:
39- $(mkdir_p) $(DESTDIR)$(pdfdir)
40+ $(MKDIR_P) $(DESTDIR)$(pdfdir)
41
42 uninstall-pdf:
43 $(RM) $(DESTDIR)$(pdfdir)/libunistring.pdf
44@@ -151,17 +151,17 @@ libunistring_toc.html: libunistring.texi
45 }
46
47 install-html-monolithic: libunistring.html
48- $(mkdir_p) $(DESTDIR)$(htmldir)
49+ $(MKDIR_P) $(DESTDIR)$(htmldir)
50 $(INSTALL_DATA) `if test -f libunistring.html; then echo .; else echo $(srcdir); fi`/libunistring.html $(DESTDIR)$(htmldir)/libunistring.html
51
52 install-html-split: libunistring_toc.html
53- $(mkdir_p) $(DESTDIR)$(htmldir)
54+ $(MKDIR_P) $(DESTDIR)$(htmldir)
55 for file in `if test -f libunistring_toc.html; then echo .; else echo $(srcdir); fi`/libunistring_*.html; do \
56 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
57 done
58
59 installdirs-html:
60- $(mkdir_p) $(DESTDIR)$(htmldir)
61+ $(MKDIR_P) $(DESTDIR)$(htmldir)
62
63 uninstall-html-monolithic:
64 $(RM) $(DESTDIR)$(htmldir)/libunistring.html
65@@ -170,14 +170,14 @@ uninstall-html-split:
66 $(RM) $(DESTDIR)$(htmldir)/libunistring_*.html
67
68 dist-html-monolithic:
69- $(mkdir_p) $(distdir)/
70+ $(MKDIR_P) $(distdir)/
71 file=libunistring.html; \
72 if test -f $$file; then d=.; else d=$(srcdir); fi; \
73 cp -p $$d/$$file $(distdir)/$$file || exit 1
74
75 # We would like to put libunistring_*.html into EXTRA_DIST, but it doesn't work.
76 dist-html-split: libunistring_toc.html
77- $(mkdir_p) $(distdir)/
78+ $(MKDIR_P) $(distdir)/
79 file=libunistring_toc.html; \
80 if test -f $$file; then d=.; else d=$(srcdir); fi; \
81 for file in `cd $$d && echo libunistring_*.html`; do \
diff --git a/meta/recipes-support/libunistring/libunistring/parallelmake.patch b/meta/recipes-support/libunistring/libunistring/parallelmake.patch
new file mode 100644
index 0000000000..21025b8e9d
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring/parallelmake.patch
@@ -0,0 +1,26 @@
1Fix a parallel make race where cdefs.h uses the unused-parameter.h header file
2but has no dependency listed. This can result in an empty cdefs.h file which
3results in a build failure like:
4
5| In file included from striconveh.c:30:0:
6| unistr.h:193:48: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
7| In file included from striconveh.c:30:0:
8| unistr.h:263:54: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
9
10Upstream-Status: Pending
11
12RP 2012/4/12
13
14Index: libunistring-0.9.3/lib/Makefile.am
15===================================================================
16--- libunistring-0.9.3.orig/lib/Makefile.am 2012-04-12 07:45:41.450059820 +0000
17+++ libunistring-0.9.3/lib/Makefile.am 2012-04-12 07:48:45.434055559 +0000
18@@ -157,7 +157,7 @@
19
20 # unistring/cdefs.h is not public, but is included by other header files.
21 nobase_nodist_include_HEADERS += unistring/cdefs.h
22-unistring/cdefs.h : unistring/cdefs.in.h
23+unistring/cdefs.h : unistring/cdefs.in.h $(UNUSED_PARAMETER_H)
24 @MKDIR_P@ unistring
25 rm -f $@-t $@
26 sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.3.bb b/meta/recipes-support/libunistring/libunistring_0.9.3.bb
new file mode 100644
index 0000000000..db1651b2a6
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring_0.9.3.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Library for manipulating C and Unicode strings"
2
3DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
4 consist of very different scripts from Latin letters to Chinese Hanzi\
5 with many kinds of special characters accents, right-to-left writing\
6 marks, hyphens, Roman numbers, and much more. But the POSIX platform\
7 APIs for text do not contain adequate functions for dealing with\
8 particular properties of many Unicode characters. In fact, the POSIX\
9 APIs for text have several assumptions at their base which don't hold\
10 for Unicode text. This library provides functions for manipulating\
11 Unicode strings and for manipulating C strings according to the Unicode\
12 standard. This package contains documentation."
13
14HOMEPAGE = "http://www.gnu.org/software/libunistring/"
15SECTION = "devel"
16LICENSE = "GPLv3&LGPLv3"
17LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
18 file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
19
20SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
21 file://parallelmake.patch \
22 file://libunistring_fix_for_automake_1.12.patch \
23 file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
24"
25
26SRC_URI[md5sum] = "db8eca3b64163abadf8c40e5cecc261f"
27SRC_URI[sha256sum] = "610d3ec724fbdaa654afe3cff20b9f4d504be3fd296fded2e0f7f764041006a3"
28
29PR = "r3"
30
31inherit autotools texinfo
32BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
new file mode 100644
index 0000000000..228ec322d5
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
@@ -0,0 +1,2529 @@
1From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001
2From: Yvan Roux <yvan.roux@linaro.org>
3Date: Sat, 11 May 2013 09:18:23 -0600
4Subject: [PATCH] AArch64 port.
5
6Upstream-Status: Backport
7
8---
9 Makefile.am | 6
10 README | 1
11 configure.ac | 6
12 include/libunwind-aarch64.h | 187 ++++++++++++++++++++++
13 include/libunwind.h.in | 4
14 include/tdep-aarch64/dwarf-config.h | 52 ++++++
15 include/tdep-aarch64/jmpbuf.h | 33 +++
16 include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++
17 include/tdep/dwarf-config.h | 4
18 include/tdep/jmpbuf.h | 2
19 include/tdep/libunwind_i.h.in | 4
20 src/Makefile.am | 39 ++++
21 src/aarch64/Gcreate_addr_space.c | 60 +++++++
22 src/aarch64/Gget_proc_info.c | 39 ++++
23 src/aarch64/Gget_save_loc.c | 100 +++++++++++
24 src/aarch64/Gglobal.c | 57 ++++++
25 src/aarch64/Ginit.c | 187 ++++++++++++++++++++++
26 src/aarch64/Ginit_local.c | 55 ++++++
27 src/aarch64/Ginit_remote.c | 45 +++++
28 src/aarch64/Gis_signal_frame.c | 64 +++++++
29 src/aarch64/Gregs.c | 113 +++++++++++++
30 src/aarch64/Gresume.c | 177 +++++++++++++++++++++
31 src/aarch64/Gstep.c | 129 +++++++++++++++
32 src/aarch64/Lcreate_addr_space.c | 5
33 src/aarch64/Lget_proc_info.c | 5
34 src/aarch64/Lget_save_loc.c | 5
35 src/aarch64/Lglobal.c | 5
36 src/aarch64/Linit.c | 5
37 src/aarch64/Linit_local.c | 5
38 src/aarch64/Linit_remote.c | 5
39 src/aarch64/Lis_signal_frame.c | 5
40 src/aarch64/Lregs.c | 5
41 src/aarch64/Lresume.c | 5
42 src/aarch64/Lstep.c | 5
43 src/aarch64/gen-offsets.c | 68 ++++++++
44 src/aarch64/init.h | 127 +++++++++++++++
45 src/aarch64/is_fpreg.c | 32 +++
46 src/aarch64/offsets.h | 49 +++++
47 src/aarch64/regname.c | 106 ++++++++++++
48 src/aarch64/siglongjmp.S | 12 +
49 src/aarch64/unwind_i.h | 43 +++++
50 src/coredump/_UCD_access_reg_linux.c | 5
51 src/ptrace/_UPT_reg_offset.c | 36 ++++
52 43 files changed, 2184 insertions(+), 7 deletions(-)
53 create mode 100644 include/libunwind-aarch64.h
54 create mode 100644 include/tdep-aarch64/dwarf-config.h
55 create mode 100644 include/tdep-aarch64/jmpbuf.h
56 create mode 100644 include/tdep-aarch64/libunwind_i.h
57 create mode 100644 src/aarch64/Gcreate_addr_space.c
58 create mode 100644 src/aarch64/Gget_proc_info.c
59 create mode 100644 src/aarch64/Gget_save_loc.c
60 create mode 100644 src/aarch64/Gglobal.c
61 create mode 100644 src/aarch64/Ginit.c
62 create mode 100644 src/aarch64/Ginit_local.c
63 create mode 100644 src/aarch64/Ginit_remote.c
64 create mode 100644 src/aarch64/Gis_signal_frame.c
65 create mode 100644 src/aarch64/Gregs.c
66 create mode 100644 src/aarch64/Gresume.c
67 create mode 100644 src/aarch64/Gstep.c
68 create mode 100644 src/aarch64/Lcreate_addr_space.c
69 create mode 100644 src/aarch64/Lget_proc_info.c
70 create mode 100644 src/aarch64/Lget_save_loc.c
71 create mode 100644 src/aarch64/Lglobal.c
72 create mode 100644 src/aarch64/Linit.c
73 create mode 100644 src/aarch64/Linit_local.c
74 create mode 100644 src/aarch64/Linit_remote.c
75 create mode 100644 src/aarch64/Lis_signal_frame.c
76 create mode 100644 src/aarch64/Lregs.c
77 create mode 100644 src/aarch64/Lresume.c
78 create mode 100644 src/aarch64/Lstep.c
79 create mode 100644 src/aarch64/gen-offsets.c
80 create mode 100644 src/aarch64/init.h
81 create mode 100644 src/aarch64/is_fpreg.c
82 create mode 100644 src/aarch64/offsets.h
83 create mode 100644 src/aarch64/regname.c
84 create mode 100644 src/aarch64/siglongjmp.S
85 create mode 100644 src/aarch64/unwind_i.h
86
87--- a/Makefile.am
88+++ b/Makefile.am
89@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna
90 include/libunwind-ptrace.h \
91 include/libunwind-coredump.h
92
93+if ARCH_AARCH64
94+include_HEADERS += include/libunwind-aarch64.h
95+endif
96 if ARCH_ARM
97 include_HEADERS += include/libunwind-arm.h
98 endif
99@@ -41,6 +44,9 @@ SUBDIRS = src tests doc
100 noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
101 include/compiler.h include/libunwind_i.h include/mempool.h \
102 include/remote.h \
103+ include/tdep-aarch64/dwarf-config.h \
104+ include/tdep-aarch64/jmpbuf.h \
105+ include/tdep-aarch64/libunwind_i.h \
106 include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \
107 include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \
108 include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \
109--- a/README
110+++ b/README
111@@ -9,6 +9,7 @@ several architecture/operating-system co
112 Linux/IA-64: Fully tested and supported.
113 Linux/PARISC: Works well, but C library missing unwind-info.
114 HP-UX/IA-64: Mostly works but known to have some serious limitations.
115+ Linux/AArch64: Newly added.
116 Linux/PPC64: Newly added.
117 Linux/SuperH: Newly added.
118 FreeBSD/i386: Newly added.
119--- a/configure.ac
120+++ b/configure.ac
121@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch])
122
123 AC_ARG_ENABLE(coredump,
124 AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
125- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
126+ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
127 )
128
129 AC_MSG_CHECKING([if we should build libunwind-coredump])
130@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os])
131
132 AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
133 AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
134+AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
135 AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
136 AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
137 AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
138@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target
139 AC_MSG_CHECKING([for ELF helper width])
140 case "${target_arch}" in
141 (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
142-(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
143+(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
144 (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
145 *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
146 esac
147@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions]
148 # C++ exception handling doesn't work too well on x86
149 case $target_arch in
150 x86*) enable_cxx_exceptions=no;;
151+ aarch64*) enable_cxx_exceptions=no;;
152 arm*) enable_cxx_exceptions=no;;
153 mips*) enable_cxx_exceptions=no;;
154 *) enable_cxx_exceptions=yes;;
155--- /dev/null
156+++ b/include/libunwind-aarch64.h
157@@ -0,0 +1,187 @@
158+/* libunwind - a platform-independent unwind library
159+ Copyright (C) 2001-2004 Hewlett-Packard Co
160+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
161+ Copyright (C) 2013 Linaro Limited
162+
163+This file is part of libunwind.
164+
165+Permission is hereby granted, free of charge, to any person obtaining
166+a copy of this software and associated documentation files (the
167+"Software"), to deal in the Software without restriction, including
168+without limitation the rights to use, copy, modify, merge, publish,
169+distribute, sublicense, and/or sell copies of the Software, and to
170+permit persons to whom the Software is furnished to do so, subject to
171+the following conditions:
172+
173+The above copyright notice and this permission notice shall be
174+included in all copies or substantial portions of the Software.
175+
176+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
177+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
178+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
179+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
180+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
181+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
182+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
183+
184+#ifndef LIBUNWIND_H
185+#define LIBUNWIND_H
186+
187+#if defined(__cplusplus) || defined(c_plusplus)
188+extern "C" {
189+#endif
190+
191+#include <inttypes.h>
192+#include <stddef.h>
193+#include <ucontext.h>
194+
195+#define UNW_TARGET aarch64
196+#define UNW_TARGET_AARCH64 1
197+
198+#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
199+
200+/* This needs to be big enough to accommodate "struct cursor", while
201+ leaving some slack for future expansion. Changing this value will
202+ require recompiling all users of this library. Stack allocation is
203+ relatively cheap and unwind-state copying is relatively rare, so we
204+ want to err on making it rather too big than too small. */
205+
206+#define UNW_TDEP_CURSOR_LEN 4096
207+
208+typedef uint64_t unw_word_t;
209+typedef int64_t unw_sword_t;
210+
211+typedef long double unw_tdep_fpreg_t;
212+
213+typedef struct
214+ {
215+ /* no aarch64-specific auxiliary proc-info */
216+ }
217+unw_tdep_proc_info_t;
218+
219+typedef enum
220+ {
221+ /* 64-bit general registers. */
222+ UNW_AARCH64_X0,
223+ UNW_AARCH64_X1,
224+ UNW_AARCH64_X2,
225+ UNW_AARCH64_X3,
226+ UNW_AARCH64_X4,
227+ UNW_AARCH64_X5,
228+ UNW_AARCH64_X6,
229+ UNW_AARCH64_X7,
230+ UNW_AARCH64_X8,
231+
232+ /* Temporary registers. */
233+ UNW_AARCH64_X9,
234+ UNW_AARCH64_X10,
235+ UNW_AARCH64_X11,
236+ UNW_AARCH64_X12,
237+ UNW_AARCH64_X13,
238+ UNW_AARCH64_X14,
239+ UNW_AARCH64_X15,
240+
241+ /* Intra-procedure-call temporary registers. */
242+ UNW_AARCH64_X16,
243+ UNW_AARCH64_X17,
244+
245+ /* Callee-saved registers. */
246+ UNW_AARCH64_X18,
247+ UNW_AARCH64_X19,
248+ UNW_AARCH64_X20,
249+ UNW_AARCH64_X21,
250+ UNW_AARCH64_X22,
251+ UNW_AARCH64_X23,
252+ UNW_AARCH64_X24,
253+ UNW_AARCH64_X25,
254+ UNW_AARCH64_X26,
255+ UNW_AARCH64_X27,
256+ UNW_AARCH64_X28,
257+
258+ /* 64-bit frame pointer. */
259+ UNW_AARCH64_X29,
260+
261+ /* 64-bit link register. */
262+ UNW_AARCH64_X30,
263+
264+ /* 64-bit stack pointer. */
265+ UNW_AARCH64_SP = 31,
266+ UNW_AARCH64_PC,
267+ UNW_AARCH64_PSTATE,
268+
269+ /* 128-bit FP/Advanced SIMD registers. */
270+ UNW_AARCH64_V0 = 64,
271+ UNW_AARCH64_V1,
272+ UNW_AARCH64_V2,
273+ UNW_AARCH64_V3,
274+ UNW_AARCH64_V4,
275+ UNW_AARCH64_V5,
276+ UNW_AARCH64_V6,
277+ UNW_AARCH64_V7,
278+ UNW_AARCH64_V8,
279+ UNW_AARCH64_V9,
280+ UNW_AARCH64_V10,
281+ UNW_AARCH64_V11,
282+ UNW_AARCH64_V12,
283+ UNW_AARCH64_V13,
284+ UNW_AARCH64_V14,
285+ UNW_AARCH64_V15,
286+ UNW_AARCH64_V16,
287+ UNW_AARCH64_V17,
288+ UNW_AARCH64_V18,
289+ UNW_AARCH64_V19,
290+ UNW_AARCH64_V20,
291+ UNW_AARCH64_V21,
292+ UNW_AARCH64_V22,
293+ UNW_AARCH64_V23,
294+ UNW_AARCH64_V24,
295+ UNW_AARCH64_V25,
296+ UNW_AARCH64_V26,
297+ UNW_AARCH64_V27,
298+ UNW_AARCH64_V28,
299+ UNW_AARCH64_V29,
300+ UNW_AARCH64_V30,
301+ UNW_AARCH64_V31,
302+
303+ UNW_AARCH64_FPSR,
304+ UNW_AARCH64_FPCR,
305+
306+ /* For AArch64, the CFA is the value of SP (x31) at the call site of the
307+ previous frame. */
308+ UNW_AARCH64_CFA = UNW_AARCH64_SP,
309+
310+ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
311+
312+ UNW_TDEP_IP = UNW_AARCH64_X30,
313+ UNW_TDEP_SP = UNW_AARCH64_SP,
314+ UNW_TDEP_EH = UNW_AARCH64_X0,
315+
316+ }
317+aarch64_regnum_t;
318+
319+/* Use R0 through R3 to pass exception handling information. */
320+#define UNW_TDEP_NUM_EH_REGS 4
321+
322+typedef struct unw_tdep_save_loc
323+ {
324+ /* Additional target-dependent info on a save location. */
325+ }
326+unw_tdep_save_loc_t;
327+
328+
329+/* On AArch64, we can directly use ucontext_t as the unwind context. */
330+typedef ucontext_t unw_tdep_context_t;
331+
332+#include "libunwind-common.h"
333+#include "libunwind-dynamic.h"
334+
335+#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
336+#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
337+
338+extern int unw_tdep_is_fpreg (int);
339+
340+#if defined(__cplusplus) || defined(c_plusplus)
341+}
342+#endif
343+
344+#endif /* LIBUNWIND_H */
345--- a/include/libunwind.h.in
346+++ b/include/libunwind.h.in
347@@ -3,7 +3,9 @@
348
349 #ifndef UNW_REMOTE_ONLY
350
351-#if defined __arm__
352+#if defined __aarch64__
353+#include "libunwind-aarch64.h"
354+#elif defined __arm__
355 # include "libunwind-arm.h"
356 #elif defined __hppa__
357 # include "libunwind-hppa.h"
358--- /dev/null
359+++ b/include/tdep-aarch64/dwarf-config.h
360@@ -0,0 +1,52 @@
361+/* libunwind - a platform-independent unwind library
362+ Copyright (C) 2008 CodeSourcery
363+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
364+ Copyright (C) 2013 Linaro Limited
365+
366+This file is part of libunwind.
367+
368+Permission is hereby granted, free of charge, to any person obtaining
369+a copy of this software and associated documentation files (the
370+"Software"), to deal in the Software without restriction, including
371+without limitation the rights to use, copy, modify, merge, publish,
372+distribute, sublicense, and/or sell copies of the Software, and to
373+permit persons to whom the Software is furnished to do so, subject to
374+the following conditions:
375+
376+The above copyright notice and this permission notice shall be
377+included in all copies or substantial portions of the Software.
378+
379+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
380+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
381+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
382+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
383+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
384+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
385+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
386+
387+#ifndef dwarf_config_h
388+#define dwarf_config_h
389+
390+/* This matches the value udes by GCC (see
391+ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */
392+#define DWARF_NUM_PRESERVED_REGS 97
393+
394+/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
395+#define dwarf_is_big_endian(addr_space) 0
396+
397+#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0)
398+
399+/* Convert a pointer to a dwarf_cursor structure to a pointer to
400+ unw_cursor_t. */
401+#define dwarf_to_cursor(c) ((unw_cursor_t *) (c))
402+
403+typedef struct dwarf_loc
404+ {
405+ unw_word_t val;
406+#ifndef UNW_LOCAL_ONLY
407+ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */
408+#endif
409+ }
410+dwarf_loc_t;
411+
412+#endif /* dwarf_config_h */
413--- /dev/null
414+++ b/include/tdep-aarch64/jmpbuf.h
415@@ -0,0 +1,33 @@
416+/* libunwind - a platform-independent unwind library
417+ Copyright (C) 2008 CodeSourcery
418+ Copyright (C) 2013 Linaro Limited
419+
420+This file is part of libunwind.
421+
422+Permission is hereby granted, free of charge, to any person obtaining
423+a copy of this software and associated documentation files (the
424+"Software"), to deal in the Software without restriction, including
425+without limitation the rights to use, copy, modify, merge, publish,
426+distribute, sublicense, and/or sell copies of the Software, and to
427+permit persons to whom the Software is furnished to do so, subject to
428+the following conditions:
429+
430+The above copyright notice and this permission notice shall be
431+included in all copies or substantial portions of the Software.
432+
433+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
434+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
435+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
436+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
437+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
438+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
439+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
440+
441+/* Use glibc's jump-buffer indices; NPTL peeks at SP: */
442+
443+/* FIXME for AArch64 */
444+
445+#define JB_SP 13
446+#define JB_RP 14
447+#define JB_MASK_SAVED 15
448+#define JB_MASK 16
449--- /dev/null
450+++ b/include/tdep-aarch64/libunwind_i.h
451@@ -0,0 +1,294 @@
452+/* libunwind - a platform-independent unwind library
453+ Copyright (C) 2001-2005 Hewlett-Packard Co
454+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
455+ Copyright (C) 2013 Linaro Limited
456+
457+This file is part of libunwind.
458+
459+Permission is hereby granted, free of charge, to any person obtaining
460+a copy of this software and associated documentation files (the
461+"Software"), to deal in the Software without restriction, including
462+without limitation the rights to use, copy, modify, merge, publish,
463+distribute, sublicense, and/or sell copies of the Software, and to
464+permit persons to whom the Software is furnished to do so, subject to
465+the following conditions:
466+
467+The above copyright notice and this permission notice shall be
468+included in all copies or substantial portions of the Software.
469+
470+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
471+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
472+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
473+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
474+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
475+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
476+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
477+
478+#ifndef AARCH64_LIBUNWIND_I_H
479+#define AARCH64_LIBUNWIND_I_H
480+
481+/* Target-dependent definitions that are internal to libunwind but need
482+ to be shared with target-independent code. */
483+
484+#include <stdlib.h>
485+#include <libunwind.h>
486+
487+#include "elf64.h"
488+#include "mempool.h"
489+#include "dwarf.h"
490+
491+typedef struct
492+ {
493+ /* no aarch64-specific fast trace */
494+ }
495+unw_tdep_frame_t;
496+
497+#ifdef UNW_LOCAL_ONLY
498+
499+typedef unw_word_t aarch64_loc_t;
500+
501+#else /* !UNW_LOCAL_ONLY */
502+
503+typedef struct aarch64_loc
504+ {
505+ unw_word_t w0, w1;
506+ }
507+aarch64_loc_t;
508+
509+#endif /* !UNW_LOCAL_ONLY */
510+
511+struct unw_addr_space
512+ {
513+ struct unw_accessors acc;
514+ int big_endian;
515+ unw_caching_policy_t caching_policy;
516+#ifdef HAVE_ATOMIC_OPS_H
517+ AO_t cache_generation;
518+#else
519+ uint32_t cache_generation;
520+#endif
521+ unw_word_t dyn_generation; /* see dyn-common.h */
522+ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */
523+ struct dwarf_rs_cache global_cache;
524+ struct unw_debug_frame_list *debug_frames;
525+ };
526+
527+struct cursor
528+ {
529+ struct dwarf_cursor dwarf; /* must be first */
530+ enum
531+ {
532+ AARCH64_SCF_NONE,
533+ AARCH64_SCF_LINUX_RT_SIGFRAME,
534+ }
535+ sigcontext_format;
536+ unw_word_t sigcontext_addr;
537+ unw_word_t sigcontext_sp;
538+ unw_word_t sigcontext_pc;
539+ };
540+
541+#define DWARF_GET_LOC(l) ((l).val)
542+
543+#ifdef UNW_LOCAL_ONLY
544+# define DWARF_NULL_LOC DWARF_LOC (0, 0)
545+# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0)
546+# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) })
547+# define DWARF_IS_REG_LOC(l) 0
548+# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \
549+ tdep_uc_addr((c)->as_arg, (r)), 0))
550+# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
551+# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \
552+ tdep_uc_addr((c)->as_arg, (r)), 0))
553+
554+static inline int
555+dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
556+{
557+ if (!DWARF_GET_LOC (loc))
558+ return -1;
559+ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc);
560+ return 0;
561+}
562+
563+static inline int
564+dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
565+{
566+ if (!DWARF_GET_LOC (loc))
567+ return -1;
568+ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val;
569+ return 0;
570+}
571+
572+static inline int
573+dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
574+{
575+ if (!DWARF_GET_LOC (loc))
576+ return -1;
577+ *val = *(unw_word_t *) DWARF_GET_LOC (loc);
578+ return 0;
579+}
580+
581+static inline int
582+dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
583+{
584+ if (!DWARF_GET_LOC (loc))
585+ return -1;
586+ *(unw_word_t *) DWARF_GET_LOC (loc) = val;
587+ return 0;
588+}
589+
590+#else /* !UNW_LOCAL_ONLY */
591+# define DWARF_LOC_TYPE_FP (1 << 0)
592+# define DWARF_LOC_TYPE_REG (1 << 1)
593+# define DWARF_NULL_LOC DWARF_LOC (0, 0)
594+# define DWARF_IS_NULL_LOC(l) \
595+ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
596+# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
597+# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0)
598+# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0)
599+# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG)
600+# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
601+# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \
602+ | DWARF_LOC_TYPE_FP))
603+
604+static inline int
605+dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
606+{
607+ char *valp = (char *) &val;
608+ unw_word_t addr;
609+ int ret;
610+
611+ if (DWARF_IS_NULL_LOC (loc))
612+ return -UNW_EBADREG;
613+
614+ if (DWARF_IS_REG_LOC (loc))
615+ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
616+ val, 0, c->as_arg);
617+
618+ addr = DWARF_GET_LOC (loc);
619+ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
620+ 0, c->as_arg)) < 0)
621+ return ret;
622+
623+ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0,
624+ c->as_arg);
625+}
626+
627+static inline int
628+dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
629+{
630+ char *valp = (char *) &val;
631+ unw_word_t addr;
632+ int ret;
633+
634+ if (DWARF_IS_NULL_LOC (loc))
635+ return -UNW_EBADREG;
636+
637+ if (DWARF_IS_REG_LOC (loc))
638+ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
639+ &val, 1, c->as_arg);
640+
641+ addr = DWARF_GET_LOC (loc);
642+ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
643+ 1, c->as_arg)) < 0)
644+ return ret;
645+
646+ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1,
647+ 1, c->as_arg);
648+}
649+
650+static inline int
651+dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
652+{
653+ if (DWARF_IS_NULL_LOC (loc))
654+ return -UNW_EBADREG;
655+
656+ /* If a code-generator were to save a value of type unw_word_t in a
657+ floating-point register, we would have to support this case. I
658+ suppose it could happen with MMX registers, but does it really
659+ happen? */
660+ assert (!DWARF_IS_FP_LOC (loc));
661+
662+ if (DWARF_IS_REG_LOC (loc))
663+ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val,
664+ 0, c->as_arg);
665+ else
666+ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
667+ 0, c->as_arg);
668+}
669+
670+static inline int
671+dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
672+{
673+ if (DWARF_IS_NULL_LOC (loc))
674+ return -UNW_EBADREG;
675+
676+ /* If a code-generator were to save a value of type unw_word_t in a
677+ floating-point register, we would have to support this case. I
678+ suppose it could happen with MMX registers, but does it really
679+ happen? */
680+ assert (!DWARF_IS_FP_LOC (loc));
681+
682+ if (DWARF_IS_REG_LOC (loc))
683+ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val,
684+ 1, c->as_arg);
685+ else
686+ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
687+ 1, c->as_arg);
688+}
689+
690+#endif /* !UNW_LOCAL_ONLY */
691+
692+
693+
694+#define tdep_getcontext_trace unw_getcontext
695+#define tdep_init_done UNW_OBJ(init_done)
696+#define tdep_init UNW_OBJ(init)
697+/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
698+ tdep_search_unwind_table. */
699+#define tdep_search_unwind_table dwarf_search_unwind_table
700+#define tdep_find_unwind_table dwarf_find_unwind_table
701+#define tdep_uc_addr UNW_OBJ(uc_addr)
702+#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
703+#define tdep_access_reg UNW_OBJ(access_reg)
704+#define tdep_access_fpreg UNW_OBJ(access_fpreg)
705+#define tdep_fetch_frame(c,ip,n) do {} while(0)
706+#define tdep_cache_frame(c,rs) do {} while(0)
707+#define tdep_reuse_frame(c,rs) do {} while(0)
708+#define tdep_stash_frame(c,rs) do {} while(0)
709+#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
710+
711+#ifdef UNW_LOCAL_ONLY
712+# define tdep_find_proc_info(c,ip,n) \
713+ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \
714+ (c)->as_arg)
715+# define tdep_put_unwind_info(as,pi,arg) \
716+ dwarf_put_unwind_info((as), (pi), (arg))
717+#else
718+# define tdep_find_proc_info(c,ip,n) \
719+ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \
720+ (c)->as_arg)
721+# define tdep_put_unwind_info(as,pi,arg) \
722+ (*(as)->acc.put_unwind_info)((as), (pi), (arg))
723+#endif
724+
725+#define tdep_get_as(c) ((c)->dwarf.as)
726+#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
727+#define tdep_get_ip(c) ((c)->dwarf.ip)
728+#define tdep_big_endian(as) ((as)->big_endian)
729+
730+extern int tdep_init_done;
731+
732+extern void tdep_init (void);
733+extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
734+ unw_dyn_info_t *di, unw_proc_info_t *pi,
735+ int need_unwind_info, void *arg);
736+extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg);
737+extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
738+ unsigned long *segbase, unsigned long *mapoff,
739+ char *path, size_t pathlen);
740+extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
741+ unw_word_t *valp, int write);
742+extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
743+ unw_fpreg_t *valp, int write);
744+
745+#endif /* AARCH64_LIBUNWIND_I_H */
746--- a/include/tdep/dwarf-config.h
747+++ b/include/tdep/dwarf-config.h
748@@ -1,7 +1,9 @@
749 /* Provide a real file - not a symlink - as it would cause multiarch conflicts
750 when multiple different arch releases are installed simultaneously. */
751
752-#if defined __arm__
753+#if defined __aarch64__
754+# include "tdep-aarch64/dwarf-config.h"
755+#elif defined __arm__
756 # include "tdep-arm/dwarf-config.h"
757 #elif defined __hppa__
758 # include "tdep-hppa/dwarf-config.h"
759--- a/include/tdep/jmpbuf.h
760+++ b/include/tdep/jmpbuf.h
761@@ -3,6 +3,8 @@
762
763 #ifndef UNW_REMOTE_ONLY
764
765+#if defined __aarch64__
766+# include "tdep-aarch64/jmpbuf.h"
767 #if defined __arm__
768 # include "tdep-arm/jmpbuf.h"
769 #elif defined __hppa__
770--- a/include/tdep/libunwind_i.h.in
771+++ b/include/tdep/libunwind_i.h.in
772@@ -3,7 +3,9 @@
773
774 #ifndef UNW_REMOTE_ONLY
775
776-#if defined __arm__
777+#if defined __aarch64__
778+# include "tdep-aarch64/libunwind_i.h"
779+#elif defined __arm__
780 # include "tdep-arm/libunwind_i.h"
781 #elif defined __hppa__
782 # include "tdep-hppa/libunwind_i.h"
783--- a/src/Makefile.am
784+++ b/src/Makefile.am
785@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c
786 noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
787 libunwind_la_LIBADD += $(LIBUNWIND_ELF)
788
789+# The list of files that go into libunwind and libunwind-aarch64:
790+noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h
791+libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \
792+ aarch64/is_fpreg.c aarch64/regname.c
793+
794+# The list of files that go into libunwind:
795+libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
796+ $(libunwind_la_SOURCES_local) \
797+ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \
798+ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \
799+ aarch64/Linit_local.c aarch64/Linit_remote.c \
800+ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \
801+ aarch64/Lstep.c
802+
803+libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
804+ $(libunwind_la_SOURCES_generic) \
805+ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \
806+ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \
807+ aarch64/Ginit_local.c aarch64/Ginit_remote.c \
808+ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \
809+ aarch64/Gstep.c
810+
811 # The list of files that go into libunwind and libunwind-arm:
812 noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
813 libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
814@@ -418,6 +440,18 @@ if OS_FREEBSD
815 libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
816 endif
817
818+if ARCH_AARCH64
819+ lib_LTLIBRARIES += libunwind-aarch64.la
820+ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
821+ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64)
822+ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
823+ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la
824+ libunwind_aarch64_la_LIBADD += libunwind-elf64.la
825+if !REMOTE_ONLY
826+ libunwind_aarch64_la_LIBADD += libunwind.la -lc
827+endif
828+ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S
829+else
830 if ARCH_ARM
831 lib_LTLIBRARIES += libunwind-arm.la
832 libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
833@@ -545,6 +579,7 @@ endif # ARCH_MIPS
834 endif # ARCH_HPPA
835 endif # ARCH_IA64
836 endif # ARCH_ARM
837+endif # ARCH_AARCH64
838
839 # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
840 # at the end.
841@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I
842 AM_CCASFLAGS = $(AM_CPPFLAGS)
843 noinst_HEADERS += unwind/unwind-internal.h
844
845-EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
846+EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \
847+ $(libunwind_la_SOURCES_arm) \
848 $(libunwind_la_SOURCES_hppa) \
849 $(libunwind_la_SOURCES_ia64) \
850 $(libunwind_la_SOURCES_mips) \
851@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm)
852 $(libunwind_la_SOURCES_common) \
853 $(libunwind_la_SOURCES_local) \
854 $(libunwind_la_SOURCES_generic) \
855+ $(libunwind_aarch64_la_SOURCES_aarch64) \
856 $(libunwind_arm_la_SOURCES_arm) \
857 $(libunwind_hppa_la_SOURCES_hppa) \
858 $(libunwind_ia64_la_SOURCES_ia64) \
859--- /dev/null
860+++ b/src/aarch64/Gcreate_addr_space.c
861@@ -0,0 +1,60 @@
862+/* libunwind - a platform-independent unwind library
863+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
864+ Copyright (C) 2013 Linaro Limited
865+
866+This file is part of libunwind.
867+
868+Permission is hereby granted, free of charge, to any person obtaining
869+a copy of this software and associated documentation files (the
870+"Software"), to deal in the Software without restriction, including
871+without limitation the rights to use, copy, modify, merge, publish,
872+distribute, sublicense, and/or sell copies of the Software, and to
873+permit persons to whom the Software is furnished to do so, subject to
874+the following conditions:
875+
876+The above copyright notice and this permission notice shall be
877+included in all copies or substantial portions of the Software.
878+
879+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
880+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
881+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
882+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
883+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
884+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
885+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
886+
887+#include <string.h>
888+#include <stdlib.h>
889+
890+#include "unwind_i.h"
891+
892+PROTECTED unw_addr_space_t
893+unw_create_addr_space (unw_accessors_t *a, int byte_order)
894+{
895+#ifdef UNW_LOCAL_ONLY
896+ return NULL;
897+#else
898+ unw_addr_space_t as;
899+
900+ /* AArch64 supports little-endian and big-endian. */
901+ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN
902+ && byte_order != __BIG_ENDIAN)
903+ return NULL;
904+
905+ as = malloc (sizeof (*as));
906+ if (!as)
907+ return NULL;
908+
909+ memset (as, 0, sizeof (*as));
910+
911+ as->acc = *a;
912+
913+ /* Default to little-endian for AArch64. */
914+ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN)
915+ as->big_endian = 0;
916+ else
917+ as->big_endian = 1;
918+
919+ return as;
920+#endif
921+}
922--- /dev/null
923+++ b/src/aarch64/Gget_proc_info.c
924@@ -0,0 +1,39 @@
925+/* libunwind - a platform-independent unwind library
926+ Copyright (C) 2008 CodeSourcery
927+
928+This file is part of libunwind.
929+
930+Permission is hereby granted, free of charge, to any person obtaining
931+a copy of this software and associated documentation files (the
932+"Software"), to deal in the Software without restriction, including
933+without limitation the rights to use, copy, modify, merge, publish,
934+distribute, sublicense, and/or sell copies of the Software, and to
935+permit persons to whom the Software is furnished to do so, subject to
936+the following conditions:
937+
938+The above copyright notice and this permission notice shall be
939+included in all copies or substantial portions of the Software.
940+
941+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
942+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
943+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
944+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
945+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
946+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
947+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
948+
949+#include "unwind_i.h"
950+
951+PROTECTED int
952+unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
953+{
954+ struct cursor *c = (struct cursor *) cursor;
955+ int ret;
956+
957+ ret = dwarf_make_proc_info (&c->dwarf);
958+ if (ret < 0)
959+ return ret;
960+
961+ *pi = c->dwarf.pi;
962+ return 0;
963+}
964--- /dev/null
965+++ b/src/aarch64/Gget_save_loc.c
966@@ -0,0 +1,100 @@
967+/* libunwind - a platform-independent unwind library
968+ Copyright (C) 2008 CodeSourcery
969+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
970+ Copyright (C) 2013 Linaro Limited
971+
972+This file is part of libunwind.
973+
974+Permission is hereby granted, free of charge, to any person obtaining
975+a copy of this software and associated documentation files (the
976+"Software"), to deal in the Software without restriction, including
977+without limitation the rights to use, copy, modify, merge, publish,
978+distribute, sublicense, and/or sell copies of the Software, and to
979+permit persons to whom the Software is furnished to do so, subject to
980+the following conditions:
981+
982+The above copyright notice and this permission notice shall be
983+included in all copies or substantial portions of the Software.
984+
985+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
986+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
987+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
988+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
989+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
990+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
991+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
992+
993+#include "unwind_i.h"
994+
995+PROTECTED int
996+unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
997+{
998+ struct cursor *c = (struct cursor *) cursor;
999+ dwarf_loc_t loc;
1000+
1001+ switch (reg)
1002+ {
1003+ case UNW_AARCH64_X0:
1004+ case UNW_AARCH64_X1:
1005+ case UNW_AARCH64_X2:
1006+ case UNW_AARCH64_X3:
1007+ case UNW_AARCH64_X4:
1008+ case UNW_AARCH64_X5:
1009+ case UNW_AARCH64_X6:
1010+ case UNW_AARCH64_X7:
1011+ case UNW_AARCH64_X8:
1012+ case UNW_AARCH64_X9:
1013+ case UNW_AARCH64_X10:
1014+ case UNW_AARCH64_X11:
1015+ case UNW_AARCH64_X12:
1016+ case UNW_AARCH64_X13:
1017+ case UNW_AARCH64_X14:
1018+ case UNW_AARCH64_X15:
1019+ case UNW_AARCH64_X16:
1020+ case UNW_AARCH64_X17:
1021+ case UNW_AARCH64_X18:
1022+ case UNW_AARCH64_X19:
1023+ case UNW_AARCH64_X20:
1024+ case UNW_AARCH64_X21:
1025+ case UNW_AARCH64_X22:
1026+ case UNW_AARCH64_X23:
1027+ case UNW_AARCH64_X24:
1028+ case UNW_AARCH64_X25:
1029+ case UNW_AARCH64_X26:
1030+ case UNW_AARCH64_X27:
1031+ case UNW_AARCH64_X28:
1032+ case UNW_AARCH64_X29:
1033+ case UNW_AARCH64_X30:
1034+ case UNW_AARCH64_SP:
1035+ case UNW_AARCH64_PC:
1036+ case UNW_AARCH64_PSTATE:
1037+ loc = c->dwarf.loc[reg];
1038+ break;
1039+
1040+ default:
1041+ loc = DWARF_NULL_LOC; /* default to "not saved" */
1042+ break;
1043+ }
1044+
1045+ memset (sloc, 0, sizeof (*sloc));
1046+
1047+ if (DWARF_IS_NULL_LOC (loc))
1048+ {
1049+ sloc->type = UNW_SLT_NONE;
1050+ return 0;
1051+ }
1052+
1053+#if !defined(UNW_LOCAL_ONLY)
1054+ if (DWARF_IS_REG_LOC (loc))
1055+ {
1056+ sloc->type = UNW_SLT_REG;
1057+ sloc->u.regnum = DWARF_GET_LOC (loc);
1058+ }
1059+ else
1060+#endif
1061+ {
1062+ sloc->type = UNW_SLT_MEMORY;
1063+ sloc->u.addr = DWARF_GET_LOC (loc);
1064+ }
1065+ return 0;
1066+}
1067--- /dev/null
1068+++ b/src/aarch64/Gglobal.c
1069@@ -0,0 +1,57 @@
1070+/* libunwind - a platform-independent unwind library
1071+ Copyright (C) 2008 CodeSourcery
1072+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1073+ Copyright (C) 2013 Linaro Limited
1074+
1075+This file is part of libunwind.
1076+
1077+Permission is hereby granted, free of charge, to any person obtaining
1078+a copy of this software and associated documentation files (the
1079+"Software"), to deal in the Software without restriction, including
1080+without limitation the rights to use, copy, modify, merge, publish,
1081+distribute, sublicense, and/or sell copies of the Software, and to
1082+permit persons to whom the Software is furnished to do so, subject to
1083+the following conditions:
1084+
1085+The above copyright notice and this permission notice shall be
1086+included in all copies or substantial portions of the Software.
1087+
1088+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1089+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1090+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1091+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1092+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1093+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1094+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1095+
1096+#include "unwind_i.h"
1097+#include "dwarf_i.h"
1098+
1099+HIDDEN define_lock (aarch64_lock);
1100+HIDDEN int tdep_init_done;
1101+
1102+HIDDEN void
1103+tdep_init (void)
1104+{
1105+ intrmask_t saved_mask;
1106+
1107+ sigfillset (&unwi_full_mask);
1108+
1109+ lock_acquire (&aarch64_lock, saved_mask);
1110+ {
1111+ if (tdep_init_done)
1112+ /* another thread else beat us to it... */
1113+ goto out;
1114+
1115+ mi_init ();
1116+
1117+ dwarf_init ();
1118+
1119+#ifndef UNW_REMOTE_ONLY
1120+ aarch64_local_addr_space_init ();
1121+#endif
1122+ tdep_init_done = 1; /* signal that we're initialized... */
1123+ }
1124+ out:
1125+ lock_release (&aarch64_lock, saved_mask);
1126+}
1127--- /dev/null
1128+++ b/src/aarch64/Ginit.c
1129@@ -0,0 +1,187 @@
1130+/* libunwind - a platform-independent unwind library
1131+ Copyright (C) 2008 CodeSourcery
1132+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1133+ Copyright (C) 2013 Linaro Limited
1134+
1135+This file is part of libunwind.
1136+
1137+Permission is hereby granted, free of charge, to any person obtaining
1138+a copy of this software and associated documentation files (the
1139+"Software"), to deal in the Software without restriction, including
1140+without limitation the rights to use, copy, modify, merge, publish,
1141+distribute, sublicense, and/or sell copies of the Software, and to
1142+permit persons to whom the Software is furnished to do so, subject to
1143+the following conditions:
1144+
1145+The above copyright notice and this permission notice shall be
1146+included in all copies or substantial portions of the Software.
1147+
1148+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1149+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1150+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1151+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1152+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1153+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1154+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1155+
1156+#include <stdlib.h>
1157+#include <string.h>
1158+
1159+#include "unwind_i.h"
1160+
1161+#ifdef UNW_REMOTE_ONLY
1162+
1163+/* unw_local_addr_space is a NULL pointer in this case. */
1164+PROTECTED unw_addr_space_t unw_local_addr_space;
1165+
1166+#else /* !UNW_REMOTE_ONLY */
1167+
1168+static struct unw_addr_space local_addr_space;
1169+
1170+PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space;
1171+
1172+static inline void *
1173+uc_addr (ucontext_t *uc, int reg)
1174+{
1175+ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
1176+ return &uc->uc_mcontext.regs[reg];
1177+ else
1178+ return NULL;
1179+}
1180+
1181+# ifdef UNW_LOCAL_ONLY
1182+
1183+HIDDEN void *
1184+tdep_uc_addr (ucontext_t *uc, int reg)
1185+{
1186+ return uc_addr (uc, reg);
1187+}
1188+
1189+# endif /* UNW_LOCAL_ONLY */
1190+
1191+HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
1192+
1193+/* XXX fix me: there is currently no way to locate the dyn-info list
1194+ by a remote unwinder. On ia64, this is done via a special
1195+ unwind-table entry. Perhaps something similar can be done with
1196+ DWARF2 unwind info. */
1197+
1198+static void
1199+put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
1200+{
1201+ /* it's a no-op */
1202+}
1203+
1204+static int
1205+get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
1206+ void *arg)
1207+{
1208+ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
1209+ return 0;
1210+}
1211+
1212+static int
1213+access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
1214+ void *arg)
1215+{
1216+ if (write)
1217+ {
1218+ Debug (16, "mem[%lx] <- %lx\n", addr, *val);
1219+ *(unw_word_t *) addr = *val;
1220+ }
1221+ else
1222+ {
1223+ *val = *(unw_word_t *) addr;
1224+ Debug (16, "mem[%lx] -> %lx\n", addr, *val);
1225+ }
1226+ return 0;
1227+}
1228+
1229+static int
1230+access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
1231+ void *arg)
1232+{
1233+ unw_word_t *addr;
1234+ ucontext_t *uc = arg;
1235+
1236+ if (unw_is_fpreg (reg))
1237+ goto badreg;
1238+
1239+ if (!(addr = uc_addr (uc, reg)))
1240+ goto badreg;
1241+
1242+ if (write)
1243+ {
1244+ *(unw_word_t *) addr = *val;
1245+ Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
1246+ }
1247+ else
1248+ {
1249+ *val = *(unw_word_t *) addr;
1250+ Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
1251+ }
1252+ return 0;
1253+
1254+ badreg:
1255+ Debug (1, "bad register number %u\n", reg);
1256+ return -UNW_EBADREG;
1257+}
1258+
1259+static int
1260+access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
1261+ int write, void *arg)
1262+{
1263+ ucontext_t *uc = arg;
1264+ unw_fpreg_t *addr;
1265+
1266+ if (!unw_is_fpreg (reg))
1267+ goto badreg;
1268+
1269+ if (!(addr = uc_addr (uc, reg)))
1270+ goto badreg;
1271+
1272+ if (write)
1273+ {
1274+ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
1275+ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
1276+ *(unw_fpreg_t *) addr = *val;
1277+ }
1278+ else
1279+ {
1280+ *val = *(unw_fpreg_t *) addr;
1281+ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
1282+ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
1283+ }
1284+ return 0;
1285+
1286+ badreg:
1287+ Debug (1, "bad register number %u\n", reg);
1288+ /* attempt to access a non-preserved register */
1289+ return -UNW_EBADREG;
1290+}
1291+
1292+static int
1293+get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
1294+ char *buf, size_t buf_len, unw_word_t *offp,
1295+ void *arg)
1296+{
1297+ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
1298+}
1299+
1300+HIDDEN void
1301+aarch64_local_addr_space_init (void)
1302+{
1303+ memset (&local_addr_space, 0, sizeof (local_addr_space));
1304+ local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
1305+ local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
1306+ local_addr_space.acc.put_unwind_info = put_unwind_info;
1307+ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
1308+ local_addr_space.acc.access_mem = access_mem;
1309+ local_addr_space.acc.access_reg = access_reg;
1310+ local_addr_space.acc.access_fpreg = access_fpreg;
1311+ local_addr_space.acc.resume = aarch64_local_resume;
1312+ local_addr_space.acc.get_proc_name = get_static_proc_name;
1313+ unw_flush_cache (&local_addr_space, 0, 0);
1314+}
1315+
1316+#endif /* !UNW_REMOTE_ONLY */
1317--- /dev/null
1318+++ b/src/aarch64/Ginit_local.c
1319@@ -0,0 +1,55 @@
1320+/* libunwind - a platform-independent unwind library
1321+ Copyright (C) 2008 CodeSourcery
1322+ Copyright (C) 2011-2013 Linaro Limited
1323+
1324+This file is part of libunwind.
1325+
1326+Permission is hereby granted, free of charge, to any person obtaining
1327+a copy of this software and associated documentation files (the
1328+"Software"), to deal in the Software without restriction, including
1329+without limitation the rights to use, copy, modify, merge, publish,
1330+distribute, sublicense, and/or sell copies of the Software, and to
1331+permit persons to whom the Software is furnished to do so, subject to
1332+the following conditions:
1333+
1334+The above copyright notice and this permission notice shall be
1335+included in all copies or substantial portions of the Software.
1336+
1337+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1338+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1339+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1340+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1341+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1342+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1343+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1344+
1345+#include "unwind_i.h"
1346+#include "init.h"
1347+
1348+#ifdef UNW_REMOTE_ONLY
1349+
1350+PROTECTED int
1351+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
1352+{
1353+ return -UNW_EINVAL;
1354+}
1355+
1356+#else /* !UNW_REMOTE_ONLY */
1357+
1358+PROTECTED int
1359+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
1360+{
1361+ struct cursor *c = (struct cursor *) cursor;
1362+
1363+ if (!tdep_init_done)
1364+ tdep_init ();
1365+
1366+ Debug (1, "(cursor=%p)\n", c);
1367+
1368+ c->dwarf.as = unw_local_addr_space;
1369+ c->dwarf.as_arg = uc;
1370+
1371+ return common_init (c, 1);
1372+}
1373+
1374+#endif /* !UNW_REMOTE_ONLY */
1375--- /dev/null
1376+++ b/src/aarch64/Ginit_remote.c
1377@@ -0,0 +1,45 @@
1378+/* libunwind - a platform-independent unwind library
1379+ Copyright (C) 2008 CodeSourcery
1380+
1381+This file is part of libunwind.
1382+
1383+Permission is hereby granted, free of charge, to any person obtaining
1384+a copy of this software and associated documentation files (the
1385+"Software"), to deal in the Software without restriction, including
1386+without limitation the rights to use, copy, modify, merge, publish,
1387+distribute, sublicense, and/or sell copies of the Software, and to
1388+permit persons to whom the Software is furnished to do so, subject to
1389+the following conditions:
1390+
1391+The above copyright notice and this permission notice shall be
1392+included in all copies or substantial portions of the Software.
1393+
1394+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1395+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1396+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1397+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1398+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1399+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1400+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1401+
1402+#include "init.h"
1403+#include "unwind_i.h"
1404+
1405+PROTECTED int
1406+unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
1407+{
1408+#ifdef UNW_LOCAL_ONLY
1409+ return -UNW_EINVAL;
1410+#else /* !UNW_LOCAL_ONLY */
1411+ struct cursor *c = (struct cursor *) cursor;
1412+
1413+ if (!tdep_init_done)
1414+ tdep_init ();
1415+
1416+ Debug (1, "(cursor=%p)\n", c);
1417+
1418+ c->dwarf.as = as;
1419+ c->dwarf.as_arg = as_arg;
1420+ return common_init (c, 0);
1421+#endif /* !UNW_LOCAL_ONLY */
1422+}
1423--- /dev/null
1424+++ b/src/aarch64/Gis_signal_frame.c
1425@@ -0,0 +1,64 @@
1426+/* libunwind - a platform-independent unwind library
1427+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1428+ Copyright (C) 2013 Linaro Limited
1429+
1430+This file is part of libunwind.
1431+
1432+Permission is hereby granted, free of charge, to any person obtaining
1433+a copy of this software and associated documentation files (the
1434+"Software"), to deal in the Software without restriction, including
1435+without limitation the rights to use, copy, modify, merge, publish,
1436+distribute, sublicense, and/or sell copies of the Software, and to
1437+permit persons to whom the Software is furnished to do so, subject to
1438+the following conditions:
1439+
1440+The above copyright notice and this permission notice shall be
1441+included in all copies or substantial portions of the Software.
1442+
1443+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1444+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1445+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1446+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1447+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1448+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1449+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1450+
1451+#include "unwind_i.h"
1452+
1453+/* The restorer stub will always have the form:
1454+
1455+ d2801168 movz x8, #0x8b
1456+ d4000001 svc #0x0
1457+*/
1458+
1459+PROTECTED int
1460+unw_is_signal_frame (unw_cursor_t *cursor)
1461+{
1462+#ifdef __linux__
1463+ struct cursor *c = (struct cursor *) cursor;
1464+ unw_word_t w0, ip;
1465+ unw_addr_space_t as;
1466+ unw_accessors_t *a;
1467+ void *arg;
1468+ int ret;
1469+
1470+ as = c->dwarf.as;
1471+ a = unw_get_accessors (as);
1472+ arg = c->dwarf.as_arg;
1473+
1474+ ip = c->dwarf.ip;
1475+
1476+ ret = (*a->access_mem) (as, ip, &w0, 0, arg);
1477+ if (ret < 0)
1478+ return ret;
1479+
1480+ /* FIXME: distinguish 32bit insn vs 64bit registers. */
1481+ if (w0 != 0xd4000001d2801168)
1482+ return 0;
1483+
1484+ return 1;
1485+
1486+#else
1487+ return -UNW_ENOINFO;
1488+#endif
1489+}
1490--- /dev/null
1491+++ b/src/aarch64/Gregs.c
1492@@ -0,0 +1,113 @@
1493+/* libunwind - a platform-independent unwind library
1494+ Copyright (C) 2008 CodeSourcery
1495+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1496+ Copyright (C) 2013 Linaro Limited
1497+
1498+This file is part of libunwind.
1499+
1500+Permission is hereby granted, free of charge, to any person obtaining
1501+a copy of this software and associated documentation files (the
1502+"Software"), to deal in the Software without restriction, including
1503+without limitation the rights to use, copy, modify, merge, publish,
1504+distribute, sublicense, and/or sell copies of the Software, and to
1505+permit persons to whom the Software is furnished to do so, subject to
1506+the following conditions:
1507+
1508+The above copyright notice and this permission notice shall be
1509+included in all copies or substantial portions of the Software.
1510+
1511+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1512+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1513+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1514+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1515+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1516+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1517+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1518+
1519+#include "unwind_i.h"
1520+
1521+HIDDEN int
1522+tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
1523+ int write)
1524+{
1525+ dwarf_loc_t loc = DWARF_NULL_LOC;
1526+ unsigned int mask;
1527+
1528+ switch (reg)
1529+ {
1530+ case UNW_AARCH64_X0:
1531+ case UNW_AARCH64_X1:
1532+ case UNW_AARCH64_X2:
1533+ case UNW_AARCH64_X3:
1534+ mask = 1 << reg;
1535+ if (write)
1536+ {
1537+ c->dwarf.eh_args[reg] = *valp;
1538+ c->dwarf.eh_valid_mask |= mask;
1539+ return 0;
1540+ }
1541+ else if ((c->dwarf.eh_valid_mask & mask) != 0)
1542+ {
1543+ *valp = c->dwarf.eh_args[reg];
1544+ return 0;
1545+ }
1546+ else
1547+ loc = c->dwarf.loc[reg];
1548+ break;
1549+
1550+ case UNW_AARCH64_X4:
1551+ case UNW_AARCH64_X5:
1552+ case UNW_AARCH64_X6:
1553+ case UNW_AARCH64_X7:
1554+ case UNW_AARCH64_X8:
1555+ case UNW_AARCH64_X9:
1556+ case UNW_AARCH64_X10:
1557+ case UNW_AARCH64_X11:
1558+ case UNW_AARCH64_X12:
1559+ case UNW_AARCH64_X13:
1560+ case UNW_AARCH64_X14:
1561+ case UNW_AARCH64_X15:
1562+ case UNW_AARCH64_X16:
1563+ case UNW_AARCH64_X17:
1564+ case UNW_AARCH64_X18:
1565+ case UNW_AARCH64_X19:
1566+ case UNW_AARCH64_X20:
1567+ case UNW_AARCH64_X21:
1568+ case UNW_AARCH64_X22:
1569+ case UNW_AARCH64_X23:
1570+ case UNW_AARCH64_X24:
1571+ case UNW_AARCH64_X25:
1572+ case UNW_AARCH64_X26:
1573+ case UNW_AARCH64_X27:
1574+ case UNW_AARCH64_X28:
1575+ case UNW_AARCH64_X29:
1576+ case UNW_AARCH64_X30:
1577+ case UNW_AARCH64_PC:
1578+ case UNW_AARCH64_PSTATE:
1579+ loc = c->dwarf.loc[reg];
1580+ break;
1581+
1582+ case UNW_AARCH64_SP:
1583+ if (write)
1584+ return -UNW_EREADONLYREG;
1585+ *valp = c->dwarf.cfa;
1586+ return 0;
1587+
1588+ default:
1589+ Debug (1, "bad register number %u\n", reg);
1590+ return -UNW_EBADREG;
1591+ }
1592+
1593+ if (write)
1594+ return dwarf_put (&c->dwarf, loc, *valp);
1595+ else
1596+ return dwarf_get (&c->dwarf, loc, valp);
1597+}
1598+
1599+HIDDEN int
1600+tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp,
1601+ int write)
1602+{
1603+ Debug (1, "bad register number %u\n", reg);
1604+ return -UNW_EBADREG;
1605+}
1606--- /dev/null
1607+++ b/src/aarch64/Gresume.c
1608@@ -0,0 +1,177 @@
1609+/* libunwind - a platform-independent unwind library
1610+ Copyright (C) 2008 CodeSourcery
1611+ Copyright (C) 2011-2013 Linaro Limited
1612+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1613+
1614+This file is part of libunwind.
1615+
1616+Permission is hereby granted, free of charge, to any person obtaining
1617+a copy of this software and associated documentation files (the
1618+"Software"), to deal in the Software without restriction, including
1619+without limitation the rights to use, copy, modify, merge, publish,
1620+distribute, sublicense, and/or sell copies of the Software, and to
1621+permit persons to whom the Software is furnished to do so, subject to
1622+the following conditions:
1623+
1624+The above copyright notice and this permission notice shall be
1625+included in all copies or substantial portions of the Software.
1626+
1627+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1628+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1629+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1630+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1631+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1632+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1633+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1634+
1635+#include "unwind_i.h"
1636+#include "offsets.h"
1637+
1638+#ifndef UNW_REMOTE_ONLY
1639+
1640+HIDDEN inline int
1641+aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
1642+{
1643+#ifdef __linux__
1644+ struct cursor *c = (struct cursor *) cursor;
1645+ unw_tdep_context_t *uc = c->dwarf.as_arg;
1646+
1647+ if (c->sigcontext_format == AARCH64_SCF_NONE)
1648+ {
1649+ /* Since there are no signals involved here we restore the non scratch
1650+ registers only. */
1651+ unsigned long regs[11];
1652+ regs[0] = uc->uc_mcontext.regs[19];
1653+ regs[1] = uc->uc_mcontext.regs[20];
1654+ regs[2] = uc->uc_mcontext.regs[21];
1655+ regs[3] = uc->uc_mcontext.regs[22];
1656+ regs[4] = uc->uc_mcontext.regs[23];
1657+ regs[5] = uc->uc_mcontext.regs[24];
1658+ regs[6] = uc->uc_mcontext.regs[25];
1659+ regs[7] = uc->uc_mcontext.regs[26];
1660+ regs[8] = uc->uc_mcontext.regs[27];
1661+ regs[9] = uc->uc_mcontext.regs[28];
1662+ regs[10] = uc->uc_mcontext.regs[30]; /* LR */
1663+ unsigned long sp = uc->uc_mcontext.sp;
1664+
1665+ struct regs_overlay {
1666+ char x[sizeof(regs)];
1667+ };
1668+
1669+ asm volatile (
1670+ "ldp x19, x20, [%0]\n"
1671+ "ldp x21, x22, [%0,16]\n"
1672+ "ldp x23, x24, [%0,32]\n"
1673+ "ldp x25, x26, [%0,48]\n"
1674+ "ldp x27, x28, [%0,64]\n"
1675+ "ldr x30, [%0,80]\n"
1676+ "mov sp, %1\n"
1677+ "ret \n"
1678+ :
1679+ : "r" (regs),
1680+ "r" (sp),
1681+ "m" (*(struct regs_overlay *)regs)
1682+ );
1683+ }
1684+ else
1685+ {
1686+ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
1687+
1688+ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0];
1689+ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1];
1690+ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2];
1691+ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3];
1692+
1693+ sc->regs[4] = uc->uc_mcontext.regs[4];
1694+ sc->regs[5] = uc->uc_mcontext.regs[5];
1695+ sc->regs[6] = uc->uc_mcontext.regs[6];
1696+ sc->regs[7] = uc->uc_mcontext.regs[7];
1697+ sc->regs[8] = uc->uc_mcontext.regs[8];
1698+ sc->regs[9] = uc->uc_mcontext.regs[9];
1699+ sc->regs[10] = uc->uc_mcontext.regs[10];
1700+ sc->regs[11] = uc->uc_mcontext.regs[11];
1701+ sc->regs[12] = uc->uc_mcontext.regs[12];
1702+ sc->regs[13] = uc->uc_mcontext.regs[13];
1703+ sc->regs[14] = uc->uc_mcontext.regs[14];
1704+ sc->regs[15] = uc->uc_mcontext.regs[15];
1705+ sc->regs[16] = uc->uc_mcontext.regs[16];
1706+ sc->regs[17] = uc->uc_mcontext.regs[17];
1707+ sc->regs[18] = uc->uc_mcontext.regs[18];
1708+ sc->regs[19] = uc->uc_mcontext.regs[19];
1709+ sc->regs[20] = uc->uc_mcontext.regs[20];
1710+ sc->regs[21] = uc->uc_mcontext.regs[21];
1711+ sc->regs[22] = uc->uc_mcontext.regs[22];
1712+ sc->regs[23] = uc->uc_mcontext.regs[23];
1713+ sc->regs[24] = uc->uc_mcontext.regs[24];
1714+ sc->regs[25] = uc->uc_mcontext.regs[25];
1715+ sc->regs[26] = uc->uc_mcontext.regs[26];
1716+ sc->regs[27] = uc->uc_mcontext.regs[27];
1717+ sc->regs[28] = uc->uc_mcontext.regs[28];
1718+ sc->regs[29] = uc->uc_mcontext.regs[29];
1719+ sc->regs[30] = uc->uc_mcontext.regs[30];
1720+ sc->sp = uc->uc_mcontext.sp;
1721+ sc->pc = uc->uc_mcontext.pc;
1722+ sc->pstate = uc->uc_mcontext.pstate;
1723+
1724+ asm volatile (
1725+ "mov sp, %0\n"
1726+ "ret %1\n"
1727+ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
1728+ );
1729+ }
1730+ unreachable();
1731+#else
1732+ printf ("%s: implement me\n", __FUNCTION__);
1733+#endif
1734+ return -UNW_EINVAL;
1735+}
1736+
1737+#endif /* !UNW_REMOTE_ONLY */
1738+
1739+static inline void
1740+establish_machine_state (struct cursor *c)
1741+{
1742+ unw_addr_space_t as = c->dwarf.as;
1743+ void *arg = c->dwarf.as_arg;
1744+ unw_fpreg_t fpval;
1745+ unw_word_t val;
1746+ int reg;
1747+
1748+ Debug (8, "copying out cursor state\n");
1749+
1750+ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg)
1751+ {
1752+ Debug (16, "copying %s %d\n", unw_regname (reg), reg);
1753+ if (unw_is_fpreg (reg))
1754+ {
1755+ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
1756+ as->acc.access_fpreg (as, reg, &fpval, 1, arg);
1757+ }
1758+ else
1759+ {
1760+ if (tdep_access_reg (c, reg, &val, 0) >= 0)
1761+ as->acc.access_reg (as, reg, &val, 1, arg);
1762+ }
1763+ }
1764+}
1765+
1766+PROTECTED int
1767+unw_resume (unw_cursor_t *cursor)
1768+{
1769+ struct cursor *c = (struct cursor *) cursor;
1770+
1771+ Debug (1, "(cursor=%p)\n", c);
1772+
1773+ if (!c->dwarf.ip)
1774+ {
1775+ /* This can happen easily when the frame-chain gets truncated
1776+ due to bad or missing unwind-info. */
1777+ Debug (1, "refusing to resume execution at address 0\n");
1778+ return -UNW_EINVAL;
1779+ }
1780+
1781+ establish_machine_state (c);
1782+
1783+ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c,
1784+ c->dwarf.as_arg);
1785+}
1786--- /dev/null
1787+++ b/src/aarch64/Gstep.c
1788@@ -0,0 +1,129 @@
1789+/* libunwind - a platform-independent unwind library
1790+ Copyright (C) 2008 CodeSourcery
1791+ Copyright (C) 2011-2013 Linaro Limited
1792+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
1793+
1794+This file is part of libunwind.
1795+
1796+Permission is hereby granted, free of charge, to any person obtaining
1797+a copy of this software and associated documentation files (the
1798+"Software"), to deal in the Software without restriction, including
1799+without limitation the rights to use, copy, modify, merge, publish,
1800+distribute, sublicense, and/or sell copies of the Software, and to
1801+permit persons to whom the Software is furnished to do so, subject to
1802+the following conditions:
1803+
1804+The above copyright notice and this permission notice shall be
1805+included in all copies or substantial portions of the Software.
1806+
1807+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1808+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1809+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1810+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1811+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1812+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1813+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
1814+
1815+#include "unwind_i.h"
1816+#include "offsets.h"
1817+
1818+PROTECTED int
1819+unw_handle_signal_frame (unw_cursor_t *cursor)
1820+{
1821+ struct cursor *c = (struct cursor *) cursor;
1822+ int ret;
1823+ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa;
1824+ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0);
1825+
1826+ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0)
1827+ return -UNW_EUNSPEC;
1828+
1829+ ret = unw_is_signal_frame (cursor);
1830+ Debug(1, "unw_is_signal_frame()=%d\n", ret);
1831+
1832+ /* Save the SP and PC to be able to return execution at this point
1833+ later in time (unw_resume). */
1834+ c->sigcontext_sp = c->dwarf.cfa;
1835+ c->sigcontext_pc = c->dwarf.ip;
1836+
1837+ if (ret)
1838+ {
1839+ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME;
1840+ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
1841+ }
1842+ else
1843+ return -UNW_EUNSPEC;
1844+
1845+ c->sigcontext_addr = sc_addr;
1846+
1847+ /* Update the dwarf cursor.
1848+ Set the location of the registers to the corresponding addresses of the
1849+ uc_mcontext / sigcontext structure contents. */
1850+ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0);
1851+ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0);
1852+ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0);
1853+ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0);
1854+ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0);
1855+ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0);
1856+ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0);
1857+ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0);
1858+ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0);
1859+ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0);
1860+ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0);
1861+ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0);
1862+ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0);
1863+ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0);
1864+ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0);
1865+ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0);
1866+ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0);
1867+ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0);
1868+ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0);
1869+ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0);
1870+ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0);
1871+ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0);
1872+ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0);
1873+ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0);
1874+ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0);
1875+ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0);
1876+ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0);
1877+ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0);
1878+ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0);
1879+ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0);
1880+ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0);
1881+ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0);
1882+ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0);
1883+ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0);
1884+
1885+ /* Set SP/CFA and PC/IP. */
1886+ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
1887+ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
1888+
1889+ c->dwarf.pi_valid = 0;
1890+
1891+ return 1;
1892+}
1893+
1894+PROTECTED int
1895+unw_step (unw_cursor_t *cursor)
1896+{
1897+ struct cursor *c = (struct cursor *) cursor;
1898+ int ret;
1899+
1900+ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n",
1901+ c, c->dwarf.ip, c->dwarf.cfa);
1902+
1903+ /* Check if this is a signal frame. */
1904+ if (unw_is_signal_frame (cursor))
1905+ return unw_handle_signal_frame (cursor);
1906+
1907+ ret = dwarf_step (&c->dwarf);
1908+ Debug(1, "dwarf_step()=%d\n", ret);
1909+
1910+ if (unlikely (ret == -UNW_ESTOPUNWIND))
1911+ return ret;
1912+
1913+ if (unlikely (ret < 0))
1914+ return 0;
1915+
1916+ return (c->dwarf.ip == 0) ? 0 : 1;
1917+}
1918--- /dev/null
1919+++ b/src/aarch64/Lcreate_addr_space.c
1920@@ -0,0 +1,5 @@
1921+#define UNW_LOCAL_ONLY
1922+#include <libunwind.h>
1923+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1924+#include "Gcreate_addr_space.c"
1925+#endif
1926--- /dev/null
1927+++ b/src/aarch64/Lget_proc_info.c
1928@@ -0,0 +1,5 @@
1929+#define UNW_LOCAL_ONLY
1930+#include <libunwind.h>
1931+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1932+#include "Gget_proc_info.c"
1933+#endif
1934--- /dev/null
1935+++ b/src/aarch64/Lget_save_loc.c
1936@@ -0,0 +1,5 @@
1937+#define UNW_LOCAL_ONLY
1938+#include <libunwind.h>
1939+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1940+#include "Gget_save_loc.c"
1941+#endif
1942--- /dev/null
1943+++ b/src/aarch64/Lglobal.c
1944@@ -0,0 +1,5 @@
1945+#define UNW_LOCAL_ONLY
1946+#include <libunwind.h>
1947+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1948+#include "Gglobal.c"
1949+#endif
1950--- /dev/null
1951+++ b/src/aarch64/Linit.c
1952@@ -0,0 +1,5 @@
1953+#define UNW_LOCAL_ONLY
1954+#include <libunwind.h>
1955+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1956+#include "Ginit.c"
1957+#endif
1958--- /dev/null
1959+++ b/src/aarch64/Linit_local.c
1960@@ -0,0 +1,5 @@
1961+#define UNW_LOCAL_ONLY
1962+#include <libunwind.h>
1963+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1964+#include "Ginit_local.c"
1965+#endif
1966--- /dev/null
1967+++ b/src/aarch64/Linit_remote.c
1968@@ -0,0 +1,5 @@
1969+#define UNW_LOCAL_ONLY
1970+#include <libunwind.h>
1971+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1972+#include "Ginit_remote.c"
1973+#endif
1974--- /dev/null
1975+++ b/src/aarch64/Lis_signal_frame.c
1976@@ -0,0 +1,5 @@
1977+#define UNW_LOCAL_ONLY
1978+#include <libunwind.h>
1979+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1980+#include "Gis_signal_frame.c"
1981+#endif
1982--- /dev/null
1983+++ b/src/aarch64/Lregs.c
1984@@ -0,0 +1,5 @@
1985+#define UNW_LOCAL_ONLY
1986+#include <libunwind.h>
1987+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1988+#include "Gregs.c"
1989+#endif
1990--- /dev/null
1991+++ b/src/aarch64/Lresume.c
1992@@ -0,0 +1,5 @@
1993+#define UNW_LOCAL_ONLY
1994+#include <libunwind.h>
1995+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
1996+#include "Gresume.c"
1997+#endif
1998--- /dev/null
1999+++ b/src/aarch64/Lstep.c
2000@@ -0,0 +1,5 @@
2001+#define UNW_LOCAL_ONLY
2002+#include <libunwind.h>
2003+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
2004+#include "Gstep.c"
2005+#endif
2006--- /dev/null
2007+++ b/src/aarch64/gen-offsets.c
2008@@ -0,0 +1,68 @@
2009+#include <stdio.h>
2010+#include <stddef.h>
2011+#include <ucontext.h>
2012+#include <asm/sigcontext.h>
2013+
2014+#define UC(N,X) \
2015+ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
2016+
2017+#define SC(N,X) \
2018+ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
2019+
2020+int
2021+main (void)
2022+{
2023+ printf (
2024+"/* Linux-specific definitions: */\n\n"
2025+
2026+"/* Define various structure offsets to simplify cross-compilation. */\n\n"
2027+
2028+"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n");
2029+
2030+ UC ("FLAGS", uc_flags);
2031+ UC ("LINK", uc_link);
2032+ UC ("STACK", uc_stack);
2033+ UC ("MCONTEXT", uc_mcontext);
2034+ UC ("SIGMASK", uc_sigmask);
2035+
2036+ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n");
2037+
2038+ SC ("R0", regs[0]);
2039+ SC ("R1", regs[1]);
2040+ SC ("R2", regs[2]);
2041+ SC ("R3", regs[3]);
2042+ SC ("R4", regs[4]);
2043+ SC ("R5", regs[5]);
2044+ SC ("R6", regs[6]);
2045+ SC ("R7", regs[7]);
2046+ SC ("R8", regs[8]);
2047+ SC ("R9", regs[9]);
2048+ SC ("R10", regs[10]);
2049+ SC ("R11", regs[11]);
2050+ SC ("R12", regs[12]);
2051+ SC ("R13", regs[13]);
2052+ SC ("R14", regs[14]);
2053+ SC ("R15", regs[15]);
2054+ SC ("R16", regs[16]);
2055+ SC ("R17", regs[17]);
2056+ SC ("R18", regs[18]);
2057+ SC ("R19", regs[19]);
2058+ SC ("R20", regs[20]);
2059+ SC ("R21", regs[21]);
2060+ SC ("R22", regs[22]);
2061+ SC ("R23", regs[23]);
2062+ SC ("R24", regs[24]);
2063+ SC ("R25", regs[25]);
2064+ SC ("R26", regs[26]);
2065+ SC ("R27", regs[27]);
2066+ SC ("R28", regs[28]);
2067+ SC ("R29", regs[29]);
2068+ SC ("R30", regs[30]);
2069+ SC ("R31", regs[31]);
2070+
2071+ SC ("PC", pc);
2072+ SC ("SP", sp);
2073+ SC ("Fault", fault_address);
2074+ SC ("state", pstate);
2075+ return 0;
2076+}
2077--- /dev/null
2078+++ b/src/aarch64/init.h
2079@@ -0,0 +1,127 @@
2080+/* libunwind - a platform-independent unwind library
2081+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
2082+ Copyright (C) 2013 Linaro Limited
2083+
2084+This file is part of libunwind.
2085+
2086+Permission is hereby granted, free of charge, to any person obtaining
2087+a copy of this software and associated documentation files (the
2088+"Software"), to deal in the Software without restriction, including
2089+without limitation the rights to use, copy, modify, merge, publish,
2090+distribute, sublicense, and/or sell copies of the Software, and to
2091+permit persons to whom the Software is furnished to do so, subject to
2092+the following conditions:
2093+
2094+The above copyright notice and this permission notice shall be
2095+included in all copies or substantial portions of the Software.
2096+
2097+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2098+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2099+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2100+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2101+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2102+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2103+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2104+
2105+#include "unwind_i.h"
2106+
2107+static inline int
2108+common_init (struct cursor *c, unsigned use_prev_instr)
2109+{
2110+ int ret, i;
2111+
2112+ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0);
2113+ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1);
2114+ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2);
2115+ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3);
2116+ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4);
2117+ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5);
2118+ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6);
2119+ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7);
2120+ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8);
2121+ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9);
2122+ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10);
2123+ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11);
2124+ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12);
2125+ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13);
2126+ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14);
2127+ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15);
2128+ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16);
2129+ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17);
2130+ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18);
2131+ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19);
2132+ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20);
2133+ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21);
2134+ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22);
2135+ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23);
2136+ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24);
2137+ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25);
2138+ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26);
2139+ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27);
2140+ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28);
2141+ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29);
2142+ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30);
2143+ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP);
2144+ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC);
2145+ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf,
2146+ UNW_AARCH64_PSTATE);
2147+ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0);
2148+ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1);
2149+ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2);
2150+ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3);
2151+ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4);
2152+ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5);
2153+ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6);
2154+ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7);
2155+ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8);
2156+ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9);
2157+ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10);
2158+ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11);
2159+ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12);
2160+ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13);
2161+ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14);
2162+ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15);
2163+ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16);
2164+ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17);
2165+ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18);
2166+ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19);
2167+ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20);
2168+ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21);
2169+ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22);
2170+ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23);
2171+ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24);
2172+ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25);
2173+ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26);
2174+ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27);
2175+ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28);
2176+ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29);
2177+ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30);
2178+ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31);
2179+
2180+ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i)
2181+ c->dwarf.loc[i] = DWARF_NULL_LOC;
2182+
2183+ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
2184+ if (ret < 0)
2185+ return ret;
2186+
2187+ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
2188+ if (ret < 0)
2189+ return ret;
2190+
2191+ c->sigcontext_format = AARCH64_SCF_NONE;
2192+ c->sigcontext_addr = 0;
2193+ c->sigcontext_sp = 0;
2194+ c->sigcontext_pc = 0;
2195+
2196+ c->dwarf.args_size = 0;
2197+ c->dwarf.ret_addr_column = 0;
2198+ c->dwarf.stash_frames = 0;
2199+ c->dwarf.use_prev_instr = use_prev_instr;
2200+ c->dwarf.pi_valid = 0;
2201+ c->dwarf.pi_is_dynamic = 0;
2202+ c->dwarf.hint = 0;
2203+ c->dwarf.prev_rs = 0;
2204+
2205+ return 0;
2206+}
2207--- /dev/null
2208+++ b/src/aarch64/is_fpreg.c
2209@@ -0,0 +1,32 @@
2210+/* libunwind - a platform-independent unwind library
2211+ Copyright (C) 2008 CodeSourcery
2212+ Copyright (C) 2013 Linaro Limited
2213+
2214+This file is part of libunwind.
2215+
2216+Permission is hereby granted, free of charge, to any person obtaining
2217+a copy of this software and associated documentation files (the
2218+"Software"), to deal in the Software without restriction, including
2219+without limitation the rights to use, copy, modify, merge, publish,
2220+distribute, sublicense, and/or sell copies of the Software, and to
2221+permit persons to whom the Software is furnished to do so, subject to
2222+the following conditions:
2223+
2224+The above copyright notice and this permission notice shall be
2225+included in all copies or substantial portions of the Software.
2226+
2227+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2228+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2229+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2230+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2231+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2232+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2233+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2234+
2235+#include "libunwind_i.h"
2236+
2237+PROTECTED int
2238+unw_is_fpreg (int regnum)
2239+{
2240+ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
2241+}
2242--- /dev/null
2243+++ b/src/aarch64/offsets.h
2244@@ -0,0 +1,49 @@
2245+/* Linux-specific definitions: */
2246+
2247+/* Define various structure offsets to simplify cross-compilation. */
2248+
2249+/* Offsets for AArch64 Linux "ucontext_t": */
2250+
2251+#define LINUX_UC_FLAGS_OFF 0x0
2252+#define LINUX_UC_LINK_OFF 0x8
2253+#define LINUX_UC_STACK_OFF 0x10
2254+#define LINUX_UC_SIGMASK_OFF 0x28
2255+#define LINUX_UC_MCONTEXT_OFF 0xb0
2256+
2257+/* Offsets for AArch64 Linux "struct sigcontext": */
2258+
2259+#define LINUX_SC_FAULTADDRESS_OFF 0x00
2260+#define LINUX_SC_X0_OFF 0x008
2261+#define LINUX_SC_X1_OFF 0x010
2262+#define LINUX_SC_X2_OFF 0x018
2263+#define LINUX_SC_X3_OFF 0x020
2264+#define LINUX_SC_X4_OFF 0x028
2265+#define LINUX_SC_X5_OFF 0x030
2266+#define LINUX_SC_X6_OFF 0x038
2267+#define LINUX_SC_X7_OFF 0x040
2268+#define LINUX_SC_X8_OFF 0x048
2269+#define LINUX_SC_X9_OFF 0x050
2270+#define LINUX_SC_X10_OFF 0x058
2271+#define LINUX_SC_X11_OFF 0x060
2272+#define LINUX_SC_X12_OFF 0x068
2273+#define LINUX_SC_X13_OFF 0x070
2274+#define LINUX_SC_X14_OFF 0x078
2275+#define LINUX_SC_X15_OFF 0x080
2276+#define LINUX_SC_X16_OFF 0x088
2277+#define LINUX_SC_X17_OFF 0x090
2278+#define LINUX_SC_X18_OFF 0x098
2279+#define LINUX_SC_X19_OFF 0x0a0
2280+#define LINUX_SC_X20_OFF 0x0a8
2281+#define LINUX_SC_X21_OFF 0x0b0
2282+#define LINUX_SC_X22_OFF 0x0b8
2283+#define LINUX_SC_X23_OFF 0x0c0
2284+#define LINUX_SC_X24_OFF 0x0c8
2285+#define LINUX_SC_X25_OFF 0x0d0
2286+#define LINUX_SC_X26_OFF 0x0d8
2287+#define LINUX_SC_X27_OFF 0x0e0
2288+#define LINUX_SC_X28_OFF 0x0e8
2289+#define LINUX_SC_X29_OFF 0x0f0
2290+#define LINUX_SC_X30_OFF 0x0f8
2291+#define LINUX_SC_SP_OFF 0x100
2292+#define LINUX_SC_PC_OFF 0x108
2293+#define LINUX_SC_PSTATE_OFF 0x110
2294--- /dev/null
2295+++ b/src/aarch64/regname.c
2296@@ -0,0 +1,106 @@
2297+/* libunwind - a platform-independent unwind library
2298+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
2299+ Copyright (C) 2013 Linaro Limited
2300+
2301+This file is part of libunwind.
2302+
2303+Permission is hereby granted, free of charge, to any person obtaining
2304+a copy of this software and associated documentation files (the
2305+"Software"), to deal in the Software without restriction, including
2306+without limitation the rights to use, copy, modify, merge, publish,
2307+distribute, sublicense, and/or sell copies of the Software, and to
2308+permit persons to whom the Software is furnished to do so, subject to
2309+the following conditions:
2310+
2311+The above copyright notice and this permission notice shall be
2312+included in all copies or substantial portions of the Software.
2313+
2314+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2315+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2316+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2317+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2318+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2319+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2320+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2321+
2322+#include "unwind_i.h"
2323+
2324+static const char *const regname[] =
2325+ {
2326+ [UNW_AARCH64_X0] = "x0",
2327+ [UNW_AARCH64_X1] = "x1",
2328+ [UNW_AARCH64_X2] = "x2",
2329+ [UNW_AARCH64_X3] = "x3",
2330+ [UNW_AARCH64_X4] = "x4",
2331+ [UNW_AARCH64_X5] = "x5",
2332+ [UNW_AARCH64_X6] = "x6",
2333+ [UNW_AARCH64_X7] = "x7",
2334+ [UNW_AARCH64_X8] = "x8",
2335+ [UNW_AARCH64_X9] = "x9",
2336+ [UNW_AARCH64_X10] = "x10",
2337+ [UNW_AARCH64_X11] = "x11",
2338+ [UNW_AARCH64_X12] = "x12",
2339+ [UNW_AARCH64_X13] = "x13",
2340+ [UNW_AARCH64_X14] = "x14",
2341+ [UNW_AARCH64_X15] = "x15",
2342+ [UNW_AARCH64_X16] = "ip0",
2343+ [UNW_AARCH64_X17] = "ip1",
2344+ [UNW_AARCH64_X18] = "x18",
2345+ [UNW_AARCH64_X19] = "x19",
2346+ [UNW_AARCH64_X20] = "x20",
2347+ [UNW_AARCH64_X21] = "x21",
2348+ [UNW_AARCH64_X22] = "x22",
2349+ [UNW_AARCH64_X23] = "x23",
2350+ [UNW_AARCH64_X24] = "x24",
2351+ [UNW_AARCH64_X25] = "x25",
2352+ [UNW_AARCH64_X26] = "x26",
2353+ [UNW_AARCH64_X27] = "x27",
2354+ [UNW_AARCH64_X28] = "x28",
2355+ [UNW_AARCH64_X29] = "fp",
2356+ [UNW_AARCH64_X30] = "lr",
2357+ [UNW_AARCH64_SP] = "sp",
2358+ [UNW_AARCH64_PC] = "pc",
2359+ [UNW_AARCH64_V0] = "v0",
2360+ [UNW_AARCH64_V1] = "v1",
2361+ [UNW_AARCH64_V2] = "v2",
2362+ [UNW_AARCH64_V3] = "v3",
2363+ [UNW_AARCH64_V4] = "v4",
2364+ [UNW_AARCH64_V5] = "v5",
2365+ [UNW_AARCH64_V6] = "v6",
2366+ [UNW_AARCH64_V7] = "v7",
2367+ [UNW_AARCH64_V8] = "v8",
2368+ [UNW_AARCH64_V9] = "v9",
2369+ [UNW_AARCH64_V10] = "v10",
2370+ [UNW_AARCH64_V11] = "v11",
2371+ [UNW_AARCH64_V12] = "v12",
2372+ [UNW_AARCH64_V13] = "v13",
2373+ [UNW_AARCH64_V14] = "v14",
2374+ [UNW_AARCH64_V15] = "v15",
2375+ [UNW_AARCH64_V16] = "v16",
2376+ [UNW_AARCH64_V17] = "v17",
2377+ [UNW_AARCH64_V18] = "v18",
2378+ [UNW_AARCH64_V19] = "v19",
2379+ [UNW_AARCH64_V20] = "v20",
2380+ [UNW_AARCH64_V21] = "v21",
2381+ [UNW_AARCH64_V22] = "v22",
2382+ [UNW_AARCH64_V23] = "v23",
2383+ [UNW_AARCH64_V24] = "v24",
2384+ [UNW_AARCH64_V25] = "v25",
2385+ [UNW_AARCH64_V26] = "v26",
2386+ [UNW_AARCH64_V27] = "v27",
2387+ [UNW_AARCH64_V28] = "v28",
2388+ [UNW_AARCH64_V29] = "v29",
2389+ [UNW_AARCH64_V30] = "v30",
2390+ [UNW_AARCH64_V31] = "v31",
2391+ [UNW_AARCH64_FPSR] = "fpsr",
2392+ [UNW_AARCH64_FPCR] = "fpcr",
2393+ };
2394+
2395+PROTECTED const char *
2396+unw_regname (unw_regnum_t reg)
2397+{
2398+ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL)
2399+ return regname[reg];
2400+ else
2401+ return "???";
2402+}
2403--- /dev/null
2404+++ b/src/aarch64/siglongjmp.S
2405@@ -0,0 +1,12 @@
2406+ /* Dummy implementation for now. */
2407+
2408+ .global _UI_siglongjmp_cont
2409+ .global _UI_longjmp_cont
2410+
2411+_UI_siglongjmp_cont:
2412+_UI_longjmp_cont:
2413+ ret
2414+#ifdef __linux__
2415+ /* We do not need executable stack. */
2416+ .section .note.GNU-stack,"",%progbits
2417+#endif
2418--- /dev/null
2419+++ b/src/aarch64/unwind_i.h
2420@@ -0,0 +1,43 @@
2421+/* libunwind - a platform-independent unwind library
2422+ Copyright (C) 2008 CodeSourcery
2423+ Copyright (C) 2013 Linaro Limited
2424+
2425+This file is part of libunwind.
2426+
2427+Permission is hereby granted, free of charge, to any person obtaining
2428+a copy of this software and associated documentation files (the
2429+"Software"), to deal in the Software without restriction, including
2430+without limitation the rights to use, copy, modify, merge, publish,
2431+distribute, sublicense, and/or sell copies of the Software, and to
2432+permit persons to whom the Software is furnished to do so, subject to
2433+the following conditions:
2434+
2435+The above copyright notice and this permission notice shall be
2436+included in all copies or substantial portions of the Software.
2437+
2438+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2439+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2440+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2441+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2442+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2443+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2444+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2445+
2446+#ifndef unwind_i_h
2447+#define unwind_i_h
2448+
2449+#include <stdint.h>
2450+
2451+#include <libunwind-aarch64.h>
2452+
2453+#include "libunwind_i.h"
2454+
2455+#define aarch64_lock UNW_OBJ(lock)
2456+#define aarch64_local_resume UNW_OBJ(local_resume)
2457+#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init)
2458+
2459+extern void aarch64_local_addr_space_init (void);
2460+extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
2461+ void *arg);
2462+
2463+#endif /* unwind_i_h */
2464--- a/src/coredump/_UCD_access_reg_linux.c
2465+++ b/src/coredump/_UCD_access_reg_linux.c
2466@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as,
2467 return -UNW_EINVAL;
2468 }
2469
2470-#if defined(UNW_TARGET_ARM)
2471+#if defined(UNW_TARGET_AARCH64)
2472+ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
2473+ goto badreg;
2474+#elif defined(UNW_TARGET_ARM)
2475 if (regnum < 0 || regnum >= 16)
2476 goto badreg;
2477 #elif defined(UNW_TARGET_SH)
2478--- a/src/ptrace/_UPT_reg_offset.c
2479+++ b/src/ptrace/_UPT_reg_offset.c
2480@@ -1,6 +1,7 @@
2481 /* libunwind - a platform-independent unwind library
2482 Copyright (C) 2003-2004 Hewlett-Packard Co
2483 Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
2484+ Copyright (C) 2013 Linaro Limited
2485
2486 This file is part of libunwind.
2487
2488@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST +
2489 [UNW_ARM_R15] = 0x3c,
2490 #elif defined(UNW_TARGET_MIPS)
2491 #elif defined(UNW_TARGET_SH)
2492+#elif defined(UNW_TARGET_AARCH64)
2493+ [UNW_AARCH64_X0] = 0x00,
2494+ [UNW_AARCH64_X1] = 0x08,
2495+ [UNW_AARCH64_X2] = 0x10,
2496+ [UNW_AARCH64_X3] = 0x18,
2497+ [UNW_AARCH64_X4] = 0x20,
2498+ [UNW_AARCH64_X5] = 0x28,
2499+ [UNW_AARCH64_X6] = 0x30,
2500+ [UNW_AARCH64_X7] = 0x38,
2501+ [UNW_AARCH64_X8] = 0x40,
2502+ [UNW_AARCH64_X9] = 0x48,
2503+ [UNW_AARCH64_X10] = 0x50,
2504+ [UNW_AARCH64_X11] = 0x58,
2505+ [UNW_AARCH64_X12] = 0x60,
2506+ [UNW_AARCH64_X13] = 0x68,
2507+ [UNW_AARCH64_X14] = 0x70,
2508+ [UNW_AARCH64_X15] = 0x78,
2509+ [UNW_AARCH64_X16] = 0x80,
2510+ [UNW_AARCH64_X17] = 0x88,
2511+ [UNW_AARCH64_X18] = 0x90,
2512+ [UNW_AARCH64_X19] = 0x98,
2513+ [UNW_AARCH64_X20] = 0xa0,
2514+ [UNW_AARCH64_X21] = 0xa8,
2515+ [UNW_AARCH64_X22] = 0xb0,
2516+ [UNW_AARCH64_X23] = 0xb8,
2517+ [UNW_AARCH64_X24] = 0xc0,
2518+ [UNW_AARCH64_X25] = 0xc8,
2519+ [UNW_AARCH64_X26] = 0xd0,
2520+ [UNW_AARCH64_X27] = 0xd8,
2521+ [UNW_AARCH64_X28] = 0xe0,
2522+ [UNW_AARCH64_X29] = 0xe8,
2523+ [UNW_AARCH64_X30] = 0xf0,
2524+ [UNW_AARCH64_SP] = 0xf8,
2525+ [UNW_AARCH64_PC] = 0x100,
2526+ [UNW_AARCH64_PSTATE] = 0x108
2527 #else
2528 # error Fix me.
2529 #endif
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
new file mode 100644
index 0000000000..dc0f5c1b47
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
@@ -0,0 +1,28 @@
1Fix test case link failure on PowerPC systems with Altivec
2
3Upstream-Status:backport
4
5On systems where the system compiler supports Altivec by default,
6the libunwind Makefile will attempt to build an extra test case
7ppc64-test-altivec. Unfortunately, the link step will fail since
8the Makefile does not actually link against the libunwind library.
9
10Fixed by adding the appropriate LDADD macro.
11
12Signed-off-by: Ulrich Weigand <address@hidden>
13---
14 tests/Makefile.am | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/tests/Makefile.am b/tests/Makefile.am
18index 0e30536..9c76628 100644
19--- a/tests/Makefile.am
20+++ b/tests/Makefile.am
21@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
22 Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
23 ia64_test_dyn1_LDADD = $(LIBUNWIND)
24 ia64_test_sig_LDADD = $(LIBUNWIND)
25+ppc64_test_altivec_LDADD = $(LIBUNWIND)
26--
271.8.5
28
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
new file mode 100644
index 0000000000..0e55c91b80
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
@@ -0,0 +1,42 @@
1From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
2From: Thierry Reding <treding@nvidia.com>
3Date: Fri, 27 Jun 2014 08:40:33 +0200
4Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
5
6For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
7example, libgcc_s.so.1 contains some symbols needed by libunwind which
8are not present in libgcc.
9
10This causes the following link error when building the X.Org X server
11with libunwind support:
12
13 CCLD Xorg
14 /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
15 /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
16
17Linking against libgcc_s explicitly solves this problem.
18
19Upstream-Status: Backport
20
21Signed-off-by: Thierry Reding <treding@nvidia.com>
22Signed-off-by: Jonathan Liu <net147@gmail.com>
23---
24 configure.ac | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/configure.ac b/configure.ac
28index cffe19b..3beb5f2 100644
29--- a/configure.ac
30+++ b/configure.ac
31@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER
32
33 if test x$GCC = xyes -a x$intel_compiler != xyes; then
34 CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
35- LIBCRTS="-lgcc"
36+ LIBCRTS="-lgcc_s"
37 fi
38 AC_MSG_RESULT([$intel_compiler])
39
40--
412.3.2
42
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
new file mode 100644
index 0000000000..268b702dcb
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
@@ -0,0 +1,72 @@
1From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
2From: Ladislav Michl <ladis@linux-mips.org>
3Date: Tue, 13 Nov 2012 11:19:47 +0100
4Subject: [PATCH] Support building with older compilers.
5
6Add a check for __builtin_unreachable.
7
8Upstream-Status: Pending
9---
10 configure.ac | 11 +++++++++++
11 include/libunwind_i.h | 6 ++++++
12 src/arm/Gresume.c | 2 +-
13 src/sh/Gresume.c | 2 +-
14 4 files changed, 19 insertions(+), 2 deletions(-)
15
16--- a/configure.ac
17+++ b/configure.ac
18@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
19 fi
20 AC_MSG_RESULT([$have__builtin___clear_cache])
21
22+AC_MSG_CHECKING([for __builtin_unreachable])
23+AC_LINK_IFELSE(
24+ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
25+ [have__builtin_unreachable=yes],
26+ [have__builtin_unreachable=no])
27+if test x$have__builtin_unreachable = xyes; then
28+ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
29+ [Defined if __builtin_unreachable() is available])
30+fi
31+AC_MSG_RESULT([$have__builtin_unreachable])
32+
33 AC_MSG_CHECKING([for __sync atomics])
34 AC_LINK_IFELSE(
35 [AC_LANG_PROGRAM([[]], [[
36--- a/include/libunwind_i.h
37+++ b/include/libunwind_i.h
38@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
39 # endif
40 #endif
41
42+#if defined(HAVE__BUILTIN_UNREACHABLE)
43+# define unreachable() __builtin_unreachable()
44+#else
45+# define unreachable() do { } while (1)
46+#endif
47+
48 #ifdef DEBUG
49 # define UNW_DEBUG 1
50 #else
51--- a/src/arm/Gresume.c
52+++ b/src/arm/Gresume.c
53@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
54 : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
55 );
56 }
57- __builtin_unreachable();
58+ unreachable();
59 #else
60 printf ("%s: implement me\n", __FUNCTION__);
61 #endif
62--- a/src/sh/Gresume.c
63+++ b/src/sh/Gresume.c
64@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
65 "r" (c->sigcontext_pc)
66 );
67 }
68- __builtin_unreachable();
69+ unreachable();
70 #endif
71 return -UNW_EINVAL;
72 }
diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc
new file mode 100644
index 0000000000..6743b21fcf
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind.inc
@@ -0,0 +1,31 @@
1DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
2HOMEPAGE = "http://www.nongnu.org/libunwind"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=3fced11d6df719b47505837a51c16ae5"
5
6SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
7
8inherit autotools
9
10PACKAGECONFIG ??= ""
11PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,lzma"
12
13EXTRA_OECONF_arm = "--enable-debug-frame"
14EXTRA_OECONF_aarch64 = "--enable-debug-frame"
15
16CFLAGS += "${ATOMICOPS}"
17ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
18ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1"
19ATOMICOPS ?= ""
20
21LDFLAGS += "${LIBATOMICS}"
22LIBATOMICS_armv5 = "-latomic_ops"
23LIBATOMICS_armv4 = "-latomic_ops"
24LIBATOMICS ?= ""
25
26DEPENDS += "${DEPLIBATOMICS}"
27DEPLIBATOMICS_armv5 = "libatomics-ops"
28DEPLIBATOMICS_armv4 = "libatomics-ops"
29DEPLIBATOMICS ?= ""
30
31BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb
new file mode 100644
index 0000000000..ee6f522d68
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -0,0 +1,11 @@
1require libunwind.inc
2
3SRC_URI += "\
4 file://Support-building-with-older-compilers.patch \
5 file://AArch64-port.patch \
6 file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
7 file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
8"
9
10SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
11SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
diff --git a/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
new file mode 100644
index 0000000000..535a7384cb
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
@@ -0,0 +1,47 @@
1From 7b3df100346128d780f218b881d563d1fd12e310 Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Mon, 20 Oct 2014 13:46:10 +1100
4Subject: [PATCH] Revert "Blacklist ARM gcc 4.8.0, 4.8.1, 4.8.2"
5
6This reverts commit 4b79310aa3d408ba30fee02cc497a68072d38a99.
7OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
8properly.
9
10Upstream-Status: Inappropriate [OE specific]
11
12Signed-off-by: Jonathan Liu <net147@gmail.com>
13---
14 urcu/compiler.h | 19 -------------------
15 1 file changed, 19 deletions(-)
16
17diff --git a/urcu/compiler.h b/urcu/compiler.h
18index 1e30903..19534f0 100644
19--- a/urcu/compiler.h
20+++ b/urcu/compiler.h
21@@ -108,23 +108,4 @@
22
23 #define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
24
25-/*
26- * Don't allow compiling with buggy compiler.
27- */
28-
29-#ifdef __GNUC__
30-# define URCU_GCC_VERSION (__GNUC__ * 10000 \
31- + __GNUC_MINOR__ * 100 \
32- + __GNUC_PATCHLEVEL__)
33-
34-/*
35- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
36- */
37-# ifdef __ARMEL__
38-# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
39-# error Your gcc version produces clobbered frame accesses
40-# endif
41-# endif
42-#endif
43-
44 #endif /* _URCU_COMPILER_H */
45--
462.1.2
47
diff --git a/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch b/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch
new file mode 100644
index 0000000000..fe43f60069
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch
@@ -0,0 +1,11 @@
1diff -ruN a/configure.ac b/configure.ac
2--- a/configure.ac 2014-11-17 15:17:03.671908297 +0100
3+++ b/configure.ac 2014-11-17 15:19:20.990058779 +0100
4@@ -79,6 +79,7 @@
5 [arm*], [ARCHTYPE="arm"],
6 [mips*], [ARCHTYPE="mips"],
7 [tile*], [ARCHTYPE="gcc"],
8+ [aarch64], [ARCHTYPE="gcc"],
9 [ARCHTYPE="unknown"]
10 )
11
diff --git a/meta/recipes-support/liburcu/liburcu_0.8.4.bb b/meta/recipes-support/liburcu/liburcu_0.8.4.bb
new file mode 100644
index 0000000000..09516dadc5
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu_0.8.4.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Userspace RCU (read-copy-update) library"
2HOMEPAGE = "http://lttng.org/urcu"
3BUGTRACKER = "http://lttng.org/project/issues"
4
5LICENSE = "LGPLv2.1+ & MIT-style"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
7 file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
8 file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
9
10SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
11 file://patch-to-support-aarch64-builds-using-gcc-at.patch \
12 file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \
13 "
14
15SRC_URI[md5sum] = "2ca6671b20a550aa0e8020a1a9a96fd4"
16SRC_URI[sha256sum] = "96c0a157e94a15b1506efe9aedd98145e6eb41a3fbcf5b0d118b7a783b22fe12"
17
18S = "${WORKDIR}/userspace-rcu-${PV}"
19CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
20inherit autotools
diff --git a/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
new file mode 100644
index 0000000000..74761d6a44
--- /dev/null
+++ b/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
@@ -0,0 +1,37 @@
1SUMMARY = "libusb-0.1 compatibility layer for libusb1"
2DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \
3that aims to look, feel and behave exactly like libusb-0.1"
4HOMEPAGE = "http://www.libusb.org/"
5BUGTRACKER = "http://www.libusb.org/report"
6SECTION = "libs"
7
8LICENSE = "LGPLv2.1+"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423"
10DEPENDS = "libusb1"
11
12# Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0),
13# so here libusb-0.1 is removed completely instead of adding virtual/libusb0.
14# Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power
15# consumption.
16PROVIDES = "libusb virtual/libusb0"
17BBCLASSEXTEND = "native nativesdk"
18
19PE = "1"
20
21SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2"
22
23SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
24SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"
25
26BINCONFIG = "${bindir}/libusb-config"
27
28inherit autotools pkgconfig binconfig-disabled lib_package
29
30EXTRA_OECONF = "--libdir=${base_libdir}"
31
32do_install_append() {
33 install -d ${D}${libdir}
34 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
35 mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
36 fi
37}
diff --git a/meta/recipes-support/libusb/libusb1_1.0.19.bb b/meta/recipes-support/libusb/libusb1_1.0.19.bb
new file mode 100644
index 0000000000..a20e1fcdb8
--- /dev/null
+++ b/meta/recipes-support/libusb/libusb1_1.0.19.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Userspace library to access USB (version 1.0)"
2HOMEPAGE = "http://libusb.sf.net"
3BUGTRACKER = "http://www.libusb.org/report"
4SECTION = "libs"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
8
9BBCLASSEXTEND = "native nativesdk"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
12 "
13
14SRC_URI[md5sum] = "f9e2bb5879968467e5ca756cb4e1fa7e"
15SRC_URI[sha256sum] = "6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840"
16
17S = "${WORKDIR}/libusb-${PV}"
18
19inherit autotools pkgconfig
20
21# Don't configure udev by default since it will cause a circular
22# dependecy with udev package, which depends on libusb
23EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
24
25do_install_append() {
26 install -d ${D}${libdir}
27 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
28 mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
29 fi
30}
31
32FILES_${PN} += "${base_libdir}/*.so.*"
33
34FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
new file mode 100644
index 0000000000..89d14c944d
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
@@ -0,0 +1,118 @@
1Use pkg-config to find gcrypt and libxml2.
2
3Upstream-Status: Pending [libxml2 is upstreamable]
4
5RP 2014/5/22
6
7Index: libxslt-1.1.28/configure.in
8===================================================================
9--- libxslt-1.1.28.orig/configure.in 2014-05-13 16:46:02.278474967 +0000
10+++ libxslt-1.1.28/configure.in 2014-05-13 16:53:56.510472561 +0000
11@@ -376,6 +376,8 @@
12 AC_SUBST(PYTHON_SUBDIR)
13 AC_SUBST(PYTHON_LIBS)
14
15+PKG_PROG_PKG_CONFIG
16+
17 AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
18 WITH_CRYPTO=0
19 if test "$with_crypto" = "no" ; then
20@@ -391,26 +393,13 @@
21 WITH_CRYPTO=1
22 ;;
23 *)
24- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
25- if test "$LIBGCRYPT_CONFIG" != "no" ; then
26- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
27- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
28- then
29- LIBGCRYPT_CFLAGS=""
30- LIBGCRYPT_LIBS=""
31- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
32- else
33- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
34- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
35- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
36- echo 'Crypto extensions will be available.'
37+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
38+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
39+ echo 'Crypto extensions will be available.'
40 WITH_CRYPTO=1
41- fi
42- else
43- LIBGCRYPT_CFLAGS=""
44- LIBGCRYPT_LIBS=""
45- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
46- fi
47+ ], [
48+ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
49+ ])
50 esac
51 fi
52 AC_SUBST(WITH_CRYPTO)
53@@ -471,24 +460,8 @@
54 dnl some tweaking - David Härdeman 30/10/2001
55 dnl
56
57-LIBXML_CONFIG_PREFIX=""
58 LIBXML_SRC=""
59
60-AC_ARG_WITH(libxml-prefix,
61- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
62- LIBXML_CONFIG_PREFIX=$withval
63-)
64-
65-AC_ARG_WITH(libxml-include-prefix,
66- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
67- LIBXML_CFLAGS="-I$withval"
68-)
69-
70-AC_ARG_WITH(libxml-libs-prefix,
71- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
72- LIBXML_LIBS="-L$withval"
73-)
74-
75 AC_ARG_WITH(libxml-src,
76 [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
77 LIBXML_SRC="$withval"
78@@ -551,28 +524,9 @@
79 fi
80 fi
81
82-dnl
83-dnl make sure xml2-config is executable,
84-dnl test version and init our variables
85-dnl
86-
87-if ${XML_CONFIG} --libs print > /dev/null 2>&1
88-then
89- XMLVERS=`$XML_CONFIG --version`
90- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
91- then
92- AC_MSG_RESULT($XMLVERS found)
93- else
94- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
95- fi
96- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
97- if test "x$LIBXML_SRC" = "x"; then
98- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
99- fi
100-else
101- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
102-fi
103-
104+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
105+ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
106+)
107
108 AC_SUBST(CFLAGS)
109 AC_SUBST(CPPFLAGS)
110@@ -597,7 +551,7 @@
111
112 if test "$with_plugins" = "yes" ; then
113 AC_MSG_CHECKING([libxml2 module support])
114- WITH_MODULES="`$XML_CONFIG --modules`"
115+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
116 if test "${WITH_MODULES}" = "1"; then
117 AC_MSG_RESULT(yes)
118 else
diff --git a/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
new file mode 100644
index 0000000000..16a801010c
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: libxslt-1.1.27/libexslt.pc.in
4===================================================================
5--- libxslt-1.1.27.orig/libexslt.pc.in
6+++ libxslt-1.1.27/libexslt.pc.in
7@@ -8,5 +8,5 @@ Name: libexslt
8 Version: @LIBEXSLT_VERSION@
9 Description: EXSLT Extension library
10 Requires: libxml-2.0
11-Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
12+Libs: -lexslt @EXSLT_LIBDIR@ @EXSLT_LIBS@
13 Cflags: @EXSLT_INCLUDEDIR@
14Index: libxslt-1.1.27/libxslt.pc.in
15===================================================================
16--- libxslt-1.1.27.orig/libxslt.pc.in
17+++ libxslt-1.1.27/libxslt.pc.in
18@@ -8,5 +8,5 @@ Name: libxslt
19 Version: @VERSION@
20 Description: XSLT library version 2.
21 Requires: libxml-2.0
22-Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
23+Libs: -lxslt @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
24 Cflags: @XSLT_INCLUDEDIR@
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
new file mode 100644
index 0000000000..ded883e457
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
@@ -0,0 +1,46 @@
1SUMMARY = "GNOME XSLT library"
2HOMEPAGE = "http://xmlsoft.org/XSLT/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
7
8SECTION = "libs"
9DEPENDS = "libxml2"
10
11SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \
12 file://pkgconfig_fix.patch \
13 file://pkgconfig.patch"
14
15SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7"
16SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c"
17S = "${WORKDIR}/libxslt-${PV}"
18
19BINCONFIG = "${bindir}/xslt-config"
20
21inherit autotools pkgconfig binconfig-disabled lib_package
22
23# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
24do_configure_prepend () {
25 sed -i -e 's/ansidecl.h//' ${S}/configure.in
26
27 # The timestamps in the 1.1.28 tarball are messed up causing this file to
28 # appear out of date. Touch it so that we don't try to regenerate it.
29 touch ${S}/doc/xsltproc.1
30}
31
32EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
33# older versions of this recipe had ${PN}-utils
34RPROVIDES_${PN}-bin += "${PN}-utils"
35RCONFLICTS_${PN}-bin += "${PN}-utils"
36RREPLACES_${PN}-bin += "${PN}-utils"
37
38
39do_install_append_class-native () {
40 create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
41}
42
43FILES_${PN} += "${libdir}/libxslt-plugins"
44FILES_${PN}-dev += "${libdir}/xsltConf.sh"
45
46BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/lz4/lz4_svn.bb b/meta/recipes-support/lz4/lz4_svn.bb
new file mode 100644
index 0000000000..bbd5d9391f
--- /dev/null
+++ b/meta/recipes-support/lz4/lz4_svn.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Extremely Fast Compression algorithm"
2DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."
3
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=0b0d063f37a4477b54af2459477dcafd \
6 file://Makefile;md5=68938168b5cee826476a13e1b8d1f480"
7
8# Upstream names releases after SVN revs
9SRCREV = "122"
10PV = "r${SRCREV}"
11
12SRC_URI = "svn://lz4.googlecode.com/svn/;module=trunk;protocol=http"
13
14S = "${WORKDIR}/trunk"
15
16EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
17
18do_install() {
19 oe_runmake install
20}
21
22BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 0000000000..c26891b46f
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
@@ -0,0 +1,70 @@
1From: Simon McVittie <smcv@debian.org>
2Date: Sun, 23 Nov 2014 22:50:33 +0000
3Subject: Use memcpy() instead of reinventing it
4
5gcc inlines memcpy() with results as fast as handwritten code (at
6least in my brief testing with lzop), and knows the alignment
7constraints for our architectures.
8
9Change suggested by Julian Taylor.
10
11Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
12
13Upstream-Status: Pending
14Signed-off-by: Saul Wold <sgw@linux.intel.com>
15---
16 minilzo/minilzo.c | 14 ++++++++++++++
17 src/lzo_func.h | 14 ++++++++++++++
18 2 files changed, 28 insertions(+)
19
20
21diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
22index ab2be5f..6913c2f 100644
23--- a/minilzo/minilzo.c
24+++ b/minilzo/minilzo.c
25@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
26 if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
27 LZO_BLOCK_END
28
29+/* Debian-specific change: we know that our compiler inlines memcpy() with
30+ * constant n to be as fast as handwritten code, and knows which architectures
31+ * need things correctly aligned. */
32+#undef LZO_MEMOPS_COPY1
33+#undef LZO_MEMOPS_COPY2
34+#undef LZO_MEMOPS_COPY4
35+#undef LZO_MEMOPS_COPY8
36+#undef LZO_MEMOPS_COPYN
37+#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
38+#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
39+#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
40+#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
41+#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
42+
43 __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
44 {
45 lzo_uint16_t v;
46diff --git a/src/lzo_func.h b/src/lzo_func.h
47index dfaa676..1cc1b53 100644
48--- a/src/lzo_func.h
49+++ b/src/lzo_func.h
50@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
51 if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
52 LZO_BLOCK_END
53
54+/* Debian-specific change: we know that our compiler inlines memcpy() with
55+ * constant n to be as fast as handwritten code, and knows which architectures
56+ * need things correctly aligned. */
57+#undef LZO_MEMOPS_COPY1
58+#undef LZO_MEMOPS_COPY2
59+#undef LZO_MEMOPS_COPY4
60+#undef LZO_MEMOPS_COPY8
61+#undef LZO_MEMOPS_COPYN
62+#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
63+#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
64+#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
65+#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
66+#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
67+
68 __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
69 {
70 lzo_uint16_t v;
diff --git a/meta/recipes-support/lzo/lzo/acinclude.m4 b/meta/recipes-support/lzo/lzo/acinclude.m4
new file mode 100644
index 0000000000..c4d2ccd5b5
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo/acinclude.m4
@@ -0,0 +1,358 @@
1
2AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
3AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
4])#
5
6AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
7AC_HEADER_TIME
8AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
9])#
10
11AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
12AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
13])#
14
15
16AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
17AC_CHECK_SIZEOF(short)
18AC_CHECK_SIZEOF(int)
19AC_CHECK_SIZEOF(long)
20
21AC_CHECK_SIZEOF(long long)
22AC_CHECK_SIZEOF(__int16)
23AC_CHECK_SIZEOF(__int32)
24AC_CHECK_SIZEOF(__int64)
25
26AC_CHECK_SIZEOF(void *)
27AC_CHECK_SIZEOF(size_t)
28AC_CHECK_SIZEOF(ptrdiff_t)
29])#
30
31
32# /***********************************************************************
33# // Check for ACC_conformance
34# ************************************************************************/
35
36AC_DEFUN([mfx_ACC_ACCCHK], [
37mfx_tmp=$1
38mfx_save_CPPFLAGS=$CPPFLAGS
39dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
40test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
41
42AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
43
44AC_LANG_CONFTEST([AC_LANG_PROGRAM(
45[[#define ACC_CONFIG_NO_HEADER 1
46#include "acc/acc.h"
47#include "acc/acc_incd.h"
48#undef ACCCHK_ASSERT
49#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
50#include "acc/acc_chk.ch"
51#undef ACCCHK_ASSERT
52static void test_acc_compile_time_assert(void) {
53#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
54#include "acc/acc_chk.ch"
55#undef ACCCHK_ASSERT
56}
57#undef NDEBUG
58#include <assert.h>
59static int test_acc_run_time_assert(int r) {
60#define ACCCHK_ASSERT(expr) assert(expr);
61#include "acc/acc_chk.ch"
62#undef ACCCHK_ASSERT
63return r;
64}
65]], [[
66test_acc_compile_time_assert();
67if (test_acc_run_time_assert(1) != 1) return 1;
68]]
69)])
70
71mfx_tmp=FAILED
72_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
73rm -f conftest.$ac_ext conftest.$ac_objext
74
75CPPFLAGS=$mfx_save_CPPFLAGS
76
77AC_MSG_RESULT([$mfx_tmp])
78case x$mfx_tmp in
79 xpassed | xyes) ;;
80 *)
81 AC_MSG_NOTICE([])
82 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
83 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
84 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
85 AC_MSG_NOTICE([Thanks for your support.])
86 AC_MSG_NOTICE([])
87 AC_MSG_ERROR([ACC conformance test failed. Stop.])
88dnl AS_EXIT
89 ;;
90esac
91])# mfx_ACC_ACCCHK
92
93
94# /***********************************************************************
95# // Check for ACC_conformance
96# ************************************************************************/
97
98AC_DEFUN([mfx_MINIACC_ACCCHK], [
99mfx_tmp=$1
100mfx_save_CPPFLAGS=$CPPFLAGS
101dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
102test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
103
104AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
105
106AC_LANG_CONFTEST([AC_LANG_PROGRAM(
107[[#define ACC_CONFIG_NO_HEADER 1
108#define ACC_WANT_ACC_INCD_H 1
109#include $2
110
111#define ACC_WANT_ACC_CHK_CH 1
112#undef ACCCHK_ASSERT
113#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
114#include $2
115
116#define ACC_WANT_ACC_CHK_CH 1
117#undef ACCCHK_ASSERT
118#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
119static void test_acc_compile_time_assert(void) {
120#include $2
121}
122
123#undef NDEBUG
124#include <assert.h>
125#define ACC_WANT_ACC_CHK_CH 1
126#undef ACCCHK_ASSERT
127#define ACCCHK_ASSERT(expr) assert(expr);
128static int test_acc_run_time_assert(int r) {
129#include $2
130return r;
131}
132]], [[
133test_acc_compile_time_assert();
134if (test_acc_run_time_assert(1) != 1) return 1;
135]]
136)])
137
138mfx_tmp=FAILED
139_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
140rm -f conftest.$ac_ext conftest.$ac_objext
141
142CPPFLAGS=$mfx_save_CPPFLAGS
143
144AC_MSG_RESULT([$mfx_tmp])
145case x$mfx_tmp in
146 xpassed | xyes) ;;
147 *)
148 AC_MSG_NOTICE([])
149 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
150 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
151 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
152 AC_MSG_NOTICE([Thanks for your support.])
153 AC_MSG_NOTICE([])
154 AC_MSG_ERROR([ACC conformance test failed. Stop.])
155dnl AS_EXIT
156 ;;
157esac
158])# mfx_MINIACC_ACCCHK
159
160
161
162# serial 1
163
164AC_DEFUN([mfx_PROG_CPPFLAGS], [
165AC_MSG_CHECKING([whether the C preprocessor needs special flags])
166
167AC_LANG_CONFTEST([AC_LANG_PROGRAM(
168[[#include <limits.h>
169#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
170# include "your C preprocessor is broken 1"
171#elif (0xffffu == 0xfffffffful)
172# include "your C preprocessor is broken 2"
173#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
174# include "your C preprocessor is broken 3"
175#endif
176]], [[ ]]
177)])
178
179mfx_save_CPPFLAGS=$CPPFLAGS
180mfx_tmp=ERROR
181for mfx_arg in "" -no-cpp-precomp
182do
183 CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
184 _AC_COMPILE_IFELSE([],
185[mfx_tmp=$mfx_arg
186break])
187done
188CPPFLAGS=$mfx_save_CPPFLAGS
189rm -f conftest.$ac_ext conftest.$ac_objext
190case x$mfx_tmp in
191 x)
192 AC_MSG_RESULT([none needed]) ;;
193 xERROR)
194 AC_MSG_RESULT([ERROR])
195 AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
196 ;;
197 *)
198 AC_MSG_RESULT([$mfx_tmp])
199 CPPFLAGS="$mfx_tmp $CPPFLAGS"
200 ;;
201esac
202])# mfx_PROG_CPPFLAGS
203
204
205
206# serial 3
207
208AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
209AC_CACHE_CHECK([whether limits.h is sane],
210mfx_cv_header_sane_limits_h,
211[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
212#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
213# if defined(__APPLE__) && defined(__GNUC__)
214# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
215# else
216# include "your preprocessor is broken"
217# endif
218#endif
219#define MFX_0xffff 0xffff
220#define MFX_0xffffffffL 4294967295ul
221#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
222# include "error CHAR_BIT"
223#endif
224#if !defined(UCHAR_MAX)
225# include "error UCHAR_MAX 1"
226#endif
227#if !defined(USHRT_MAX)
228# include "error USHRT_MAX 1"
229#endif
230#if !defined(UINT_MAX)
231# include "error UINT_MAX 1"
232#endif
233#if !defined(ULONG_MAX)
234# include "error ULONG_MAX 1"
235#endif
236#if !defined(SHRT_MAX)
237# include "error SHRT_MAX 1"
238#endif
239#if !defined(INT_MAX)
240# include "error INT_MAX 1"
241#endif
242#if !defined(LONG_MAX)
243# include "error LONG_MAX 1"
244#endif
245#if (UCHAR_MAX < 1)
246# include "error UCHAR_MAX 2"
247#endif
248#if (USHRT_MAX < 1)
249# include "error USHRT_MAX 2"
250#endif
251#if (UINT_MAX < 1)
252# include "error UINT_MAX 2"
253#endif
254#if (ULONG_MAX < 1)
255# include "error ULONG_MAX 2"
256#endif
257#if (UCHAR_MAX < 0xff)
258# include "error UCHAR_MAX 3"
259#endif
260#if (USHRT_MAX < MFX_0xffff)
261# include "error USHRT_MAX 3"
262#endif
263#if (UINT_MAX < MFX_0xffff)
264# include "error UINT_MAX 3"
265#endif
266#if (ULONG_MAX < MFX_0xffffffffL)
267# include "error ULONG_MAX 3"
268#endif
269#if (USHRT_MAX > UINT_MAX)
270# include "error USHRT_MAX vs UINT_MAX"
271#endif
272#if (UINT_MAX > ULONG_MAX)
273# include "error UINT_MAX vs ULONG_MAX"
274#endif
275]], [[
276#if (USHRT_MAX == MFX_0xffff)
277{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
278#elif (USHRT_MAX >= MFX_0xffff)
279{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
280#endif
281#if (UINT_MAX == MFX_0xffff)
282{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
283#elif (UINT_MAX >= MFX_0xffff)
284{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
285#endif
286#if (ULONG_MAX == MFX_0xffff)
287{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
288#elif (ULONG_MAX >= MFX_0xffff)
289{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
290#endif
291#if (USHRT_MAX == MFX_0xffffffffL)
292{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
293#elif (USHRT_MAX >= MFX_0xffffffffL)
294{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
295#endif
296#if (UINT_MAX == MFX_0xffffffffL)
297{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
298#elif (UINT_MAX >= MFX_0xffffffffL)
299{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
300#endif
301#if (ULONG_MAX == MFX_0xffffffffL)
302{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
303#elif (ULONG_MAX >= MFX_0xffffffffL)
304{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
305#endif
306]])],
307[mfx_cv_header_sane_limits_h=yes],
308[mfx_cv_header_sane_limits_h=no])])
309])
310
311# /***********************************************************************
312# // standard
313# ************************************************************************/
314
315AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
316AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
317])#
318
319
320# /***********************************************************************
321# //
322# ************************************************************************/
323
324dnl more types which are not yet covered by ACC
325
326AC_DEFUN([mfx_CHECK_SIZEOF], [
327AC_CHECK_SIZEOF(__int32)
328AC_CHECK_SIZEOF(intmax_t)
329AC_CHECK_SIZEOF(uintmax_t)
330AC_CHECK_SIZEOF(intptr_t)
331AC_CHECK_SIZEOF(uintptr_t)
332
333AC_CHECK_SIZEOF(float)
334AC_CHECK_SIZEOF(double)
335AC_CHECK_SIZEOF(long double)
336
337AC_CHECK_SIZEOF(dev_t)
338AC_CHECK_SIZEOF(fpos_t)
339AC_CHECK_SIZEOF(mode_t)
340AC_CHECK_SIZEOF(off_t)
341AC_CHECK_SIZEOF(ssize_t)
342AC_CHECK_SIZEOF(time_t)
343])#
344
345
346
347AC_DEFUN([mfx_CHECK_LIB_WINMM], [
348if test "X$GCC" = Xyes; then
349case $host_os in
350cygwin* | mingw* | pw32*)
351 test "X$LIBS" != "X" && LIBS="$LIBS "
352 LIBS="${LIBS}-lwinmm" ;;
353*)
354 ;;
355esac
356fi
357])#
358
diff --git a/meta/recipes-support/lzo/lzo_2.08.bb b/meta/recipes-support/lzo/lzo_2.08.bb
new file mode 100644
index 0000000000..af06e29a6f
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo_2.08.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Lossless data compression library"
2HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
3SECTION = "libs"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://src/lzo_init.c;beginline=5;endline=25;md5=a6e25df9a83b24629e847846ccdd8054"
7
8SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
9 file://0001-Use-memcpy-instead-of-reinventing-it.patch \
10 file://acinclude.m4 \
11 "
12
13SRC_URI[md5sum] = "fcec64c26a0f4f4901468f360029678f"
14SRC_URI[sha256sum] = "ac1b3e4dee46febe9fd28737eb7f5692d3232ef1a01da10444394c3d47536614"
15
16inherit autotools
17
18EXTRA_OECONF = "--enable-shared"
19
20do_configure_prepend () {
21 cp ${WORKDIR}/acinclude.m4 ${S}/
22}
23
24BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/lzop/lzop/acinclude.m4 b/meta/recipes-support/lzop/lzop/acinclude.m4
new file mode 100644
index 0000000000..0029c19c7d
--- /dev/null
+++ b/meta/recipes-support/lzop/lzop/acinclude.m4
@@ -0,0 +1,390 @@
1
2AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
3AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
4])#
5
6AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
7AC_HEADER_TIME
8AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
9])#
10
11AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
12AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
13])#
14
15
16AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
17AC_CHECK_SIZEOF(short)
18AC_CHECK_SIZEOF(int)
19AC_CHECK_SIZEOF(long)
20
21AC_CHECK_SIZEOF(long long)
22AC_CHECK_SIZEOF(__int16)
23AC_CHECK_SIZEOF(__int32)
24AC_CHECK_SIZEOF(__int64)
25
26AC_CHECK_SIZEOF(void *)
27AC_CHECK_SIZEOF(size_t)
28AC_CHECK_SIZEOF(ptrdiff_t)
29])#
30
31
32# /***********************************************************************
33# // Check for ACC_conformance
34# ************************************************************************/
35
36AC_DEFUN([mfx_ACC_ACCCHK], [
37mfx_tmp=$1
38mfx_save_CPPFLAGS=$CPPFLAGS
39dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
40test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
41
42AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
43
44AC_LANG_CONFTEST([AC_LANG_PROGRAM(
45[[#define ACC_CONFIG_NO_HEADER 1
46#include "acc/acc.h"
47#include "acc/acc_incd.h"
48#undef ACCCHK_ASSERT
49#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
50#include "acc/acc_chk.ch"
51#undef ACCCHK_ASSERT
52static void test_acc_compile_time_assert(void) {
53#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
54#include "acc/acc_chk.ch"
55#undef ACCCHK_ASSERT
56}
57#undef NDEBUG
58#include <assert.h>
59static int test_acc_run_time_assert(int r) {
60#define ACCCHK_ASSERT(expr) assert(expr);
61#include "acc/acc_chk.ch"
62#undef ACCCHK_ASSERT
63return r;
64}
65]], [[
66test_acc_compile_time_assert();
67if (test_acc_run_time_assert(1) != 1) return 1;
68]]
69)])
70
71mfx_tmp=FAILED
72_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
73rm -f conftest.$ac_ext conftest.$ac_objext
74
75CPPFLAGS=$mfx_save_CPPFLAGS
76
77AC_MSG_RESULT([$mfx_tmp])
78case x$mfx_tmp in
79 xpassed | xyes) ;;
80 *)
81 AC_MSG_NOTICE([])
82 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
83 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
84 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
85 AC_MSG_NOTICE([Thanks for your support.])
86 AC_MSG_NOTICE([])
87 AC_MSG_ERROR([ACC conformance test failed. Stop.])
88dnl AS_EXIT
89 ;;
90esac
91])# mfx_ACC_ACCCHK
92
93
94# /***********************************************************************
95# // Check for ACC_conformance
96# ************************************************************************/
97
98AC_DEFUN([mfx_MINIACC_ACCCHK], [
99mfx_tmp=$1
100mfx_save_CPPFLAGS=$CPPFLAGS
101dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
102test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
103
104AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
105
106AC_LANG_CONFTEST([AC_LANG_PROGRAM(
107[[#define ACC_CONFIG_NO_HEADER 1
108#define ACC_WANT_ACC_INCD_H 1
109#include $2
110
111#define ACC_WANT_ACC_CHK_CH 1
112#undef ACCCHK_ASSERT
113#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
114#include $2
115
116#define ACC_WANT_ACC_CHK_CH 1
117#undef ACCCHK_ASSERT
118#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
119static void test_acc_compile_time_assert(void) {
120#include $2
121}
122
123#undef NDEBUG
124#include <assert.h>
125#define ACC_WANT_ACC_CHK_CH 1
126#undef ACCCHK_ASSERT
127#define ACCCHK_ASSERT(expr) assert(expr);
128static int test_acc_run_time_assert(int r) {
129#include $2
130return r;
131}
132]], [[
133test_acc_compile_time_assert();
134if (test_acc_run_time_assert(1) != 1) return 1;
135]]
136)])
137
138mfx_tmp=FAILED
139_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
140rm -f conftest.$ac_ext conftest.$ac_objext
141
142CPPFLAGS=$mfx_save_CPPFLAGS
143
144AC_MSG_RESULT([$mfx_tmp])
145case x$mfx_tmp in
146 xpassed | xyes) ;;
147 *)
148 AC_MSG_NOTICE([])
149 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
150 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
151 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
152 AC_MSG_NOTICE([Thanks for your support.])
153 AC_MSG_NOTICE([])
154 AC_MSG_ERROR([ACC conformance test failed. Stop.])
155dnl AS_EXIT
156 ;;
157esac
158])# mfx_MINIACC_ACCCHK
159
160
161
162# serial 1
163
164AC_DEFUN([mfx_PROG_CPPFLAGS], [
165AC_MSG_CHECKING([whether the C preprocessor needs special flags])
166
167AC_LANG_CONFTEST([AC_LANG_PROGRAM(
168[[#include <limits.h>
169#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
170# include "your C preprocessor is broken 1"
171#elif (0xffffu == 0xfffffffful)
172# include "your C preprocessor is broken 2"
173#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
174# include "your C preprocessor is broken 3"
175#endif
176]], [[ ]]
177)])
178
179mfx_save_CPPFLAGS=$CPPFLAGS
180mfx_tmp=ERROR
181for mfx_arg in "" -no-cpp-precomp
182do
183 CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
184 _AC_COMPILE_IFELSE([],
185[mfx_tmp=$mfx_arg
186break])
187done
188CPPFLAGS=$mfx_save_CPPFLAGS
189rm -f conftest.$ac_ext conftest.$ac_objext
190case x$mfx_tmp in
191 x)
192 AC_MSG_RESULT([none needed]) ;;
193 xERROR)
194 AC_MSG_RESULT([ERROR])
195 AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
196 ;;
197 *)
198 AC_MSG_RESULT([$mfx_tmp])
199 CPPFLAGS="$mfx_tmp $CPPFLAGS"
200 ;;
201esac
202])# mfx_PROG_CPPFLAGS
203
204
205
206# serial 3
207
208AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
209AC_CACHE_CHECK([whether limits.h is sane],
210mfx_cv_header_sane_limits_h,
211[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
212#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
213# if defined(__APPLE__) && defined(__GNUC__)
214# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
215# else
216# include "your preprocessor is broken"
217# endif
218#endif
219#define MFX_0xffff 0xffff
220#define MFX_0xffffffffL 4294967295ul
221#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
222# include "error CHAR_BIT"
223#endif
224#if !defined(UCHAR_MAX)
225# include "error UCHAR_MAX 1"
226#endif
227#if !defined(USHRT_MAX)
228# include "error USHRT_MAX 1"
229#endif
230#if !defined(UINT_MAX)
231# include "error UINT_MAX 1"
232#endif
233#if !defined(ULONG_MAX)
234# include "error ULONG_MAX 1"
235#endif
236#if !defined(SHRT_MAX)
237# include "error SHRT_MAX 1"
238#endif
239#if !defined(INT_MAX)
240# include "error INT_MAX 1"
241#endif
242#if !defined(LONG_MAX)
243# include "error LONG_MAX 1"
244#endif
245#if (UCHAR_MAX < 1)
246# include "error UCHAR_MAX 2"
247#endif
248#if (USHRT_MAX < 1)
249# include "error USHRT_MAX 2"
250#endif
251#if (UINT_MAX < 1)
252# include "error UINT_MAX 2"
253#endif
254#if (ULONG_MAX < 1)
255# include "error ULONG_MAX 2"
256#endif
257#if (UCHAR_MAX < 0xff)
258# include "error UCHAR_MAX 3"
259#endif
260#if (USHRT_MAX < MFX_0xffff)
261# include "error USHRT_MAX 3"
262#endif
263#if (UINT_MAX < MFX_0xffff)
264# include "error UINT_MAX 3"
265#endif
266#if (ULONG_MAX < MFX_0xffffffffL)
267# include "error ULONG_MAX 3"
268#endif
269#if (USHRT_MAX > UINT_MAX)
270# include "error USHRT_MAX vs UINT_MAX"
271#endif
272#if (UINT_MAX > ULONG_MAX)
273# include "error UINT_MAX vs ULONG_MAX"
274#endif
275]], [[
276#if (USHRT_MAX == MFX_0xffff)
277{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
278#elif (USHRT_MAX >= MFX_0xffff)
279{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
280#endif
281#if (UINT_MAX == MFX_0xffff)
282{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
283#elif (UINT_MAX >= MFX_0xffff)
284{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
285#endif
286#if (ULONG_MAX == MFX_0xffff)
287{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
288#elif (ULONG_MAX >= MFX_0xffff)
289{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
290#endif
291#if (USHRT_MAX == MFX_0xffffffffL)
292{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
293#elif (USHRT_MAX >= MFX_0xffffffffL)
294{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
295#endif
296#if (UINT_MAX == MFX_0xffffffffL)
297{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
298#elif (UINT_MAX >= MFX_0xffffffffL)
299{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
300#endif
301#if (ULONG_MAX == MFX_0xffffffffL)
302{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
303#elif (ULONG_MAX >= MFX_0xffffffffL)
304{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
305#endif
306]])],
307[mfx_cv_header_sane_limits_h=yes],
308[mfx_cv_header_sane_limits_h=no])])
309])
310
311# /***********************************************************************
312# // standard
313# ************************************************************************/
314
315AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
316AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
317])#
318
319
320# /***********************************************************************
321# //
322# ************************************************************************/
323
324dnl more types which are not yet covered by ACC
325
326AC_DEFUN([mfx_CHECK_SIZEOF], [
327AC_CHECK_SIZEOF(__int32)
328AC_CHECK_SIZEOF(intmax_t)
329AC_CHECK_SIZEOF(uintmax_t)
330AC_CHECK_SIZEOF(intptr_t)
331AC_CHECK_SIZEOF(uintptr_t)
332
333AC_CHECK_SIZEOF(float)
334AC_CHECK_SIZEOF(double)
335AC_CHECK_SIZEOF(long double)
336
337AC_CHECK_SIZEOF(dev_t)
338AC_CHECK_SIZEOF(fpos_t)
339AC_CHECK_SIZEOF(mode_t)
340AC_CHECK_SIZEOF(off_t)
341AC_CHECK_SIZEOF(ssize_t)
342AC_CHECK_SIZEOF(time_t)
343])#
344
345
346
347AC_DEFUN([mfx_CHECK_LIB_WINMM], [
348if test "X$GCC" = Xyes; then
349case $host_os in
350cygwin* | mingw* | pw32*)
351 test "X$LIBS" != "X" && LIBS="$LIBS "
352 LIBS="${LIBS}-lwinmm" ;;
353*)
354 ;;
355esac
356fi
357])#
358
359#serial 6
360
361dnl From Paul Eggert.
362
363# Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
364# if it exists.
365
366AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
367 [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
368 ac_cv_struct_st_mtim_nsec,
369 [ac_save_CPPFLAGS="$CPPFLAGS"
370 ac_cv_struct_st_mtim_nsec=no
371 # tv_nsec -- the usual case
372 # _tv_nsec -- Solaris 2.6, if
373 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
374 # && !defined __EXTENSIONS__)
375 # st__tim.tv_nsec -- UnixWare 2.1.2
376 for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
377 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
378 AC_TRY_COMPILE([#include <sys/types.h>
379#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
380 [ac_cv_struct_st_mtim_nsec=$ac_val; break])
381 done
382 CPPFLAGS="$ac_save_CPPFLAGS"])
383
384 if test $ac_cv_struct_st_mtim_nsec != no; then
385 AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
386 [Define to be the nanoseconds member of struct stat's st_mtim,
387 if it exists.])
388 fi
389 ]
390)
diff --git a/meta/recipes-support/lzop/lzop_1.03.bb b/meta/recipes-support/lzop/lzop_1.03.bb
new file mode 100644
index 0000000000..abfc81cfb9
--- /dev/null
+++ b/meta/recipes-support/lzop/lzop_1.03.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Real-time file compressor"
2DESCRIPTION = "lzop is a compression utility which is designed to be a companion to gzip. \n\
3It is based on the LZO data compression library and its main advantages over \n\
4gzip are much higher compression and decompression speed at the cost of some \n\
5compression ratio. The lzop compression utility was designed with the goals \n\
6of reliability, speed, portability and with reasonable drop-in compatibility \n\
7to gzip."
8DEPENDS += "lzo"
9
10LICENSE = "GPLv2+"
11LIC_FILES_CHKSUM = "file://COPYING;md5=dfeaf3dc4beef4f5a7bdbc35b197f39e \
12 file://src/lzop.c;beginline=5;endline=21;md5=6797bd3ed0a1a49327b7ebf9366ebd86"
13
14SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
15 file://acinclude.m4"
16SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905"
17SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
18
19inherit autotools
20
21do_configure () {
22 ln -sf ../acinclude.m4 ${S}/acinclude.m4
23 autotools_do_configure
24}
25
26BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch b/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch
new file mode 100644
index 0000000000..ca7100eb29
--- /dev/null
+++ b/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch
@@ -0,0 +1,39 @@
1From 84021b1e236508169be65e802a9c0a25fc9a8827 Mon Sep 17 00:00:00 2001
2From: Phil Blundell <philb@gnu.org>
3Date: Mon, 27 Oct 2008 22:26:35 +0000
4Subject: [PATCH] mpfr: crusade against inline assembler
5
6Without this, build fails for thumb:
7| {standard input}: Assembler messages:
8| {standard input}:199: Error: selected processor does not support Thumb mode `umull sl,r0,r2,r1'
9| {standard input}:214: Error: selected processor does not support Thumb mode `umull sl,r2,r1,fp'
10| {standard input}:219: Error: instruction not supported in Thumb16 mode -- `adds fp,r0,sl'
11| {standard input}:220: Error: unshifted register required -- `adc r2,r2,#0'
12| {standard input}:235: Error: selected processor does not support Thumb mode `umull r0,sl,r1,r3'
13| {standard input}:244: Error: selected processor does not support Thumb mode `umull fp,ip,r1,r3'
14| {standard input}:253: Error: instruction not supported in Thumb16 mode -- `adds r3,sl,fp'
15| {standard input}:254: Error: unshifted register required -- `adc ip,ip,#0'
16| {standard input}:259: Error: instruction not supported in Thumb16 mode -- `adds sl,r1,r0'
17| {standard input}:642: Error: selected processor does not support Thumb mode `umull r0,r2,r3,r1'
18| ../arm-oe-linux-gnueabi-libtool --tag=CC --mode=compile arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -mthumb-interwork -mtune=xscale --sysroot=/OE/shr-core/tmp-eglibc/sysroots/spitz -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. -O2 -pipe -g -feliminate-unused-debug-types -ffloat-store -c -o pow.lo pow.c
19| {standard input}:1154: Error: selected processor does not support Thumb mode `umull r0,r1,sl,ip'
20| {standard input}:1166: Error: selected processor does not support Thumb mode `umull r3,r2,ip,r0'
21| {standard input}:1171: Error: instruction not supported in Thumb16 mode -- `adds r0,r1,r3'
22| {standard input}:1172: Error: unshifted register required -- `adc r2,r2,#0'
23| make[2]: *** [mul.lo] Error 1
24
25Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
26
27Upstream-Status: Pending
28
29--- mpfr.old/src/mpfr-longlong.h 2008-01-01 03:29:09.000000000 +0000
30+++ mpfr/src/mpfr-longlong.h 2008-10-27 21:46:44.000000000 +0000
31@@ -406,7 +406,7 @@
32 "rIJ" ((USItype) (bl)))
33 #endif
34
35-#if defined (__arm__) && W_TYPE_SIZE == 32
36+#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
37 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
38 __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
39 : "=r" (sh), "=&r" (sl) \
diff --git a/meta/recipes-support/mpfr/mpfr.inc b/meta/recipes-support/mpfr/mpfr.inc
new file mode 100644
index 0000000000..7f3f9175dc
--- /dev/null
+++ b/meta/recipes-support/mpfr/mpfr.inc
@@ -0,0 +1,6 @@
1SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
2HOMEPAGE = "http://www.mpfr.org/"
3LICENSE = "LGPLv3+"
4SECTION = "devel"
5
6inherit autotools texinfo
diff --git a/meta/recipes-support/mpfr/mpfr_3.1.2.bb b/meta/recipes-support/mpfr/mpfr_3.1.2.bb
new file mode 100644
index 0000000000..c05e956d5b
--- /dev/null
+++ b/meta/recipes-support/mpfr/mpfr_3.1.2.bb
@@ -0,0 +1,17 @@
1require mpfr.inc
2
3LICENSE = "GPLv3 & LGPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
5 file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
6DEPENDS = "gmp"
7
8SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
9 file://long-long-thumb.patch \
10 "
11
12SRC_URI[md5sum] = "e3d203d188b8fe60bb6578dd3152e05c"
13SRC_URI[sha256sum] = "399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b"
14
15S = "${WORKDIR}/mpfr-${PV}"
16
17BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch b/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch
new file mode 100644
index 0000000000..1a2550c6fb
--- /dev/null
+++ b/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Inappropriate [configuration]
2
3---
4 neon.pc.in | 2 +-
5 1 file changed, 1 insertion(+), 1 deletion(-)
6
7--- neon-0.28.1.orig/neon.pc.in
8+++ neon-0.28.1/neon.pc.in
9@@ -4,8 +4,8 @@ libdir=@libdir@
10 includedir=@includedir@
11
12 Name: neon
13 Description: HTTP/WebDAV client library
14 Version: @NEON_VERSION@
15-Libs.private: @NEON_LIBS@
16+Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
17 Libs: -L${libdir} -lneon @NEON_PC_LIBS@
18 Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/meta/recipes-support/neon/neon_0.30.0.bb b/meta/recipes-support/neon/neon_0.30.0.bb
new file mode 100644
index 0000000000..61bd7d9269
--- /dev/null
+++ b/meta/recipes-support/neon/neon_0.30.0.bb
@@ -0,0 +1,22 @@
1SUMMARY = "An HTTP and WebDAV client library with a C interface"
2HOMEPAGE = "http://www.webdav.org/neon/"
3SECTION = "libs"
4LICENSE = "LGPLv2+"
5LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
6 file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
7DEPENDS = "zlib libxml2 expat time gnutls libproxy"
8DEPENDS_class-native = "zlib-native libxml2-native expat-native gnutls-native"
9
10BBCLASSEXTEND = "native"
11
12SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
13 file://pkgconfig.patch"
14SRC_URI[md5sum] = "fb60b3a124eeec441937a812c456fd94"
15SRC_URI[sha256sum] = "2962cfcb5d30f3272e3d2fa0e473434419770a3801afe3d46e5d1650787990c2"
16
17BINCONFIG = "${bindir}/neon-config"
18
19inherit autotools binconfig-disabled lib_package pkgconfig
20
21EXTRA_OECONF = "--with-ssl=gnutls --with-libxml2 --with-expat --enable-shared"
22EXTRA_OECONF += "--without-gssapi"
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb b/meta/recipes-support/nettle/nettle_2.7.1.bb
new file mode 100644
index 0000000000..f53afcc5d4
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -0,0 +1,26 @@
1SUMMARY = "A low level cryptographic library"
2HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
3SECTION = "libs"
4LICENSE = "LGPLv2.1 & GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
6 file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
7 file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
8
9DEPENDS += "gmp"
10
11SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz"
12
13SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
14SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
15
16EXTRA_OECONF = "--disable-openssl"
17
18do_configure_prepend() {
19 if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
20 cp ${S}/aclocal.m4 ${S}/acinclude.m4
21 fi
22}
23
24inherit autotools
25
26BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/npth/npth_0.91.bb b/meta/recipes-support/npth/npth_0.91.bb
new file mode 100644
index 0000000000..7105b94e3d
--- /dev/null
+++ b/meta/recipes-support/npth/npth_0.91.bb
@@ -0,0 +1,19 @@
1SUMMARY = "New GNU Portable Threads library"
2HOMEPAGE = "http://www.gnupg.org/software/pth/"
3SECTION = "libs"
4LICENSE = "LGPLv3+ & GPLv2+"
5LIC_FILES_CHKSUM = "\
6 file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
7 file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
8 "
9SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \
10 "
11SRC_URI[md5sum] = "87712f0cee656c390b49773923e26e7f"
12SRC_URI[sha256sum] = "caef86ced4a331e162897818a5b924860c8d6003e52da5bdf76da00e8e0dfae1"
13
14BINCONFIG = "${bindir}/npth-config"
15
16inherit autotools binconfig-disabled
17
18FILES_${PN} = "${libdir}/libnpth.so.*"
19FILES_${PN}-dev += "${bindir}/npth-config"
diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
new file mode 100644
index 0000000000..c2b7258e50
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -0,0 +1,52 @@
1Fix build failure on x86_64
2
3When the target_cpu is x86_64, we should assume that the pkg uses 64bit,
4only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a
5opposite logic before.
6
7Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
8
9Upstream-Status: Pending
10---
11 configure.in | 12 ++++++------
12 1 files changed, 6 insertions(+), 6 deletions(-)
13
14Index: nspr/configure.in
15===================================================================
16--- nspr.orig/configure.in
17+++ nspr/configure.in
18@@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve
19 PR_MD_ASFILES=os_Linux_ia64.s
20 ;;
21 x86_64)
22- if test -n "$USE_64"; then
23- PR_MD_ASFILES=os_Linux_x86_64.s
24- elif test -n "$USE_X32"; then
25+ if test -n "$USE_X32"; then
26+ AC_DEFINE(i386)
27 PR_MD_ASFILES=os_Linux_x86_64.s
28 CC="$CC -mx32"
29 CXX="$CXX -mx32"
30 else
31- AC_DEFINE(i386)
32- PR_MD_ASFILES=os_Linux_x86.s
33- CC="$CC -m32"
34- CXX="$CXX -m32"
35+ PR_MD_ASFILES=os_Linux_x86_64.s
36 fi
37 ;;
38 ppc|powerpc)
39 PR_MD_ASFILES=os_Linux_ppc.s
40 ;;
41 powerpc64)
42- if test -n "$USE_64"; then
43+ if test -n "$USE_N32"; then
44+ PR_MD_ASFILES=os_Linux_ppc.s
45+ else
46 CC="$CC -m64"
47 CXX="$CXX -m64"
48- else
49- PR_MD_ASFILES=os_Linux_ppc.s
50 fi
51 ;;
52 m68k)
diff --git a/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
new file mode 100644
index 0000000000..565ff168e0
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
@@ -0,0 +1,67 @@
1Fix for CVE-2014-1545
2
3Upstream-Status: Backport
4
5Backported from nspr-4.10.6.tar.gz.
6---
7--- a/pr/src/io/prprf.c
8+++ b/pr/src/io/prprf.c
9@@ -50,6 +50,10 @@
10 #include "prlog.h"
11 #include "prmem.h"
12
13+#ifdef _MSC_VER
14+#define snprintf _snprintf
15+#endif
16+
17 /*
18 ** WARNING: This code may *NOT* call PR_LOG (because PR_LOG calls it)
19 */
20@@ -330,7 +334,7 @@
21 ** Convert a double precision floating point number into its printable
22 ** form.
23 **
24-** XXX stop using sprintf to convert floating point
25+** XXX stop using snprintf to convert floating point
26 */
27 static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
28 {
29@@ -338,15 +342,14 @@
30 char fout[300];
31 int amount = fmt1 - fmt0;
32
33- PR_ASSERT((amount > 0) && (amount < sizeof(fin)));
34- if (amount >= sizeof(fin)) {
35- /* Totally bogus % command to sprintf. Just ignore it */
36+ if (amount <= 0 || amount >= sizeof(fin)) {
37+ /* Totally bogus % command to snprintf. Just ignore it */
38 return 0;
39 }
40 memcpy(fin, fmt0, amount);
41 fin[amount] = 0;
42
43- /* Convert floating point using the native sprintf code */
44+ /* Convert floating point using the native snprintf code */
45 #ifdef DEBUG
46 {
47 const char *p = fin;
48@@ -356,14 +359,11 @@
49 }
50 }
51 #endif
52- sprintf(fout, fin, d);
53-
54- /*
55- ** This assert will catch overflow's of fout, when building with
56- ** debugging on. At least this way we can track down the evil piece
57- ** of calling code and fix it!
58- */
59- PR_ASSERT(strlen(fout) < sizeof(fout));
60+ memset(fout, 0, sizeof(fout));
61+ snprintf(fout, sizeof(fout), fin, d);
62+ /* Explicitly null-terminate fout because on Windows snprintf doesn't
63+ * append a null-terminator if the buffer is too small. */
64+ fout[sizeof(fout) - 1] = '\0';
65
66 return (*ss->stuff)(ss, fout, strlen(fout));
67 }
diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
new file mode 100644
index 0000000000..c37d0bcbd7
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/nspr.pc.in
@@ -0,0 +1,11 @@
1os_libs=-lpthread -ldl
2prefix=OEPREFIX
3exec_prefix=OEEXECPREFIX
4libdir=OELIBDIR
5includedir=OEINCDIR
6
7Name: NSPR
8Description: The Netscape Portable Runtime
9Version: 4.9.5
10Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
11Cflags:
diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
new file mode 100644
index 0000000000..a7e7853de1
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
@@ -0,0 +1,26 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2Date: Thu Feb 9 00:03:38 2012 +0200
3
4Avoid QA warnings by removing hardcoded rpath from binaries.
5
6[...]
7WARNING: QA Issue: package nspr contains bad RPATH {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/nspr-4.8.9/mozilla/nsprpub/pr/tests/../../dist/lib
8in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-split/nspr/usr/lib/nspr/tests/multiwait
9[...]
10
11Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
12Upstream-Status: Pending
13
14Index: nspr-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in
15===================================================================
16--- nsprpub.orig/pr/tests/Makefile.in 2012-02-11 00:01:10.476220505 +0200
17+++ nsprpub/pr/tests/Makefile.in 2012-02-10 23:57:40.000000000 +0200
18@@ -379,7 +379,7 @@
19 endif
20
21 ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
22- LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
23+ LDOPTS += -Xlinker
24 ifeq ($(USE_PTHREADS),1)
25 EXTRA_LIBS = -lpthread
26 endif
diff --git a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
new file mode 100644
index 0000000000..bde715c5dc
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
@@ -0,0 +1,19 @@
1the $srcdir is not defined at the time of gnu-configurize.
2
3Upstream-Status: Inappropriate [OE-Core specific]
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: nspr/configure.in
8===================================================================
9--- nspr.orig/configure.in
10+++ nspr/configure.in
11@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
12 AC_INIT
13 AC_CONFIG_SRCDIR([pr/include/nspr.h])
14
15-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
16+AC_CONFIG_AUX_DIR(build/autoconf)
17 AC_CANONICAL_TARGET
18
19 dnl ========================================================
diff --git a/meta/recipes-support/nspr/nspr_4.10.7.bb b/meta/recipes-support/nspr/nspr_4.10.7.bb
new file mode 100644
index 0000000000..69e9dfa6a3
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr_4.10.7.bb
@@ -0,0 +1,172 @@
1SUMMARY = "Netscape Portable Runtime Library"
2HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
3LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
4LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
5 file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
6SECTION = "libs/network"
7
8SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
9 file://remove-rpath-from-tests.patch \
10 file://fix-build-on-x86_64.patch \
11 file://remove-srcdir-from-configure-in.patch \
12 "
13
14SRC_URI += "file://nspr.pc.in"
15
16SRC_URI[md5sum] = "6e06919e4b56efed501e05d8b45ec10e"
17SRC_URI[sha256sum] = "389af5cfa863ea9bc6de7b30c15f8a4f9bddd8002f8c6fdc8b33caef43893938"
18
19S = "${WORKDIR}/nspr-${PV}/nspr"
20
21RDEPENDS_${PN}-dev += "perl"
22TARGET_CC_ARCH += "${LDFLAGS}"
23
24TESTS = "runtests.pl \
25 runtests.sh \
26 accept \
27 acceptread \
28 acceptreademu \
29 affinity \
30 alarm \
31 anonfm \
32 atomic \
33 attach \
34 bigfile \
35 cleanup \
36 cltsrv \
37 concur \
38 cvar \
39 cvar2 \
40 dlltest \
41 dtoa \
42 errcodes \
43 exit \
44 fdcach \
45 fileio \
46 foreign \
47 formattm \
48 fsync \
49 gethost \
50 getproto \
51 i2l \
52 initclk \
53 inrval \
54 instrumt \
55 intrio \
56 intrupt \
57 io_timeout \
58 ioconthr \
59 join \
60 joinkk \
61 joinku \
62 joinuk \
63 joinuu \
64 layer \
65 lazyinit \
66 libfilename \
67 lltest \
68 lock \
69 lockfile \
70 logfile \
71 logger \
72 many_cv \
73 multiwait \
74 nameshm1 \
75 nblayer \
76 nonblock \
77 ntioto \
78 ntoh \
79 op_2long \
80 op_excl \
81 op_filnf \
82 op_filok \
83 op_nofil \
84 parent \
85 parsetm \
86 peek \
87 perf \
88 pipeping \
89 pipeping2 \
90 pipeself \
91 poll_nm \
92 poll_to \
93 pollable \
94 prftest \
95 primblok \
96 provider \
97 prpollml \
98 ranfile \
99 randseed \
100 reinit \
101 rwlocktest \
102 sel_spd \
103 selct_er \
104 selct_nm \
105 selct_to \
106 selintr \
107 sema \
108 semaerr \
109 semaping \
110 sendzlf \
111 server_test \
112 servr_kk \
113 servr_uk \
114 servr_ku \
115 servr_uu \
116 short_thread \
117 sigpipe \
118 socket \
119 sockopt \
120 sockping \
121 sprintf \
122 stack \
123 stdio \
124 str2addr \
125 strod \
126 switch \
127 system \
128 testbit \
129 testfile \
130 threads \
131 timemac \
132 timetest \
133 tpd \
134 udpsrv \
135 vercheck \
136 version \
137 writev \
138 xnotify \
139 zerolen"
140
141inherit autotools-brokensep
142
143do_compile_prepend() {
144 oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
145}
146
147do_compile_append() {
148 oe_runmake -C pr/tests
149}
150
151do_install_append() {
152 install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
153 sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
154 sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
155 sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
156 sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
157 cd ${S}/pr/tests
158 mkdir -p ${D}${libdir}/nspr/tests
159 install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
160
161 # delete compile-et.pl and perr.properties from ${bindir} because these are
162 # only used to generate prerr.c and prerr.h files from prerr.et at compile
163 # time
164 rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
165}
166
167FILES_${PN} = "${libdir}/lib*.so"
168FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
169 ${includedir}/* ${datadir}/aclocal/* "
170FILES_${PN}-dbg += "${libdir}/nspr/tests/.debug/*"
171
172BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
new file mode 100644
index 0000000000..bbce9e9af0
--- /dev/null
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Name Service Switch module for resolving the local hostname"
2DESCRIPTION = "plugin for the GNU Name Service Switch (NSS) functionality of \
3the GNU C Library (glibc) providing host name resolution for the locally \
4configured system hostname as returned by gethostname(2)."
5HOMEPAGE = "http://0pointer.de/lennart/projects/nss-myhostname/"
6LICENSE = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
8
9SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz"
10
11SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
12SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
13
14inherit autotools distro_features_check
15
16# The systemd has its own copy of nss-myhostname
17CONFLICT_DISTRO_FEATURES = "systemd"
18
19pkg_postinst_${PN} () {
20 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
21 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
22 -i $D${sysconfdir}/nsswitch.conf
23}
24
25pkg_prerm_${PN} () {
26 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
27 -e '/^hosts:/s/\s*myhostname//' \
28 -i $D${sysconfdir}/nsswitch.conf
29}
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
new file mode 100644
index 0000000000..1a159c3934
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
@@ -0,0 +1,81 @@
1Upstream-Status: Backport
2Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
3
4--- a/nss/lib/ssl/ssl3con.c
5+++ b/nss/lib/ssl/ssl3con.c
6@@ -10509,7 +10509,7 @@ ssl_RemoveSSLv3CBCPadding(sslBuffer *pla
7 /* SSLv3 padding bytes are random and cannot be checked. */
8 t = plaintext->len;
9 t -= paddingLength+overhead;
10- /* If len >= padding_length+overhead then the MSB of t is zero. */
11+ /* If len >= paddingLength+overhead then the MSB of t is zero. */
12 good = DUPLICATE_MSB_TO_ALL(~t);
13 /* SSLv3 requires that the padding is minimal. */
14 t = blockSize - (paddingLength+1);
15@@ -10742,7 +10742,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
16 }
17 }
18
19- good = (unsigned)-1;
20+ good = ~0U;
21 minLength = crSpec->mac_size;
22 if (cipher_def->type == type_block) {
23 /* CBC records have a padding length byte at the end. */
24@@ -10756,14 +10756,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
25 /* We can perform this test in variable time because the record's total
26 * length and the ciphersuite are both public knowledge. */
27 if (cText->buf->len < minLength) {
28- SSL_DBG(("%d: SSL3[%d]: HandleRecord, record too small.",
29- SSL_GETPID(), ss->fd));
30- /* must not hold spec lock when calling SSL3_SendAlert. */
31- ssl_ReleaseSpecReadLock(ss);
32- SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
33- /* always log mac error, in case attacker can read server logs. */
34- PORT_SetError(SSL_ERROR_BAD_MAC_READ);
35- return SECFailure;
36+ goto decrypt_loser;
37 }
38
39 if (cipher_def->type == type_block &&
40@@ -10831,11 +10824,18 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
41 return SECFailure;
42 }
43
44+ if (cipher_def->type == type_block &&
45+ ((cText->buf->len - ivLen) % cipher_def->block_size) != 0) {
46+ goto decrypt_loser;
47+ }
48+
49 /* decrypt from cText buf to plaintext. */
50 rv = crSpec->decode(
51 crSpec->decodeContext, plaintext->buf, (int *)&plaintext->len,
52 plaintext->space, cText->buf->buf + ivLen, cText->buf->len - ivLen);
53- good &= SECStatusToMask(rv);
54+ if (rv != SECSuccess) {
55+ goto decrypt_loser;
56+ }
57
58 PRINT_BUF(80, (ss, "cleartext:", plaintext->buf, plaintext->len));
59
60@@ -10843,7 +10843,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
61
62 /* If it's a block cipher, check and strip the padding. */
63 if (cipher_def->type == type_block) {
64- const unsigned int blockSize = cipher_def->iv_size;
65+ const unsigned int blockSize = cipher_def->block_size;
66 const unsigned int macSize = crSpec->mac_size;
67
68 if (crSpec->version <= SSL_LIBRARY_VERSION_3_0) {
69@@ -10899,10 +10899,11 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
70 }
71
72 if (good == 0) {
73+decrypt_loser:
74 /* must not hold spec lock when calling SSL3_SendAlert. */
75 ssl_ReleaseSpecReadLock(ss);
76
77- SSL_DBG(("%d: SSL3[%d]: mac check failed", SSL_GETPID(), ss->fd));
78+ SSL_DBG(("%d: SSL3[%d]: decryption failed", SSL_GETPID(), ss->fd));
79
80 if (!IS_DTLS(ss)) {
81 SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
new file mode 100644
index 0000000000..21da0c03b5
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
@@ -0,0 +1,92 @@
1Upstream-Status: backport
2yanjun.zhu <yanjun.zhu@windriver.com>
3--- a/nss/lib/util/secport.c
4+++ b/nss/lib/util/secport.c
5@@ -69,13 +69,22 @@ PORTCharConversionFunc ucs4Utf8ConvertFu
6 PORTCharConversionFunc ucs2Utf8ConvertFunc;
7 PORTCharConversionWSwapFunc ucs2AsciiConvertFunc;
8
9+/* NSPR memory allocation functions (PR_Malloc, PR_Calloc, and PR_Realloc)
10+ * use the PRUint32 type for the size parameter. Before we pass a size_t or
11+ * unsigned long size to these functions, we need to ensure it is <= half of
12+ * the maximum PRUint32 value to avoid truncation and catch a negative size.
13+ */
14+#define MAX_SIZE (PR_UINT32_MAX >> 1)
15+
16 void *
17 PORT_Alloc(size_t bytes)
18 {
19- void *rv;
20+ void *rv = NULL;
21
22- /* Always allocate a non-zero amount of bytes */
23- rv = (void *)PR_Malloc(bytes ? bytes : 1);
24+ if (bytes <= MAX_SIZE) {
25+ /* Always allocate a non-zero amount of bytes */
26+ rv = PR_Malloc(bytes ? bytes : 1);
27+ }
28 if (!rv) {
29 ++port_allocFailures;
30 PORT_SetError(SEC_ERROR_NO_MEMORY);
31@@ -86,9 +95,11 @@ PORT_Alloc(size_t bytes)
32 void *
33 PORT_Realloc(void *oldptr, size_t bytes)
34 {
35- void *rv;
36+ void *rv = NULL;
37
38- rv = (void *)PR_Realloc(oldptr, bytes);
39+ if (bytes <= MAX_SIZE) {
40+ rv = PR_Realloc(oldptr, bytes);
41+ }
42 if (!rv) {
43 ++port_allocFailures;
44 PORT_SetError(SEC_ERROR_NO_MEMORY);
45@@ -99,10 +110,12 @@ PORT_Realloc(void *oldptr, size_t bytes)
46 void *
47 PORT_ZAlloc(size_t bytes)
48 {
49- void *rv;
50+ void *rv = NULL;
51
52- /* Always allocate a non-zero amount of bytes */
53- rv = (void *)PR_Calloc(1, bytes ? bytes : 1);
54+ if (bytes <= MAX_SIZE) {
55+ /* Always allocate a non-zero amount of bytes */
56+ rv = PR_Calloc(1, bytes ? bytes : 1);
57+ }
58 if (!rv) {
59 ++port_allocFailures;
60 PORT_SetError(SEC_ERROR_NO_MEMORY);
61@@ -209,6 +222,10 @@ PORT_NewArena(unsigned long chunksize)
62 {
63 PORTArenaPool *pool;
64
65+ if (chunksize > MAX_SIZE) {
66+ PORT_SetError(SEC_ERROR_NO_MEMORY);
67+ return NULL;
68+ }
69 pool = PORT_ZNew(PORTArenaPool);
70 if (!pool) {
71 return NULL;
72@@ -224,8 +241,6 @@ PORT_NewArena(unsigned long chunksize)
73 return(&pool->arena);
74 }
75
76-#define MAX_SIZE 0x7fffffffUL
77-
78 void *
79 PORT_ArenaAlloc(PLArenaPool *arena, size_t size)
80 {
81@@ -330,6 +345,11 @@ PORT_ArenaGrow(PLArenaPool *arena, void
82 PORTArenaPool *pool = (PORTArenaPool *)arena;
83 PORT_Assert(newsize >= oldsize);
84
85+ if (newsize > MAX_SIZE) {
86+ PORT_SetError(SEC_ERROR_NO_MEMORY);
87+ return NULL;
88+ }
89+
90 if (ARENAPOOL_MAGIC == pool->magic ) {
91 PZ_Lock(pool->lock);
92 /* Do we do a THREADMARK check here? */
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
new file mode 100644
index 0000000000..7203d02c78
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
@@ -0,0 +1,18 @@
1signed-off-by: Ryan Sleevi <ryan.sleevi@gmail.com>
2Upstream-Status: Backport
3reference:https://hg.mozilla.org/projects/nss/rev/e79a09364b5e
4
5--- a/nss/lib/ssl/ssl3con.c
6+++ b/nss/lib/ssl/ssl3con.c
7@@ -781,6 +781,11 @@ static SECStatus
8 Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen,
9 const unsigned char *input, int inputLen)
10 {
11+ if (inputLen > maxOutputLen) {
12+ *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */
13+ PORT_SetError(SEC_ERROR_OUTPUT_LEN);
14+ return SECFailure;
15+ }
16 *outputLen = inputLen;
17 if (input != output)
18 PORT_Memcpy(output, input, inputLen);
diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
new file mode 100644
index 0000000000..db3d6f9103
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
@@ -0,0 +1,916 @@
1nss: CVE-2013-1740
2
3Upstream-Status: Backport
4
5the patch comes from:
6http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1740
7https://bugzilla.mozilla.org/show_bug.cgi?id=919877
8https://bugzilla.mozilla.org/show_bug.cgi?id=713933
9
10changeset: 10946:f28426e944ae
11user: Wan-Teh Chang <wtc@google.com>
12date: Tue Nov 26 16:44:39 2013 -0800
13summary: Bug 713933: Handle the return value of both ssl3_HandleRecord calls
14
15changeset: 10945:774c7dec7565
16user: Wan-Teh Chang <wtc@google.com>
17date: Mon Nov 25 19:16:23 2013 -0800
18summary: Bug 713933: Declare the |falseStart| local variable in the smallest
19
20changeset: 10848:141fae8fb2e8
21user: Wan-Teh Chang <wtc@google.com>
22date: Mon Sep 23 11:25:41 2013 -0700
23summary: Bug 681839: Allow SSL_HandshakeNegotiatedExtension to be called before the handshake is finished, r=brian@briansmith.org
24
25changeset: 10898:1b9c43d28713
26user: Brian Smith <brian@briansmith.org>
27date: Thu Oct 31 15:40:42 2013 -0700
28summary: Bug 713933: Make SSL False Start work with asynchronous certificate validation, r=wtc
29
30Signed-off-by: Li Wang <li.wang@windriver.com>
31---
32 nss/lib/ssl/ssl.def | 7 ++
33 nss/lib/ssl/ssl.h | 54 +++++++++++---
34 nss/lib/ssl/ssl3con.c | 188 +++++++++++++++++++++++++++++++++++------------
35 nss/lib/ssl/ssl3gthr.c | 63 ++++++++++++----
36 nss/lib/ssl/sslauth.c | 10 +--
37 nss/lib/ssl/sslimpl.h | 22 +++++-
38 nss/lib/ssl/sslinfo.c | 10 +--
39 nss/lib/ssl/sslreveal.c | 9 +--
40 nss/lib/ssl/sslsecur.c | 139 ++++++++++++++++++++++++++++-------
41 nss/lib/ssl/sslsock.c | 12 ++-
42 10 files changed, 386 insertions(+), 128 deletions(-)
43
44diff --git a/nss/lib/ssl/ssl.def b/nss/lib/ssl/ssl.def
45index fbf7fc5..e937bd4 100644
46--- a/nss/lib/ssl/ssl.def
47+++ b/nss/lib/ssl/ssl.def
48@@ -163,3 +163,10 @@ SSL_SetStapledOCSPResponses;
49 ;+ local:
50 ;+*;
51 ;+};
52+;+NSS_3.15.3 { # NSS 3.15.3 release
53+;+ global:
54+SSL_RecommendedCanFalseStart;
55+SSL_SetCanFalseStartCallback;
56+;+ local:
57+;+*;
58+;+};
59diff --git a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h
60index 6db0e34..ddeaaef 100644
61--- a/nss/lib/ssl/ssl.h
62+++ b/nss/lib/ssl/ssl.h
63@@ -121,14 +121,17 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd);
64 #define SSL_ENABLE_FALSE_START 22 /* Enable SSL false start (off by */
65 /* default, applies only to */
66 /* clients). False start is a */
67-/* mode where an SSL client will start sending application data before */
68-/* verifying the server's Finished message. This means that we could end up */
69-/* sending data to an imposter. However, the data will be encrypted and */
70-/* only the true server can derive the session key. Thus, so long as the */
71-/* cipher isn't broken this is safe. Because of this, False Start will only */
72-/* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */
73-/* bits. The advantage of False Start is that it saves a round trip for */
74-/* client-speaks-first protocols when performing a full handshake. */
75+/* mode where an SSL client will start sending application data before
76+ * verifying the server's Finished message. This means that we could end up
77+ * sending data to an imposter. However, the data will be encrypted and
78+ * only the true server can derive the session key. Thus, so long as the
79+ * cipher isn't broken this is safe. The advantage of false start is that
80+ * it saves a round trip for client-speaks-first protocols when performing a
81+ * full handshake.
82+ *
83+ * In addition to enabling this option, the application must register a
84+ * callback using the SSL_SetCanFalseStartCallback function.
85+ */
86
87 /* For SSL 3.0 and TLS 1.0, by default we prevent chosen plaintext attacks
88 * on SSL CBC mode cipher suites (see RFC 4346 Section F.3) by splitting
89@@ -653,14 +656,45 @@ SSL_IMPORT SECStatus SSL_SetMaxServerCacheLocks(PRUint32 maxLocks);
90 SSL_IMPORT SECStatus SSL_InheritMPServerSIDCache(const char * envString);
91
92 /*
93-** Set the callback on a particular socket that gets called when we finish
94-** performing a handshake.
95+** Set the callback that gets called when a TLS handshake is complete. The
96+** handshake callback is called after verifying the peer's Finished message and
97+** before processing incoming application data.
98+**
99+** For the initial handshake: If the handshake false started (see
100+** SSL_ENABLE_FALSE_START), then application data may already have been sent
101+** before the handshake callback is called. If we did not false start then the
102+** callback will get called before any application data is sent.
103 */
104 typedef void (PR_CALLBACK *SSLHandshakeCallback)(PRFileDesc *fd,
105 void *client_data);
106 SSL_IMPORT SECStatus SSL_HandshakeCallback(PRFileDesc *fd,
107 SSLHandshakeCallback cb, void *client_data);
108
109+/* Applications that wish to enable TLS false start must set this callback
110+** function. NSS will invoke the functon to determine if a particular
111+** connection should use false start or not. SECSuccess indicates that the
112+** callback completed successfully, and if so *canFalseStart indicates if false
113+** start can be used. If the callback does not return SECSuccess then the
114+** handshake will be canceled. NSS's recommended criteria can be evaluated by
115+** calling SSL_RecommendedCanFalseStart.
116+**
117+** If no false start callback is registered then false start will never be
118+** done, even if the SSL_ENABLE_FALSE_START option is enabled.
119+**/
120+typedef SECStatus (PR_CALLBACK *SSLCanFalseStartCallback)(
121+ PRFileDesc *fd, void *arg, PRBool *canFalseStart);
122+
123+SSL_IMPORT SECStatus SSL_SetCanFalseStartCallback(
124+ PRFileDesc *fd, SSLCanFalseStartCallback callback, void *arg);
125+
126+/* This function sets *canFalseStart according to the recommended criteria for
127+** false start. These criteria may change from release to release and may depend
128+** on which handshake features have been negotiated and/or properties of the
129+** certifciates/keys used on the connection.
130+*/
131+SSL_IMPORT SECStatus SSL_RecommendedCanFalseStart(PRFileDesc *fd,
132+ PRBool *canFalseStart);
133+
134 /*
135 ** For the server, request a new handshake. For the client, begin a new
136 ** handshake. If flushCache is non-zero, the SSL3 cache entry will be
137diff --git a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
138index 61d24d9..f39ba09 100644
139--- a/nss/lib/ssl/ssl3con.c
140+++ b/nss/lib/ssl/ssl3con.c
141@@ -2535,7 +2535,7 @@ ssl3_SendRecord( sslSocket * ss,
142 SSL_TRC(3, ("%d: SSL3[%d] SendRecord type: %s nIn=%d",
143 SSL_GETPID(), ss->fd, ssl3_DecodeContentType(type),
144 nIn));
145- PRINT_BUF(3, (ss, "Send record (plain text)", pIn, nIn));
146+ PRINT_BUF(50, (ss, "Send record (plain text)", pIn, nIn));
147
148 PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) );
149
150@@ -6674,36 +6674,73 @@ done:
151 return rv;
152 }
153
154+static SECStatus
155+ssl3_CheckFalseStart(sslSocket *ss)
156+{
157+ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
158+ PORT_Assert( !ss->ssl3.hs.authCertificatePending );
159+ PORT_Assert( !ss->ssl3.hs.canFalseStart );
160+
161+ if (!ss->canFalseStartCallback) {
162+ SSL_TRC(3, ("%d: SSL[%d]: no false start callback so no false start",
163+ SSL_GETPID(), ss->fd));
164+ } else {
165+ PRBool maybeFalseStart;
166+ SECStatus rv;
167+
168+ /* An attacker can control the selected ciphersuite so we only wish to
169+ * do False Start in the case that the selected ciphersuite is
170+ * sufficiently strong that the attack can gain no advantage.
171+ * Therefore we always require an 80-bit cipher. */
172+ ssl_GetSpecReadLock(ss);
173+ maybeFalseStart = ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10;
174+ ssl_ReleaseSpecReadLock(ss);
175+
176+ if (!maybeFalseStart) {
177+ SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher",
178+ SSL_GETPID(), ss->fd));
179+ } else {
180+ rv = (ss->canFalseStartCallback)(ss->fd,
181+ ss->canFalseStartCallbackData,
182+ &ss->ssl3.hs.canFalseStart);
183+ if (rv == SECSuccess) {
184+ SSL_TRC(3, ("%d: SSL[%d]: false start callback returned %s",
185+ SSL_GETPID(), ss->fd,
186+ ss->ssl3.hs.canFalseStart ? "TRUE" : "FALSE"));
187+ } else {
188+ SSL_TRC(3, ("%d: SSL[%d]: false start callback failed (%s)",
189+ SSL_GETPID(), ss->fd,
190+ PR_ErrorToName(PR_GetError())));
191+ }
192+ return rv;
193+ }
194+ }
195+
196+ ss->ssl3.hs.canFalseStart = PR_FALSE;
197+ return SECSuccess;
198+}
199+
200 PRBool
201-ssl3_CanFalseStart(sslSocket *ss) {
202- PRBool rv;
203+ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss)
204+{
205+ PRBool result = PR_FALSE;
206
207 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
208
209- /* XXX: does not take into account whether we are waiting for
210- * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when
211- * that is done, this function could return different results each time it
212- * would be called.
213- */
214+ switch (ss->ssl3.hs.ws) {
215+ case wait_new_session_ticket:
216+ result = PR_TRUE;
217+ break;
218+ case wait_change_cipher:
219+ result = !ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn);
220+ break;
221+ case wait_finished:
222+ break;
223+ default:
224+ PR_NOT_REACHED("ssl3_WaitingForStartOfServerSecondRound");
225+ }
226
227- ssl_GetSpecReadLock(ss);
228- rv = ss->opt.enableFalseStart &&
229- !ss->sec.isServer &&
230- !ss->ssl3.hs.isResuming &&
231- ss->ssl3.cwSpec &&
232-
233- /* An attacker can control the selected ciphersuite so we only wish to
234- * do False Start in the case that the selected ciphersuite is
235- * sufficiently strong that the attack can gain no advantage.
236- * Therefore we require an 80-bit cipher and a forward-secret key
237- * exchange. */
238- ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 &&
239- (ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
240- ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
241- ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
242- ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa);
243- ssl_ReleaseSpecReadLock(ss);
244- return rv;
245+ return result;
246 }
247
248 static SECStatus ssl3_SendClientSecondRound(sslSocket *ss);
249@@ -6785,6 +6822,9 @@ ssl3_SendClientSecondRound(sslSocket *ss)
250 }
251 if (ss->ssl3.hs.authCertificatePending &&
252 (sendClientCert || ss->ssl3.sendEmptyCert || ss->firstHsDone)) {
253+ SSL_TRC(3, ("%d: SSL3[%p]: deferring ssl3_SendClientSecondRound because"
254+ " certificate authentication is still pending.",
255+ SSL_GETPID(), ss->fd));
256 ss->ssl3.hs.restartTarget = ssl3_SendClientSecondRound;
257 return SECWouldBlock;
258 }
259@@ -6822,14 +6862,50 @@ ssl3_SendClientSecondRound(sslSocket *ss)
260 goto loser; /* err code was set. */
261 }
262
263- /* XXX: If the server's certificate hasn't been authenticated by this
264- * point, then we may be leaking this NPN message to an attacker.
265+ /* This must be done after we've set ss->ssl3.cwSpec in
266+ * ssl3_SendChangeCipherSpecs because SSL_GetChannelInfo uses information
267+ * from cwSpec. This must be done before we call ssl3_CheckFalseStart
268+ * because the false start callback (if any) may need the information from
269+ * the functions that depend on this being set.
270 */
271+ ss->enoughFirstHsDone = PR_TRUE;
272+
273 if (!ss->firstHsDone) {
274+ /* XXX: If the server's certificate hasn't been authenticated by this
275+ * point, then we may be leaking this NPN message to an attacker.
276+ */
277 rv = ssl3_SendNextProto(ss);
278 if (rv != SECSuccess) {
279 goto loser; /* err code was set. */
280 }
281+
282+ if (ss->opt.enableFalseStart) {
283+ if (!ss->ssl3.hs.authCertificatePending) {
284+ /* When we fix bug 589047, we will need to know whether we are
285+ * false starting before we try to flush the client second
286+ * round to the network. With that in mind, we purposefully
287+ * call ssl3_CheckFalseStart before calling ssl3_SendFinished,
288+ * which includes a call to ssl3_FlushHandshake, so that
289+ * no application develops a reliance on such flushing being
290+ * done before its false start callback is called.
291+ */
292+ ssl_ReleaseXmitBufLock(ss);
293+ rv = ssl3_CheckFalseStart(ss);
294+ ssl_GetXmitBufLock(ss);
295+ if (rv != SECSuccess) {
296+ goto loser;
297+ }
298+ } else {
299+ /* The certificate authentication and the server's Finished
300+ * message are racing each other. If the certificate
301+ * authentication wins, then we will try to false start in
302+ * ssl3_AuthCertificateComplete.
303+ */
304+ SSL_TRC(3, ("%d: SSL3[%p]: deferring false start check because"
305+ " certificate authentication is still pending.",
306+ SSL_GETPID(), ss->fd));
307+ }
308+ }
309 }
310
311 rv = ssl3_SendFinished(ss, 0);
312@@ -6844,10 +6920,7 @@ ssl3_SendClientSecondRound(sslSocket *ss)
313 else
314 ss->ssl3.hs.ws = wait_change_cipher;
315
316- /* Do the handshake callback for sslv3 here, if we can false start. */
317- if (ss->handshakeCallback != NULL && ssl3_CanFalseStart(ss)) {
318- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
319- }
320+ PORT_Assert(ssl3_WaitingForStartOfServerSecondRound(ss));
321
322 return SECSuccess;
323
324@@ -9421,13 +9494,6 @@ ssl3_AuthCertificate(sslSocket *ss)
325
326 ss->ssl3.hs.authCertificatePending = PR_TRUE;
327 rv = SECSuccess;
328-
329- /* XXX: Async cert validation and False Start don't work together
330- * safely yet; if we leave False Start enabled, we may end up false
331- * starting (sending application data) before we
332- * SSL_AuthCertificateComplete has been called.
333- */
334- ss->opt.enableFalseStart = PR_FALSE;
335 }
336
337 if (rv != SECSuccess) {
338@@ -9551,6 +9617,12 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
339 } else if (ss->ssl3.hs.restartTarget != NULL) {
340 sslRestartTarget target = ss->ssl3.hs.restartTarget;
341 ss->ssl3.hs.restartTarget = NULL;
342+
343+ if (target == ssl3_FinishHandshake) {
344+ SSL_TRC(3,("%d: SSL3[%p]: certificate authentication lost the race"
345+ " with peer's finished message", SSL_GETPID(), ss->fd));
346+ }
347+
348 rv = target(ss);
349 /* Even if we blocked here, we have accomplished enough to claim
350 * success. Any remaining work will be taken care of by subsequent
351@@ -9560,7 +9632,29 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
352 rv = SECSuccess;
353 }
354 } else {
355- rv = SECSuccess;
356+ SSL_TRC(3, ("%d: SSL3[%p]: certificate authentication won the race with"
357+ " peer's finished message", SSL_GETPID(), ss->fd));
358+
359+ PORT_Assert(!ss->firstHsDone);
360+ PORT_Assert(!ss->sec.isServer);
361+ PORT_Assert(!ss->ssl3.hs.isResuming);
362+ PORT_Assert(ss->ssl3.hs.ws == wait_new_session_ticket ||
363+ ss->ssl3.hs.ws == wait_change_cipher ||
364+ ss->ssl3.hs.ws == wait_finished);
365+
366+ /* ssl3_SendClientSecondRound deferred the false start check because
367+ * certificate authentication was pending, so we do it now if we still
368+ * haven't received any of the server's second round yet.
369+ */
370+ if (ss->opt.enableFalseStart &&
371+ !ss->firstHsDone &&
372+ !ss->sec.isServer &&
373+ !ss->ssl3.hs.isResuming &&
374+ ssl3_WaitingForStartOfServerSecondRound(ss)) {
375+ rv = ssl3_CheckFalseStart(ss);
376+ } else {
377+ rv = SECSuccess;
378+ }
379 }
380
381 done:
382@@ -10023,9 +10117,6 @@ xmit_loser:
383 return rv;
384 }
385
386- ss->gs.writeOffset = 0;
387- ss->gs.readOffset = 0;
388-
389 if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) {
390 effectiveExchKeyType = kt_rsa;
391 } else {
392@@ -10090,6 +10181,9 @@ xmit_loser:
393 return rv;
394 }
395
396+/* The return type is SECStatus instead of void because this function needs
397+ * to have type sslRestartTarget.
398+ */
399 SECStatus
400 ssl3_FinishHandshake(sslSocket * ss)
401 {
402@@ -10099,19 +10193,16 @@ ssl3_FinishHandshake(sslSocket * ss)
403
404 /* The first handshake is now completed. */
405 ss->handshake = NULL;
406- ss->firstHsDone = PR_TRUE;
407
408 if (ss->ssl3.hs.cacheSID) {
409 (*ss->sec.cache)(ss->sec.ci.sid);
410 ss->ssl3.hs.cacheSID = PR_FALSE;
411 }
412
413+ ss->ssl3.hs.canFalseStart = PR_FALSE; /* False Start phase is complete */
414 ss->ssl3.hs.ws = idle_handshake;
415
416- /* Do the handshake callback for sslv3 here, if we cannot false start. */
417- if (ss->handshakeCallback != NULL && !ssl3_CanFalseStart(ss)) {
418- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
419- }
420+ ssl_FinishHandshake(ss);
421
422 return SECSuccess;
423 }
424@@ -11045,7 +11136,6 @@ process_it:
425
426 ssl_ReleaseSSL3HandshakeLock(ss);
427 return rv;
428-
429 }
430
431 /*
432diff --git a/nss/lib/ssl/ssl3gthr.c b/nss/lib/ssl/ssl3gthr.c
433index 6d62515..03e369d 100644
434--- a/nss/lib/ssl/ssl3gthr.c
435+++ b/nss/lib/ssl/ssl3gthr.c
436@@ -275,11 +275,17 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
437 {
438 SSL3Ciphertext cText;
439 int rv;
440- PRBool canFalseStart = PR_FALSE;
441+ PRBool keepGoing = PR_TRUE;
442
443 SSL_TRC(30, ("ssl3_GatherCompleteHandshake"));
444
445+ /* ssl3_HandleRecord may end up eventually calling ssl_FinishHandshake,
446+ * which requires the 1stHandshakeLock, which must be acquired before the
447+ * RecvBufLock.
448+ */
449+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
450 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
451+
452 do {
453 PRBool handleRecordNow = PR_FALSE;
454
455@@ -368,20 +374,48 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
456 if (rv < 0) {
457 return ss->recvdCloseNotify ? 0 : rv;
458 }
459+ if (rv == (int) SECSuccess && ss->gs.buf.len > 0) {
460+ /* We have application data to return to the application. This
461+ * prioritizes returning application data to the application over
462+ * completing any renegotiation handshake we may be doing.
463+ */
464+ PORT_Assert(ss->firstHsDone);
465+ PORT_Assert(cText.type == content_application_data);
466+ break;
467+ }
468
469- /* If we kicked off a false start in ssl3_HandleServerHelloDone, break
470- * out of this loop early without finishing the handshake.
471- */
472- if (ss->opt.enableFalseStart) {
473- ssl_GetSSL3HandshakeLock(ss);
474- canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher ||
475- ss->ssl3.hs.ws == wait_new_session_ticket) &&
476- ssl3_CanFalseStart(ss);
477- ssl_ReleaseSSL3HandshakeLock(ss);
478+ PORT_Assert(keepGoing);
479+ ssl_GetSSL3HandshakeLock(ss);
480+ if (ss->ssl3.hs.ws == idle_handshake) {
481+ /* We are done with the current handshake so stop trying to
482+ * handshake. Note that it would be safe to test ss->firstHsDone
483+ * instead of ss->ssl3.hs.ws. By testing ss->ssl3.hs.ws instead,
484+ * we prioritize completing a renegotiation handshake over sending
485+ * application data.
486+ */
487+ PORT_Assert(ss->firstHsDone);
488+ PORT_Assert(!ss->ssl3.hs.canFalseStart);
489+ keepGoing = PR_FALSE;
490+ } else if (ss->ssl3.hs.canFalseStart) {
491+ /* Prioritize sending application data over trying to complete
492+ * the handshake if we're false starting.
493+ *
494+ * If we were to do this check at the beginning of the loop instead
495+ * of here, then this function would become be a no-op after
496+ * receiving the ServerHelloDone in the false start case, and we
497+ * would never complete the handshake.
498+ */
499+ PORT_Assert(!ss->firstHsDone);
500+
501+ if (ssl3_WaitingForStartOfServerSecondRound(ss)) {
502+ keepGoing = PR_FALSE;
503+ } else {
504+ ss->ssl3.hs.canFalseStart = PR_FALSE;
505+ }
506 }
507- } while (ss->ssl3.hs.ws != idle_handshake &&
508- !canFalseStart &&
509- ss->gs.buf.len == 0);
510+ ssl_ReleaseSSL3HandshakeLock(ss);
511+ } while (keepGoing);
512+
513
514 ss->gs.readOffset = 0;
515 ss->gs.writeOffset = ss->gs.buf.len;
516@@ -404,7 +438,10 @@ ssl3_GatherAppDataRecord(sslSocket *ss, int flags)
517 {
518 int rv;
519
520+ /* ssl3_GatherCompleteHandshake requires both of these locks. */
521+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
522 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
523+
524 do {
525 rv = ssl3_GatherCompleteHandshake(ss, flags);
526 } while (rv > 0 && ss->gs.buf.len == 0);
527diff --git a/nss/lib/ssl/sslauth.c b/nss/lib/ssl/sslauth.c
528index d2f57bf..cb956d4 100644
529--- a/nss/lib/ssl/sslauth.c
530+++ b/nss/lib/ssl/sslauth.c
531@@ -60,7 +60,6 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
532 sslSocket *ss;
533 const char *cipherName;
534 PRBool isDes = PR_FALSE;
535- PRBool enoughFirstHsDone = PR_FALSE;
536
537 ss = ssl_FindSocket(fd);
538 if (!ss) {
539@@ -78,14 +77,7 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
540 *op = SSL_SECURITY_STATUS_OFF;
541 }
542
543- if (ss->firstHsDone) {
544- enoughFirstHsDone = PR_TRUE;
545- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
546- ssl3_CanFalseStart(ss)) {
547- enoughFirstHsDone = PR_TRUE;
548- }
549-
550- if (ss->opt.useSecurity && enoughFirstHsDone) {
551+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
552 if (ss->version < SSL_LIBRARY_VERSION_3_0) {
553 cipherName = ssl_cipherName[ss->sec.cipherType];
554 } else {
555diff --git a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h
556index 90e9567..bf0d67f 100644
557--- a/nss/lib/ssl/sslimpl.h
558+++ b/nss/lib/ssl/sslimpl.h
559@@ -842,6 +842,8 @@ const ssl3CipherSuiteDef *suite_def;
560 /* Shared state between ssl3_HandleFinished and ssl3_FinishHandshake */
561 PRBool cacheSID;
562
563+ PRBool canFalseStart; /* Can/did we False Start */
564+
565 /* clientSigAndHash contains the contents of the signature_algorithms
566 * extension (if any) from the client. This is only valid for TLS 1.2
567 * or later. */
568@@ -1116,6 +1118,10 @@ struct sslSocketStr {
569 unsigned long clientAuthRequested;
570 unsigned long delayDisabled; /* Nagle delay disabled */
571 unsigned long firstHsDone; /* first handshake is complete. */
572+ unsigned long enoughFirstHsDone; /* enough of the first handshake is
573+ * done for callbacks to be able to
574+ * retrieve channel security
575+ * parameters from the SSL socket. */
576 unsigned long handshakeBegun;
577 unsigned long lastWriteBlocked;
578 unsigned long recvdCloseNotify; /* received SSL EOF. */
579@@ -1156,6 +1162,8 @@ const unsigned char * preferredCipher;
580 void *badCertArg;
581 SSLHandshakeCallback handshakeCallback;
582 void *handshakeCallbackData;
583+ SSLCanFalseStartCallback canFalseStartCallback;
584+ void *canFalseStartCallbackData;
585 void *pkcs11PinArg;
586 SSLNextProtoCallback nextProtoCallback;
587 void *nextProtoArg;
588@@ -1358,7 +1366,19 @@ extern void ssl3_SetAlwaysBlock(sslSocket *ss);
589
590 extern SECStatus ssl_EnableNagleDelay(sslSocket *ss, PRBool enabled);
591
592-extern PRBool ssl3_CanFalseStart(sslSocket *ss);
593+extern void ssl_FinishHandshake(sslSocket *ss);
594+
595+/* Returns PR_TRUE if we are still waiting for the server to respond to our
596+ * client second round. Once we've received any part of the server's second
597+ * round then we don't bother trying to false start since it is almost always
598+ * the case that the NewSessionTicket, ChangeCipherSoec, and Finished messages
599+ * were sent in the same packet and we want to process them all at the same
600+ * time. If we were to try to false start in the middle of the server's second
601+ * round, then we would increase the number of I/O operations
602+ * (SSL_ForceHandshake/PR_Recv/PR_Send/etc.) needed to finish the handshake.
603+ */
604+extern PRBool ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss);
605+
606 extern SECStatus
607 ssl3_CompressMACEncryptRecord(ssl3CipherSpec * cwSpec,
608 PRBool isServer,
609diff --git a/nss/lib/ssl/sslinfo.c b/nss/lib/ssl/sslinfo.c
610index 9f2597e..d0c23b7 100644
611--- a/nss/lib/ssl/sslinfo.c
612+++ b/nss/lib/ssl/sslinfo.c
613@@ -26,7 +26,6 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
614 sslSocket * ss;
615 SSLChannelInfo inf;
616 sslSessionID * sid;
617- PRBool enoughFirstHsDone = PR_FALSE;
618
619 if (!info || len < sizeof inf.length) {
620 PORT_SetError(SEC_ERROR_INVALID_ARGS);
621@@ -43,14 +42,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
622 memset(&inf, 0, sizeof inf);
623 inf.length = PR_MIN(sizeof inf, len);
624
625- if (ss->firstHsDone) {
626- enoughFirstHsDone = PR_TRUE;
627- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
628- ssl3_CanFalseStart(ss)) {
629- enoughFirstHsDone = PR_TRUE;
630- }
631-
632- if (ss->opt.useSecurity && enoughFirstHsDone) {
633+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
634 sid = ss->sec.ci.sid;
635 inf.protocolVersion = ss->version;
636 inf.authKeyBits = ss->sec.authKeyBits;
637diff --git a/nss/lib/ssl/sslreveal.c b/nss/lib/ssl/sslreveal.c
638index dc14794..d972998 100644
639--- a/nss/lib/ssl/sslreveal.c
640+++ b/nss/lib/ssl/sslreveal.c
641@@ -77,7 +77,6 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
642 {
643 /* some decisions derived from SSL_GetChannelInfo */
644 sslSocket * sslsocket = NULL;
645- PRBool enoughFirstHsDone = PR_FALSE;
646
647 if (!pYes) {
648 PORT_SetError(SEC_ERROR_INVALID_ARGS);
649@@ -93,14 +92,8 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
650
651 *pYes = PR_FALSE;
652
653- if (sslsocket->firstHsDone) {
654- enoughFirstHsDone = PR_TRUE;
655- } else if (sslsocket->ssl3.initialized && ssl3_CanFalseStart(sslsocket)) {
656- enoughFirstHsDone = PR_TRUE;
657- }
658-
659 /* according to public API SSL_GetChannelInfo, this doesn't need a lock */
660- if (sslsocket->opt.useSecurity && enoughFirstHsDone) {
661+ if (sslsocket->opt.useSecurity) {
662 if (sslsocket->ssl3.initialized) { /* SSL3 and TLS */
663 /* now we know this socket went through ssl3_InitState() and
664 * ss->xtnData got initialized, which is the only member accessed by
665diff --git a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c
666index 49bb42b..d0df442 100644
667--- a/nss/lib/ssl/sslsecur.c
668+++ b/nss/lib/ssl/sslsecur.c
669@@ -97,23 +97,13 @@ ssl_Do1stHandshake(sslSocket *ss)
670 ss->securityHandshake = 0;
671 }
672 if (ss->handshake == 0) {
673- ssl_GetRecvBufLock(ss);
674- ss->gs.recordLen = 0;
675- ssl_ReleaseRecvBufLock(ss);
676-
677- SSL_TRC(3, ("%d: SSL[%d]: handshake is completed",
678- SSL_GETPID(), ss->fd));
679- /* call handshake callback for ssl v2 */
680- /* for v3 this is done in ssl3_HandleFinished() */
681- if ((ss->handshakeCallback != NULL) && /* has callback */
682- (!ss->firstHsDone) && /* only first time */
683- (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */
684- ss->firstHsDone = PR_TRUE;
685- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
686+ /* for v3 this is done in ssl3_FinishHandshake */
687+ if (!ss->firstHsDone && ss->version < SSL_LIBRARY_VERSION_3_0) {
688+ ssl_GetRecvBufLock(ss);
689+ ss->gs.recordLen = 0;
690+ ssl_FinishHandshake(ss);
691+ ssl_ReleaseRecvBufLock(ss);
692 }
693- ss->firstHsDone = PR_TRUE;
694- ss->gs.writeOffset = 0;
695- ss->gs.readOffset = 0;
696 break;
697 }
698 rv = (*ss->handshake)(ss);
699@@ -134,6 +124,24 @@ ssl_Do1stHandshake(sslSocket *ss)
700 return rv;
701 }
702
703+void
704+ssl_FinishHandshake(sslSocket *ss)
705+{
706+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
707+ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
708+
709+ SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", SSL_GETPID(), ss->fd));
710+
711+ ss->firstHsDone = PR_TRUE;
712+ ss->enoughFirstHsDone = PR_TRUE;
713+ ss->gs.writeOffset = 0;
714+ ss->gs.readOffset = 0;
715+
716+ if (ss->handshakeCallback) {
717+ (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
718+ }
719+}
720+
721 /*
722 * Handshake function that blocks. Used to force a
723 * retry on a connection on the next read/write.
724@@ -206,6 +214,7 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
725 ssl_Get1stHandshakeLock(ss);
726
727 ss->firstHsDone = PR_FALSE;
728+ ss->enoughFirstHsDone = PR_FALSE;
729 if ( asServer ) {
730 ss->handshake = ssl2_BeginServerHandshake;
731 ss->handshaking = sslHandshakingAsServer;
732@@ -221,6 +230,8 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
733 ssl_ReleaseRecvBufLock(ss);
734
735 ssl_GetSSL3HandshakeLock(ss);
736+ ss->ssl3.hs.canFalseStart = PR_FALSE;
737+ ss->ssl3.hs.restartTarget = NULL;
738
739 /*
740 ** Blow away old security state and get a fresh setup.
741@@ -331,6 +342,71 @@ SSL_HandshakeCallback(PRFileDesc *fd, SSLHandshakeCallback cb,
742 return SECSuccess;
743 }
744
745+/* Register an application callback to be called when false start may happen.
746+** Acquires and releases HandshakeLock.
747+*/
748+SECStatus
749+SSL_SetCanFalseStartCallback(PRFileDesc *fd, SSLCanFalseStartCallback cb,
750+ void *arg)
751+{
752+ sslSocket *ss;
753+
754+ ss = ssl_FindSocket(fd);
755+ if (!ss) {
756+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetCanFalseStartCallback",
757+ SSL_GETPID(), fd));
758+ return SECFailure;
759+ }
760+
761+ if (!ss->opt.useSecurity) {
762+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
763+ return SECFailure;
764+ }
765+
766+ ssl_Get1stHandshakeLock(ss);
767+ ssl_GetSSL3HandshakeLock(ss);
768+
769+ ss->canFalseStartCallback = cb;
770+ ss->canFalseStartCallbackData = arg;
771+
772+ ssl_ReleaseSSL3HandshakeLock(ss);
773+ ssl_Release1stHandshakeLock(ss);
774+
775+ return SECSuccess;
776+}
777+
778+SECStatus
779+SSL_RecommendedCanFalseStart(PRFileDesc *fd, PRBool *canFalseStart)
780+{
781+ sslSocket *ss;
782+
783+ *canFalseStart = PR_FALSE;
784+ ss = ssl_FindSocket(fd);
785+ if (!ss) {
786+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_RecommendedCanFalseStart",
787+ SSL_GETPID(), fd));
788+ return SECFailure;
789+ }
790+
791+ if (!ss->ssl3.initialized) {
792+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
793+ return SECFailure;
794+ }
795+
796+ if (ss->version < SSL_LIBRARY_VERSION_3_0) {
797+ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2);
798+ return SECFailure;
799+ }
800+
801+ /* Require a forward-secret key exchange. */
802+ *canFalseStart = ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
803+ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
804+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
805+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa;
806+
807+ return SECSuccess;
808+}
809+
810 /* Try to make progress on an SSL handshake by attempting to read the
811 ** next handshake from the peer, and sending any responses.
812 ** For non-blocking sockets, returns PR_ERROR_WOULD_BLOCK if it cannot
813@@ -524,6 +600,9 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
814 int amount;
815 int available;
816
817+ /* ssl3_GatherAppDataRecord may call ssl_FinishHandshake, which needs the
818+ * 1stHandshakeLock. */
819+ ssl_Get1stHandshakeLock(ss);
820 ssl_GetRecvBufLock(ss);
821
822 available = ss->gs.writeOffset - ss->gs.readOffset;
823@@ -590,6 +669,7 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
824
825 done:
826 ssl_ReleaseRecvBufLock(ss);
827+ ssl_Release1stHandshakeLock(ss);
828 return rv;
829 }
830
831@@ -1156,7 +1236,7 @@ ssl_SecureRead(sslSocket *ss, unsigned char *buf, int len)
832 int
833 ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
834 {
835- int rv = 0;
836+ int rv = 0;
837
838 SSL_TRC(2, ("%d: SSL[%d]: SecureSend: sending %d bytes",
839 SSL_GETPID(), ss->fd, len));
840@@ -1191,19 +1271,15 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
841 ss->writerThread = PR_GetCurrentThread();
842 /* If any of these is non-zero, the initial handshake is not done. */
843 if (!ss->firstHsDone) {
844- PRBool canFalseStart = PR_FALSE;
845+ PRBool falseStart = PR_FALSE;
846 ssl_Get1stHandshakeLock(ss);
847- if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
848+ if (ss->opt.enableFalseStart &&
849+ ss->version >= SSL_LIBRARY_VERSION_3_0) {
850 ssl_GetSSL3HandshakeLock(ss);
851- if ((ss->ssl3.hs.ws == wait_change_cipher ||
852- ss->ssl3.hs.ws == wait_finished ||
853- ss->ssl3.hs.ws == wait_new_session_ticket) &&
854- ssl3_CanFalseStart(ss)) {
855- canFalseStart = PR_TRUE;
856- }
857+ falseStart = ss->ssl3.hs.canFalseStart;
858 ssl_ReleaseSSL3HandshakeLock(ss);
859 }
860- if (!canFalseStart &&
861+ if (!falseStart &&
862 (ss->handshake || ss->nextHandshake || ss->securityHandshake)) {
863 rv = ssl_Do1stHandshake(ss);
864 }
865@@ -1228,6 +1304,17 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
866 goto done;
867 }
868
869+ if (!ss->firstHsDone) {
870+ PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_3_0);
871+#ifdef DEBUG
872+ ssl_GetSSL3HandshakeLock(ss);
873+ PORT_Assert(ss->ssl3.hs.canFalseStart);
874+ ssl_ReleaseSSL3HandshakeLock(ss);
875+#endif
876+ SSL_TRC(3, ("%d: SSL[%d]: SecureSend: sending data due to false start",
877+ SSL_GETPID(), ss->fd));
878+ }
879+
880 /* Send out the data using one of these functions:
881 * ssl2_SendClear, ssl2_SendStream, ssl2_SendBlock,
882 * ssl3_SendApplicationData
883diff --git a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c
884index cd4a7a7..73e069b 100644
885--- a/nss/lib/ssl/sslsock.c
886+++ b/nss/lib/ssl/sslsock.c
887@@ -349,6 +349,8 @@ ssl_DupSocket(sslSocket *os)
888 ss->badCertArg = os->badCertArg;
889 ss->handshakeCallback = os->handshakeCallback;
890 ss->handshakeCallbackData = os->handshakeCallbackData;
891+ ss->canFalseStartCallback = os->canFalseStartCallback;
892+ ss->canFalseStartCallbackData = os->canFalseStartCallbackData;
893 ss->pkcs11PinArg = os->pkcs11PinArg;
894
895 /* Create security data */
896@@ -2341,10 +2343,14 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *p_out_flags)
897 } else if (new_flags & PR_POLL_WRITE) {
898 /* The caller is trying to write, but the handshake is
899 ** blocked waiting for data to read, and the first
900- ** handshake has been sent. so do NOT to poll on write.
901+ ** handshake has been sent. So do NOT to poll on write
902+ ** unless we did false start.
903 */
904- new_flags ^= PR_POLL_WRITE; /* don't select on write. */
905- new_flags |= PR_POLL_READ; /* do select on read. */
906+ if (!(ss->version >= SSL_LIBRARY_VERSION_3_0 &&
907+ ss->ssl3.hs.canFalseStart)) {
908+ new_flags ^= PR_POLL_WRITE; /* don't select on write. */
909+ }
910+ new_flags |= PR_POLL_READ; /* do select on read. */
911 }
912 }
913 } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) {
914--
9151.7.9.5
916
diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch b/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch
new file mode 100644
index 0000000000..f30475b16b
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch
@@ -0,0 +1,48 @@
1nss: CVE-2013-5606
2
3Upstream-Status: Backport
4
5the patch comes from:
6http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-5606
7https://bugzilla.mozilla.org/show_bug.cgi?id=910438
8http://hg.mozilla.org/projects/nss/rev/d29898e0981c
9
10The CERT_VerifyCert function in lib/certhigh/certvfy.c in
11Mozilla Network Security Services (NSS) 3.15 before 3.15.3 provides
12an unexpected return value for an incompatible key-usage certificate
13when the CERTVerifyLog argument is valid, which might allow remote
14attackers to bypass intended access restrictions via a crafted certificate.
15
16Signed-off-by: Li Wang <li.wang@windriver.com>
17---
18 nss/lib/certhigh/certvfy.c | 7 +++++--
19 1 file changed, 5 insertions(+), 2 deletions(-)
20
21diff --git a/nss/lib/certhigh/certvfy.c b/nss/lib/certhigh/certvfy.c
22index f364ceb..f450205 100644
23--- a/nss/lib/certhigh/certvfy.c
24+++ b/nss/lib/certhigh/certvfy.c
25@@ -1312,7 +1312,7 @@ CERT_VerifyCert(CERTCertDBHandle *handle, CERTCertificate *cert,
26 PORT_SetError(SEC_ERROR_UNTRUSTED_CERT);
27 LOG_ERROR_OR_EXIT(log,cert,0,flags);
28 } else if (trusted) {
29- goto winner;
30+ goto done;
31 }
32
33
34@@ -1340,7 +1340,10 @@ CERT_VerifyCert(CERTCertDBHandle *handle, CERTCertificate *cert,
35 }
36 }
37
38-winner:
39+done:
40+ if (log && log->head) {
41+ return SECFailure;
42+ }
43 return(SECSuccess);
44
45 loser:
46--
471.7.9.5
48
diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
new file mode 100644
index 0000000000..1be8a17870
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
@@ -0,0 +1,68 @@
1nss: CVE-2014-1492
2
3Upstream-Status: Backport
4
5the patch comes from:
6http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1492
7https://bugzilla.mozilla.org/show_bug.cgi?id=903885
8
9changeset: 11063:709d4e597979
10user: Kai Engert <kaie@kuix.de>
11date: Wed Mar 05 18:38:55 2014 +0100
12summary: Bug 903885, address requests to clarify comments from wtc
13
14changeset: 11046:2ffa40a3ff55
15tag: tip
16user: Wan-Teh Chang <wtc@google.com>
17date: Tue Feb 25 18:17:08 2014 +0100
18summary: Bug 903885, fix IDNA wildcard handling v4, r=kaie
19
20changeset: 11045:15ea62260c21
21user: Christian Heimes <sites@cheimes.de>
22date: Mon Feb 24 17:50:25 2014 +0100
23summary: Bug 903885, fix IDNA wildcard handling, r=kaie
24
25Signed-off-by: Li Wang <li.wang@windriver.com>
26---
27 nss/lib/certdb/certdb.c | 15 +++++++++------
28 1 file changed, 9 insertions(+), 6 deletions(-)
29
30diff --git a/nss/lib/certdb/certdb.c b/nss/lib/certdb/certdb.c
31index b7d22bd..91877b7 100644
32--- a/nss/lib/certdb/certdb.c
33+++ b/nss/lib/certdb/certdb.c
34@@ -1381,7 +1381,7 @@ cert_TestHostName(char * cn, const char * hn)
35 return rv;
36 }
37 } else {
38- /* New approach conforms to RFC 2818. */
39+ /* New approach conforms to RFC 6125. */
40 char *wildcard = PORT_Strchr(cn, '*');
41 char *firstcndot = PORT_Strchr(cn, '.');
42 char *secondcndot = firstcndot ? PORT_Strchr(firstcndot+1, '.') : NULL;
43@@ -1390,14 +1390,17 @@ cert_TestHostName(char * cn, const char * hn)
44 /* For a cn pattern to be considered valid, the wildcard character...
45 * - may occur only in a DNS name with at least 3 components, and
46 * - may occur only as last character in the first component, and
47- * - may be preceded by additional characters
48+ * - may be preceded by additional characters, and
49+ * - must not be preceded by an IDNA ACE prefix (xn--)
50 */
51 if (wildcard && secondcndot && secondcndot[1] && firsthndot
52- && firstcndot - wildcard == 1
53- && secondcndot - firstcndot > 1
54- && PORT_Strrchr(cn, '*') == wildcard
55+ && firstcndot - wildcard == 1 /* wildcard is last char in first component */
56+ && secondcndot - firstcndot > 1 /* second component is non-empty */
57+ && PORT_Strrchr(cn, '*') == wildcard /* only one wildcard in cn */
58 && !PORT_Strncasecmp(cn, hn, wildcard - cn)
59- && !PORT_Strcasecmp(firstcndot, firsthndot)) {
60+ && !PORT_Strcasecmp(firstcndot, firsthndot)
61+ /* If hn starts with xn--, then cn must start with wildcard */
62+ && (PORT_Strncasecmp(hn, "xn--", 4) || wildcard == cn)) {
63 /* valid wildcard pattern match */
64 return SECSuccess;
65 }
66--
671.7.9.5
68
diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch
new file mode 100644
index 0000000000..d6434dfe23
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch
@@ -0,0 +1,41 @@
1nss: CVE-2014-1544
2
3the patch comes from:
4https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-1544
5https://hg.mozilla.org/projects/nss/rev/204f22c527f8
6
7author Robert Relyea <rrelyea@redhat.com>
8https://bugzilla.mozilla.org/show_bug.cgi?id=963150
9Bug 963150: Add nssCertificate_AddRef and nssCertificate_Destroy calls
10to PK11_ImportCert to prevent nssTrustDomain_AddCertsToCache from
11freeing the CERTCertificate associated with the NSSCertificate. r=wtc.
12
13Upstream-Status: Pending
14Signed-off-by: Li Wang <li.wang@windriver.com>
15---
16 nss/lib/pk11wrap/pk11cert.c | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19diff --git a/nss/lib/pk11wrap/pk11cert.c b/nss/lib/pk11wrap/pk11cert.c
20index 39168b9..3f3edb1 100644
21--- a/nss/lib/pk11wrap/pk11cert.c
22+++ b/nss/lib/pk11wrap/pk11cert.c
23@@ -981,8 +981,15 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert,
24 * CERTCertificate, and finish
25 */
26 nssPKIObject_AddInstance(&c->object, certobj);
27+ /* nssTrustDomain_AddCertsToCache may release a reference to 'c' and
28+ * replace 'c' by a different value. So we add a reference to 'c' to
29+ * prevent 'c' from being destroyed. */
30+ nssCertificate_AddRef(c);
31 nssTrustDomain_AddCertsToCache(STAN_GetDefaultTrustDomain(), &c, 1);
32+ /* XXX should we pass the original value of 'c' to
33+ * STAN_ForceCERTCertificateUpdate? */
34 (void)STAN_ForceCERTCertificateUpdate(c);
35+ nssCertificate_Destroy(c);
36 SECITEM_FreeItem(keyID,PR_TRUE);
37 return SECSuccess;
38 loser:
39--
401.7.9.5
41
diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch
new file mode 100644
index 0000000000..dbdb00ce2b
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch
@@ -0,0 +1,670 @@
1nss: CVE-2014-1568
2
3the patch comes from:
4http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1568
5https://bugzilla.mozilla.org/show_bug.cgi?id=1064636
6nss ng log:
7=====
8changeset: 11252:ad411fb64046
9user: Kai Engert <kaie@kuix.de>
10date: Tue Sep 23 19:28:34 2014 +0200
11summary: Fix bug 1064636, patch part 2, r=rrelyea
12=====
13changeset: 11253:4e90910ad2f9
14user: Kai Engert <kaie@kuix.de>
15date: Tue Sep 23 19:28:45 2014 +0200
16summary: Fix bug 1064636, patch part 3, r=rrelyea
17=====
18changeset: 11254:fb7208e91ae8
19user: Kai Engert <kaie@kuix.de>
20date: Tue Sep 23 19:28:52 2014 +0200
21summary: Fix bug 1064636, patch part 1, r=rrelyea
22=====
23changeset: 11255:8dd6c6ac977d
24user: Kai Engert <kaie@kuix.de>
25date: Tue Sep 23 19:39:40 2014 +0200
26summary: Bug 1064636, follow up commit to fix Windows build bustage
27
28Upstream-Status: Backport
29Signed-off-by: Li Wang <li.wang@windriver.com>
30---
31 nss/lib/cryptohi/secvfy.c | 202 +++++++++++++++++++++++++++-----------------
32 nss/lib/softoken/pkcs11c.c | 69 +++++++--------
33 nss/lib/util/manifest.mn | 2 +
34 nss/lib/util/nssutil.def | 6 ++
35 nss/lib/util/pkcs1sig.c | 169 ++++++++++++++++++++++++++++++++++++
36 nss/lib/util/pkcs1sig.h | 30 +++++++
37 6 files changed, 360 insertions(+), 118 deletions(-)
38 create mode 100644 nss/lib/util/pkcs1sig.c
39 create mode 100644 nss/lib/util/pkcs1sig.h
40
41diff --git a/nss/lib/cryptohi/secvfy.c b/nss/lib/cryptohi/secvfy.c
42index c1ac39b..0a20672 100644
43--- a/nss/lib/cryptohi/secvfy.c
44+++ b/nss/lib/cryptohi/secvfy.c
45@@ -12,78 +12,111 @@
46 #include "secasn1.h"
47 #include "secoid.h"
48 #include "pk11func.h"
49+#include "pkcs1sig.h"
50 #include "secdig.h"
51 #include "secerr.h"
52 #include "keyi.h"
53
54 /*
55-** Decrypt signature block using public key
56-** Store the hash algorithm oid tag in *tagp
57-** Store the digest in the digest buffer
58-** Store the digest length in *digestlen
59+** Recover the DigestInfo from an RSA PKCS#1 signature.
60+**
61+** If givenDigestAlg != SEC_OID_UNKNOWN, copy givenDigestAlg to digestAlgOut.
62+** Otherwise, parse the DigestInfo structure and store the decoded digest
63+** algorithm into digestAlgOut.
64+**
65+** Store the encoded DigestInfo into digestInfo.
66+** Store the DigestInfo length into digestInfoLen.
67+**
68+** This function does *not* verify that the AlgorithmIdentifier in the
69+** DigestInfo identifies givenDigestAlg or that the DigestInfo is encoded
70+** correctly; verifyPKCS1DigestInfo does that.
71+**
72 ** XXX this is assuming that the signature algorithm has WITH_RSA_ENCRYPTION
73 */
74 static SECStatus
75-DecryptSigBlock(SECOidTag *tagp, unsigned char *digest,
76- unsigned int *digestlen, unsigned int maxdigestlen,
77- SECKEYPublicKey *key, const SECItem *sig, char *wincx)
78+recoverPKCS1DigestInfo(SECOidTag givenDigestAlg,
79+ /*out*/ SECOidTag* digestAlgOut,
80+ /*out*/ unsigned char** digestInfo,
81+ /*out*/ unsigned int* digestInfoLen,
82+ SECKEYPublicKey* key,
83+ const SECItem* sig, void* wincx)
84 {
85- SGNDigestInfo *di = NULL;
86- unsigned char *buf = NULL;
87- SECStatus rv;
88- SECOidTag tag;
89- SECItem it;
90-
91- if (key == NULL) goto loser;
92-
93+ SGNDigestInfo* di = NULL;
94+ SECItem it;
95+ PRBool rv = SECSuccess;
96+
97+ PORT_Assert(digestAlgOut);
98+ PORT_Assert(digestInfo);
99+ PORT_Assert(digestInfoLen);
100+ PORT_Assert(key);
101+ PORT_Assert(key->keyType == rsaKey);
102+ PORT_Assert(sig);
103+
104+ it.data = NULL;
105 it.len = SECKEY_PublicKeyStrength(key);
106- if (!it.len) goto loser;
107- it.data = buf = (unsigned char *)PORT_Alloc(it.len);
108- if (!buf) goto loser;
109+ if (it.len != 0) {
110+ it.data = (unsigned char *)PORT_Alloc(it.len);
111+ }
112+ if (it.len == 0 || it.data == NULL ) {
113+ rv = SECFailure;
114+ }
115
116- /* decrypt the block */
117- rv = PK11_VerifyRecover(key, (SECItem *)sig, &it, wincx);
118- if (rv != SECSuccess) goto loser;
119+ if (rv == SECSuccess) {
120+ /* decrypt the block */
121+ rv = PK11_VerifyRecover(key, sig, &it, wincx);
122+ }
123
124- di = SGN_DecodeDigestInfo(&it);
125- if (di == NULL) goto sigloser;
126+ if (rv == SECSuccess) {
127+ if (givenDigestAlg != SEC_OID_UNKNOWN) {
128+ /* We don't need to parse the DigestInfo if the caller gave us the
129+ * digest algorithm to use. Later verifyPKCS1DigestInfo will verify
130+ * that the DigestInfo identifies the given digest algorithm and
131+ * that the DigestInfo is encoded absolutely correctly.
132+ */
133+ *digestInfoLen = it.len;
134+ *digestInfo = (unsigned char*)it.data;
135+ *digestAlgOut = givenDigestAlg;
136+ return SECSuccess;
137+ }
138+ }
139
140- /*
141- ** Finally we have the digest info; now we can extract the algorithm
142- ** ID and the signature block
143- */
144- tag = SECOID_GetAlgorithmTag(&di->digestAlgorithm);
145- /* Check that tag is an appropriate algorithm */
146- if (tag == SEC_OID_UNKNOWN) {
147- goto sigloser;
148- }
149- /* make sure the "parameters" are not too bogus. */
150- if (di->digestAlgorithm.parameters.len > 2) {
151- goto sigloser;
152- }
153- if (di->digest.len > maxdigestlen) {
154- PORT_SetError(SEC_ERROR_OUTPUT_LEN);
155- goto loser;
156+ if (rv == SECSuccess) {
157+ /* The caller didn't specify a digest algorithm to use, so choose the
158+ * digest algorithm by parsing the AlgorithmIdentifier within the
159+ * DigestInfo.
160+ */
161+ di = SGN_DecodeDigestInfo(&it);
162+ if (!di) {
163+ rv = SECFailure;
164+ }
165 }
166- PORT_Memcpy(digest, di->digest.data, di->digest.len);
167- *tagp = tag;
168- *digestlen = di->digest.len;
169- goto done;
170
171- sigloser:
172- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
173+ if (rv == SECSuccess) {
174+ *digestAlgOut = SECOID_GetAlgorithmTag(&di->digestAlgorithm);
175+ if (*digestAlgOut == SEC_OID_UNKNOWN) {
176+ rv = SECFailure;
177+ }
178+ }
179
180- loser:
181- rv = SECFailure;
182+ if (di) {
183+ SGN_DestroyDigestInfo(di);
184+ }
185+
186+ if (rv == SECSuccess) {
187+ *digestInfoLen = it.len;
188+ *digestInfo = (unsigned char*)it.data;
189+ } else {
190+ if (it.data) {
191+ PORT_Free(it.data);
192+ }
193+ *digestInfo = NULL;
194+ *digestInfoLen = 0;
195+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
196+ }
197
198- done:
199- if (di != NULL) SGN_DestroyDigestInfo(di);
200- if (buf != NULL) PORT_Free(buf);
201-
202 return rv;
203 }
204
205-
206 struct VFYContextStr {
207 SECOidTag hashAlg; /* the hash algorithm */
208 SECKEYPublicKey *key;
209@@ -99,14 +132,14 @@ struct VFYContextStr {
210 union {
211 unsigned char buffer[1];
212
213- /* the digest in the decrypted RSA signature */
214- unsigned char rsadigest[HASH_LENGTH_MAX];
215 /* the full DSA signature... 40 bytes */
216 unsigned char dsasig[DSA_MAX_SIGNATURE_LEN];
217 /* the full ECDSA signature */
218 unsigned char ecdsasig[2 * MAX_ECKEY_LEN];
219 } u;
220- unsigned int rsadigestlen;
221+ unsigned int pkcs1RSADigestInfoLen;
222+ /* the encoded DigestInfo from a RSA PKCS#1 signature */
223+ unsigned char *pkcs1RSADigestInfo;
224 void * wincx;
225 void *hashcx;
226 const SECHashObject *hashobj;
227@@ -117,6 +150,17 @@ struct VFYContextStr {
228 * VFY_EndWithSignature call. */
229 };
230
231+static SECStatus
232+verifyPKCS1DigestInfo(const VFYContext* cx, const SECItem* digest)
233+{
234+ SECItem pkcs1DigestInfo;
235+ pkcs1DigestInfo.data = cx->pkcs1RSADigestInfo;
236+ pkcs1DigestInfo.len = cx->pkcs1RSADigestInfoLen;
237+ return _SGN_VerifyPKCS1DigestInfo(
238+ cx->hashAlg, digest, &pkcs1DigestInfo,
239+ PR_TRUE /*XXX: unsafeAllowMissingParameters*/);
240+}
241+
242 /*
243 * decode the ECDSA or DSA signature from it's DER wrapping.
244 * The unwrapped/raw signature is placed in the buffer pointed
245@@ -376,16 +420,16 @@ vfy_CreateContext(const SECKEYPublicKey *key, const SECItem *sig,
246 cx->encAlg = encAlg;
247 cx->hashAlg = hashAlg;
248 cx->key = SECKEY_CopyPublicKey(key);
249+ cx->pkcs1RSADigestInfo = NULL;
250 rv = SECSuccess;
251 if (sig) {
252 switch (type) {
253 case rsaKey:
254- rv = DecryptSigBlock(&cx->hashAlg, cx->u.buffer, &cx->rsadigestlen,
255- HASH_LENGTH_MAX, cx->key, sig, (char*)wincx);
256- if (cx->hashAlg != hashAlg && hashAlg != SEC_OID_UNKNOWN) {
257- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
258- rv = SECFailure;
259- }
260+ rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
261+ &cx->pkcs1RSADigestInfo,
262+ &cx->pkcs1RSADigestInfoLen,
263+ cx->key,
264+ sig, wincx);
265 break;
266 case dsaKey:
267 case ecKey:
268@@ -469,6 +513,9 @@ VFY_DestroyContext(VFYContext *cx, PRBool freeit)
269 if (cx->key) {
270 SECKEY_DestroyPublicKey(cx->key);
271 }
272+ if (cx->pkcs1RSADigestInfo) {
273+ PORT_Free(cx->pkcs1RSADigestInfo);
274+ }
275 if (freeit) {
276 PORT_ZFree(cx, sizeof(VFYContext));
277 }
278@@ -548,21 +595,25 @@ VFY_EndWithSignature(VFYContext *cx, SECItem *sig)
279 }
280 break;
281 case rsaKey:
282+ {
283+ SECItem digest;
284+ digest.data = final;
285+ digest.len = part;
286 if (sig) {
287- SECOidTag hashid = SEC_OID_UNKNOWN;
288- rv = DecryptSigBlock(&hashid, cx->u.buffer, &cx->rsadigestlen,
289- HASH_LENGTH_MAX, cx->key, sig, (char*)cx->wincx);
290- if ((rv != SECSuccess) || (hashid != cx->hashAlg)) {
291- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
292+ SECOidTag hashid;
293+ PORT_Assert(cx->hashAlg != SEC_OID_UNKNOWN);
294+ rv = recoverPKCS1DigestInfo(cx->hashAlg, &hashid,
295+ &cx->pkcs1RSADigestInfo,
296+ &cx->pkcs1RSADigestInfoLen,
297+ cx->key,
298+ sig, cx->wincx);
299+ PORT_Assert(cx->hashAlg == hashid);
300+ if (rv != SECSuccess) {
301 return SECFailure;
302 }
303 }
304- if ((part != cx->rsadigestlen) ||
305- PORT_Memcmp(final, cx->u.buffer, part)) {
306- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
307- return SECFailure;
308- }
309- break;
310+ return verifyPKCS1DigestInfo(cx, &digest);
311+ }
312 default:
313 PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
314 return SECFailure; /* shouldn't happen */
315@@ -595,12 +646,7 @@ vfy_VerifyDigest(const SECItem *digest, const SECKEYPublicKey *key,
316 if (cx != NULL) {
317 switch (key->keyType) {
318 case rsaKey:
319- if ((digest->len != cx->rsadigestlen) ||
320- PORT_Memcmp(digest->data, cx->u.buffer, digest->len)) {
321- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
322- } else {
323- rv = SECSuccess;
324- }
325+ rv = verifyPKCS1DigestInfo(cx, digest);
326 break;
327 case dsaKey:
328 case ecKey:
329diff --git a/nss/lib/softoken/pkcs11c.c b/nss/lib/softoken/pkcs11c.c
330index 89b5bd8..ba6dcfa 100644
331--- a/nss/lib/softoken/pkcs11c.c
332+++ b/nss/lib/softoken/pkcs11c.c
333@@ -23,6 +23,7 @@
334 #include "blapi.h"
335 #include "pkcs11.h"
336 #include "pkcs11i.h"
337+#include "pkcs1sig.h"
338 #include "lowkeyi.h"
339 #include "secder.h"
340 #include "secdig.h"
341@@ -2580,54 +2581,42 @@ sftk_hashCheckSign(SFTKHashVerifyInfo *info, unsigned char *sig,
342 }
343
344 SECStatus
345-RSA_HashCheckSign(SECOidTag hashOid, NSSLOWKEYPublicKey *key,
346+RSA_HashCheckSign(SECOidTag digestOid, NSSLOWKEYPublicKey *key,
347 unsigned char *sig, unsigned int sigLen,
348- unsigned char *digest, unsigned int digestLen)
349+ unsigned char *digestData, unsigned int digestLen)
350 {
351+ unsigned char *pkcs1DigestInfoData;
352+ SECItem pkcs1DigestInfo;
353+ SECItem digest;
354+ unsigned int bufferSize;
355+ SECStatus rv;
356
357- SECItem it;
358- SGNDigestInfo *di = NULL;
359- SECStatus rv = SECSuccess;
360-
361- it.data = NULL;
362-
363- if (key == NULL) goto loser;
364-
365- it.len = nsslowkey_PublicModulusLen(key);
366- if (!it.len) goto loser;
367+ /* pkcs1DigestInfo.data must be less than key->u.rsa.modulus.len */
368+ bufferSize = key->u.rsa.modulus.len;
369+ pkcs1DigestInfoData = PORT_ZAlloc(bufferSize);
370+ if (!pkcs1DigestInfoData) {
371+ PORT_SetError(SEC_ERROR_NO_MEMORY);
372+ return SECFailure;
373+ }
374
375- it.data = (unsigned char *) PORT_Alloc(it.len);
376- if (it.data == NULL) goto loser;
377+ pkcs1DigestInfo.data = pkcs1DigestInfoData;
378+ pkcs1DigestInfo.len = bufferSize;
379
380 /* decrypt the block */
381- rv = RSA_CheckSignRecover(key, it.data, &it.len, it.len, sig, sigLen);
382- if (rv != SECSuccess) goto loser;
383-
384- di = SGN_DecodeDigestInfo(&it);
385- if (di == NULL) goto loser;
386- if (di->digest.len != digestLen) goto loser;
387-
388- /* make sure the tag is OK */
389- if (SECOID_GetAlgorithmTag(&di->digestAlgorithm) != hashOid) {
390- goto loser;
391- }
392- /* make sure the "parameters" are not too bogus. */
393- if (di->digestAlgorithm.parameters.len > 2) {
394- goto loser;
395- }
396- /* Now check the signature */
397- if (PORT_Memcmp(digest, di->digest.data, di->digest.len) == 0) {
398- goto done;
399+ rv = RSA_CheckSignRecover(key, pkcs1DigestInfo.data,
400+ &pkcs1DigestInfo.len, pkcs1DigestInfo.len,
401+ sig, sigLen);
402+ if (rv != SECSuccess) {
403+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
404+ } else {
405+ digest.data = (PRUint8*) digestData;
406+ digest.len = digestLen;
407+ rv = _SGN_VerifyPKCS1DigestInfo(
408+ digestOid, &digest, &pkcs1DigestInfo,
409+ PR_TRUE /*XXX: unsafeAllowMissingParameters*/);
410 }
411
412- loser:
413- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
414- rv = SECFailure;
415-
416- done:
417- if (it.data != NULL) PORT_Free(it.data);
418- if (di != NULL) SGN_DestroyDigestInfo(di);
419-
420+ PORT_Free(pkcs1DigestInfoData);
421 return rv;
422 }
423
424diff --git a/nss/lib/util/manifest.mn b/nss/lib/util/manifest.mn
425index ed54a16..9ff3758 100644
426--- a/nss/lib/util/manifest.mn
427+++ b/nss/lib/util/manifest.mn
428@@ -22,6 +22,7 @@ EXPORTS = \
429 pkcs11t.h \
430 pkcs11n.h \
431 pkcs11u.h \
432+ pkcs1sig.h \
433 portreg.h \
434 secasn1.h \
435 secasn1t.h \
436@@ -58,6 +59,7 @@ CSRCS = \
437 nssrwlk.c \
438 nssilock.c \
439 oidstring.c \
440+ pkcs1sig.c \
441 portreg.c \
442 secalgid.c \
443 secasn1d.c \
444diff --git a/nss/lib/util/nssutil.def b/nss/lib/util/nssutil.def
445index 86a0ad7..9d98df2 100644
446--- a/nss/lib/util/nssutil.def
447+++ b/nss/lib/util/nssutil.def
448@@ -271,3 +271,9 @@ SECITEM_ZfreeArray;
449 ;+ local:
450 ;+ *;
451 ;+};
452+;+NSSUTIL_3.17.1 { # NSS Utilities 3.17.1 release
453+;+ global:
454+_SGN_VerifyPKCS1DigestInfo;
455+;+ local:
456+;+ *;
457+;+};
458diff --git a/nss/lib/util/pkcs1sig.c b/nss/lib/util/pkcs1sig.c
459new file mode 100644
460index 0000000..03b16f5
461--- /dev/null
462+++ b/nss/lib/util/pkcs1sig.c
463@@ -0,0 +1,169 @@
464+/* This Source Code Form is subject to the terms of the Mozilla Public
465+ * License, v. 2.0. If a copy of the MPL was not distributed with this
466+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
467+ */
468+
469+#include "pkcs1sig.h"
470+#include "hasht.h"
471+#include "secerr.h"
472+#include "secasn1t.h"
473+#include "secoid.h"
474+
475+typedef struct pkcs1PrefixStr pkcs1Prefix;
476+struct pkcs1PrefixStr {
477+ unsigned int len;
478+ PRUint8 *data;
479+};
480+
481+typedef struct pkcs1PrefixesStr pkcs1Prefixes;
482+struct pkcs1PrefixesStr {
483+ unsigned int digestLen;
484+ pkcs1Prefix prefixWithParams;
485+ pkcs1Prefix prefixWithoutParams;
486+};
487+
488+/* The value for SGN_PKCS1_DIGESTINFO_MAX_PREFIX_LEN_EXCLUDING_OID is based on
489+ * the possible prefix encodings as explained below.
490+ */
491+#define MAX_PREFIX_LEN_EXCLUDING_OID 10
492+
493+static SECStatus
494+encodePrefix(const SECOidData *hashOid, unsigned int digestLen,
495+ pkcs1Prefix *prefix, PRBool withParams)
496+{
497+ /* with params coding is:
498+ * Sequence (2 bytes) {
499+ * Sequence (2 bytes) {
500+ * Oid (2 bytes) {
501+ * Oid value (derOid->oid.len)
502+ * }
503+ * NULL (2 bytes)
504+ * }
505+ * OCTECT (2 bytes);
506+ *
507+ * without params coding is:
508+ * Sequence (2 bytes) {
509+ * Sequence (2 bytes) {
510+ * Oid (2 bytes) {
511+ * Oid value (derOid->oid.len)
512+ * }
513+ * }
514+ * OCTECT (2 bytes);
515+ */
516+
517+ unsigned int innerSeqLen = 2 + hashOid->oid.len;
518+ unsigned int outerSeqLen = 2 + innerSeqLen + 2 + digestLen;
519+ unsigned int extra = 0;
520+
521+ if (withParams) {
522+ innerSeqLen += 2;
523+ outerSeqLen += 2;
524+ extra = 2;
525+ }
526+
527+ if (innerSeqLen >= 128 ||
528+ outerSeqLen >= 128 ||
529+ (outerSeqLen + 2 - digestLen) >
530+ (MAX_PREFIX_LEN_EXCLUDING_OID + hashOid->oid.len)) {
531+ /* this is actually a library failure, It shouldn't happen */
532+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
533+ return SECFailure;
534+ }
535+
536+ prefix->len = 6 + hashOid->oid.len + extra + 2;
537+ prefix->data = PORT_Alloc(prefix->len);
538+ if (!prefix->data) {
539+ PORT_SetError(SEC_ERROR_NO_MEMORY);
540+ return SECFailure;
541+ }
542+
543+ prefix->data[0] = SEC_ASN1_SEQUENCE|SEC_ASN1_CONSTRUCTED;
544+ prefix->data[1] = outerSeqLen;
545+ prefix->data[2] = SEC_ASN1_SEQUENCE|SEC_ASN1_CONSTRUCTED;
546+ prefix->data[3] = innerSeqLen;
547+ prefix->data[4] = SEC_ASN1_OBJECT_ID;
548+ prefix->data[5] = hashOid->oid.len;
549+ PORT_Memcpy(&prefix->data[6], hashOid->oid.data, hashOid->oid.len);
550+ if (withParams) {
551+ prefix->data[6 + hashOid->oid.len] = SEC_ASN1_NULL;
552+ prefix->data[6 + hashOid->oid.len + 1] = 0;
553+ }
554+ prefix->data[6 + hashOid->oid.len + extra] = SEC_ASN1_OCTET_STRING;
555+ prefix->data[6 + hashOid->oid.len + extra + 1] = digestLen;
556+
557+ return SECSuccess;
558+}
559+
560+SECStatus
561+_SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg,
562+ const SECItem* digest,
563+ const SECItem* dataRecoveredFromSignature,
564+ PRBool unsafeAllowMissingParameters)
565+{
566+ SECOidData *hashOid;
567+ pkcs1Prefixes pp;
568+ const pkcs1Prefix* expectedPrefix;
569+ SECStatus rv, rv2, rv3;
570+
571+ if (!digest || !digest->data ||
572+ !dataRecoveredFromSignature || !dataRecoveredFromSignature->data) {
573+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
574+ return SECFailure;
575+ }
576+
577+ hashOid = SECOID_FindOIDByTag(digestAlg);
578+ if (hashOid == NULL) {
579+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
580+ return SECFailure;
581+ }
582+
583+ pp.digestLen = digest->len;
584+ pp.prefixWithParams.data = NULL;
585+ pp.prefixWithoutParams.data = NULL;
586+
587+ rv2 = encodePrefix(hashOid, pp.digestLen, &pp.prefixWithParams, PR_TRUE);
588+ rv3 = encodePrefix(hashOid, pp.digestLen, &pp.prefixWithoutParams, PR_FALSE);
589+
590+ rv = SECSuccess;
591+ if (rv2 != SECSuccess || rv3 != SECSuccess) {
592+ rv = SECFailure;
593+ }
594+
595+ if (rv == SECSuccess) {
596+ /* We don't attempt to avoid timing attacks on these comparisons because
597+ * signature verification is a public key operation, not a private key
598+ * operation.
599+ */
600+
601+ if (dataRecoveredFromSignature->len ==
602+ pp.prefixWithParams.len + pp.digestLen) {
603+ expectedPrefix = &pp.prefixWithParams;
604+ } else if (unsafeAllowMissingParameters &&
605+ dataRecoveredFromSignature->len ==
606+ pp.prefixWithoutParams.len + pp.digestLen) {
607+ expectedPrefix = &pp.prefixWithoutParams;
608+ } else {
609+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
610+ rv = SECFailure;
611+ }
612+ }
613+
614+ if (rv == SECSuccess) {
615+ if (memcmp(dataRecoveredFromSignature->data, expectedPrefix->data,
616+ expectedPrefix->len) ||
617+ memcmp(dataRecoveredFromSignature->data + expectedPrefix->len,
618+ digest->data, digest->len)) {
619+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
620+ rv = SECFailure;
621+ }
622+ }
623+
624+ if (pp.prefixWithParams.data) {
625+ PORT_Free(pp.prefixWithParams.data);
626+ }
627+ if (pp.prefixWithoutParams.data) {
628+ PORT_Free(pp.prefixWithoutParams.data);
629+ }
630+
631+ return rv;
632+}
633diff --git a/nss/lib/util/pkcs1sig.h b/nss/lib/util/pkcs1sig.h
634new file mode 100644
635index 0000000..7c52b15
636--- /dev/null
637+++ b/nss/lib/util/pkcs1sig.h
638@@ -0,0 +1,30 @@
639+/* This Source Code Form is subject to the terms of the Mozilla Public
640+ * License, v. 2.0. If a copy of the MPL was not distributed with this
641+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
642+ */
643+
644+#ifndef _PKCS1SIG_H_
645+#define _PKCS1SIG_H_
646+
647+#include "hasht.h"
648+#include "seccomon.h"
649+#include "secoidt.h"
650+
651+/* SGN_VerifyPKCS1DigestInfo verifies that the length of the digest is correct
652+ * for the given algorithm, then verifies that the recovered data from the
653+ * PKCS#1 signature is a properly-formatted DigestInfo that identifies the
654+ * given digest algorithm, then verifies that the digest in the DigestInfo
655+ * matches the given digest.
656+ *
657+ * dataRecoveredFromSignature must be the result of calling PK11_VerifyRecover
658+ * or equivalent.
659+ *
660+ * If unsafeAllowMissingParameters is true (not recommended), then a DigestInfo
661+ * without the mandatory ASN.1 NULL parameter will also be accepted.
662+ */
663+SECStatus _SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg,
664+ const SECItem* digest,
665+ const SECItem* dataRecoveredFromSignature,
666+ PRBool unsafeAllowMissingParameters);
667+
668+#endif /* _PKCS1SIG_H_ */
669--
6701.7.9.5
diff --git a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch
new file mode 100644
index 0000000000..547594d5b6
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch
@@ -0,0 +1,110 @@
1nss: fix incorrect shebang of perl
2
3Replace incorrect shebang of perl with `#!/usr/bin/env perl'.
4
5Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
6Upstream-Status: Pending
7---
8 nss/cmd/smimetools/smime | 2 +-
9 nss/coreconf/cpdist.pl | 2 +-
10 nss/coreconf/import.pl | 2 +-
11 nss/coreconf/jniregen.pl | 2 +-
12 nss/coreconf/outofdate.pl | 2 +-
13 nss/coreconf/release.pl | 2 +-
14 nss/coreconf/version.pl | 2 +-
15 nss/tests/clean_tbx | 2 +-
16 nss/tests/path_uniq | 2 +-
17 9 files changed, 9 insertions(+), 9 deletions(-)
18
19diff --git a/nss/cmd/smimetools/smime b/nss/cmd/smimetools/smime
20--- a/nss/cmd/smimetools/smime
21+++ b/nss/cmd/smimetools/smime
22@@ -1,4 +1,4 @@
23-#!/usr/local/bin/perl
24+#!/usr/bin/env perl
25
26 # This Source Code Form is subject to the terms of the Mozilla Public
27 # License, v. 2.0. If a copy of the MPL was not distributed with this
28diff --git a/nss/coreconf/cpdist.pl b/nss/coreconf/cpdist.pl
29index 800edfb..652187f 100755
30--- a/nss/coreconf/cpdist.pl
31+++ b/nss/coreconf/cpdist.pl
32@@ -1,4 +1,4 @@
33-#! /usr/local/bin/perl
34+#!/usr/bin/env perl
35 #
36 # This Source Code Form is subject to the terms of the Mozilla Public
37 # License, v. 2.0. If a copy of the MPL was not distributed with this
38diff --git a/nss/coreconf/import.pl b/nss/coreconf/import.pl
39index dd2d177..428eaa5 100755
40--- a/nss/coreconf/import.pl
41+++ b/nss/coreconf/import.pl
42@@ -1,4 +1,4 @@
43-#! /usr/local/bin/perl
44+#!/usr/bin/env perl
45 #
46 # This Source Code Form is subject to the terms of the Mozilla Public
47 # License, v. 2.0. If a copy of the MPL was not distributed with this
48diff --git a/nss/coreconf/jniregen.pl b/nss/coreconf/jniregen.pl
49index 2039180..5f4f69c 100755
50--- a/nss/coreconf/jniregen.pl
51+++ b/nss/coreconf/jniregen.pl
52@@ -1,4 +1,4 @@
53-#!/usr/local/bin/perl
54+#!/usr/bin/env perl
55 #
56 # This Source Code Form is subject to the terms of the Mozilla Public
57 # License, v. 2.0. If a copy of the MPL was not distributed with this
58diff --git a/nss/coreconf/outofdate.pl b/nss/coreconf/outofdate.pl
59index 33d80bb..01fc097 100755
60--- a/nss/coreconf/outofdate.pl
61+++ b/nss/coreconf/outofdate.pl
62@@ -1,4 +1,4 @@
63-#!/usr/local/bin/perl
64+#!/usr/bin/env perl
65 #
66 # This Source Code Form is subject to the terms of the Mozilla Public
67 # License, v. 2.0. If a copy of the MPL was not distributed with this
68diff --git a/nss/coreconf/release.pl b/nss/coreconf/release.pl
69index 7cde19d..b5df2f6 100755
70--- a/nss/coreconf/release.pl
71+++ b/nss/coreconf/release.pl
72@@ -1,4 +1,4 @@
73-#! /usr/local/bin/perl
74+#!/usr/bin/env perl
75 #
76 # This Source Code Form is subject to the terms of the Mozilla Public
77 # License, v. 2.0. If a copy of the MPL was not distributed with this
78diff --git a/nss/coreconf/version.pl b/nss/coreconf/version.pl
79index d2a4942..79359fe 100644
80--- a/nss/coreconf/version.pl
81+++ b/nss/coreconf/version.pl
82@@ -1,4 +1,4 @@
83-#!/usr/sbin/perl
84+#!/usr/bin/env perl
85 #
86 # This Source Code Form is subject to the terms of the Mozilla Public
87 # License, v. 2.0. If a copy of the MPL was not distributed with this
88diff --git a/nss/tests/clean_tbx b/nss/tests/clean_tbx
89index 4de9555..a7def9f 100755
90--- a/nss/tests/clean_tbx
91+++ b/nss/tests/clean_tbx
92@@ -1,4 +1,4 @@
93-#! /bin/perl
94+#!/usr/bin/env perl
95
96 #######################################################################
97 #
98diff --git a/nss/tests/path_uniq b/nss/tests/path_uniq
99index f29f60a..08fbffa 100755
100--- a/nss/tests/path_uniq
101+++ b/nss/tests/path_uniq
102@@ -1,4 +1,4 @@
103-#! /bin/perl
104+#!/usr/bin/env perl
105
106 ########################################################################
107 #
108--
1091.8.1.2
110
diff --git a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch
new file mode 100644
index 0000000000..f0b3550bff
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch
@@ -0,0 +1,71 @@
1nss: fix support cross compiling
2
3Let some make variables be assigned from outside makefile.
4
5Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
6Upstream-Status: Inappropriate [configuration]
7---
8 nss/coreconf/Linux.mk | 12 +++++++++++-
9 nss/coreconf/arch.mk | 2 +-
10 nss/lib/freebl/Makefile | 6 ++++++
11 3 files changed, 18 insertions(+), 2 deletions(-)
12
13diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
14--- a/nss/coreconf/Linux.mk
15+++ b/nss/coreconf/Linux.mk
16@@ -16,11 +16,21 @@ ifeq ($(USE_PTHREADS),1)
17 IMPL_STRATEGY = _PTH
18 endif
19
20+ifndef CC
21 CC = gcc
22+endif
23+
24+ifdef CXX
25+CCC = $(CXX)
26+else
27 CCC = g++
28+endif
29+
30+ifndef RANLIB
31 RANLIB = ranlib
32+endif
33
34-DEFAULT_COMPILER = gcc
35+DEFAULT_COMPILER = $(CC)
36
37 ifeq ($(OS_TARGET),Android)
38 ifndef ANDROID_NDK
39diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
40index 6557348..b722412 100644
41--- a/nss/coreconf/arch.mk
42+++ b/nss/coreconf/arch.mk
43@@ -37,7 +37,7 @@ OS_TEST := $(shell uname -m)
44 ifeq ($(OS_TEST),i86pc)
45 OS_RELEASE := $(shell uname -r)_$(OS_TEST)
46 else
47- OS_RELEASE := $(shell uname -r)
48+ OS_RELEASE ?= $(shell uname -r)
49 endif
50
51 #
52diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
53index 0d293f1..678f506 100644
54--- a/nss/lib/freebl/Makefile
55+++ b/nss/lib/freebl/Makefile
56@@ -36,6 +36,12 @@ ifdef USE_64
57 DEFINES += -DNSS_USE_64
58 endif
59
60+ifeq ($(OS_TEST),mips)
61+ifndef USE_64
62+ DEFINES += -DNS_PTR_LE_32
63+endif
64+endif
65+
66 ifdef USE_ABI32_FPU
67 DEFINES += -DNSS_USE_ABI32_FPU
68 endif
69--
701.8.1.2
71
diff --git a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch
new file mode 100644
index 0000000000..7661dc93a0
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch
@@ -0,0 +1,26 @@
1nss:no rpath for cross compiling
2
3Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
4Upstream-Status: Inappropriate [configuration]
5---
6 nss/cmd/platlibs.mk | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
10--- a/nss/cmd/platlibs.mk
11+++ b/nss/cmd/platlibs.mk
12@@ -18,9 +18,9 @@ endif
13
14 ifeq ($(OS_ARCH), Linux)
15 ifeq ($(USE_64), 1)
16-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
17+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
18 else
19-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
20+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
21 endif
22 endif
23
24--
251.8.1.2
26
diff --git a/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/files/nss.pc.in
new file mode 100644
index 0000000000..200f635c65
--- /dev/null
+++ b/meta/recipes-support/nss/files/nss.pc.in
@@ -0,0 +1,11 @@
1prefix=OEPREFIX
2exec_prefix=OEEXECPREFIX
3libdir=OELIBDIR
4includedir=OEINCDIR
5
6Name: NSS
7Description: Network Security Services
8Version: %NSS_VERSION%
9Requires: nspr >= %NSPR_VERSION%
10Libs: -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3
11Cflags: -IOEINCDIR
diff --git a/meta/recipes-support/nss/files/signlibs.sh b/meta/recipes-support/nss/files/signlibs.sh
new file mode 100644
index 0000000000..1ec79f4576
--- /dev/null
+++ b/meta/recipes-support/nss/files/signlibs.sh
@@ -0,0 +1,20 @@
1#!/bin/sh
2
3# signlibs.sh
4#
5# (c)2010 Wind River Systems, Inc.
6#
7# regenerates the .chk files for the NSS libraries that require it
8# since the ones that are built have incorrect checksums that were
9# calculated on the host where they really need to be done on the
10# target
11
12CHK_FILES=`find /lib* /usr/lib* -name "*.chk"`
13SIGN_BINARY=`which shlibsign`
14for I in $CHK_FILES
15do
16 DN=`dirname $I`
17 BN=`basename $I .chk`
18 FN=$DN/$BN.so
19 $SIGN_BINARY -i $FN
20done
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
new file mode 100644
index 0000000000..008bdad5c7
--- /dev/null
+++ b/meta/recipes-support/nss/nss.inc
@@ -0,0 +1,215 @@
1SUMMARY = "Mozilla's SSL and TLS implementation"
2DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
3designed to support cross-platform development of \
4security-enabled client and server applications. \
5Applications built with NSS can support SSL v2 and v3, \
6TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
7v3 certificates, and other security standards."
8HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
9SECTION = "libs"
10
11LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
12
13LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
14 file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859"
15SRC_URI = "\
16 file://nss-fix-support-cross-compiling.patch \
17 file://nss-no-rpath-for-cross-compiling.patch \
18 file://nss-fix-incorrect-shebang-of-perl.patch \
19 file://nss-3.15.1-fix-CVE-2013-1741.patch \
20 file://nss-3.15.1-fix-CVE-2013-5605.patch \
21 file://nss-CVE-2014-1492.patch \
22 file://nss-CVE-2013-1740.patch \
23 file://nss-3.15.1-fix-CVE-2013-1739.patch \
24 file://nss-CVE-2013-5606.patch \
25 file://nss-CVE-2014-1544.patch \
26 file://nss-CVE-2014-1568.patch \
27"
28SRC_URI_append = "\
29 file://nss.pc.in \
30 file://signlibs.sh \
31"
32inherit siteinfo
33PR = "r0"
34DEPENDS = "sqlite3 nspr zlib nss-native"
35DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
36RDEPENDS_${PN} = "perl"
37
38TD = "${S}/tentative-dist"
39TDS = "${S}/tentative-dist-staging"
40
41TARGET_CC_ARCH += "${LDFLAGS}"
42
43do_compile_prepend_class-native() {
44 export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
45 export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
46}
47
48do_compile_prepend_class-nativesdk() {
49 export LDFLAGS=""
50}
51
52do_compile() {
53 export CROSS_COMPILE=1
54 export NATIVE_CC="gcc"
55 export BUILD_OPT=1
56
57 export FREEBL_NO_DEPEND=1
58 export FREEBL_LOWHASH=1
59
60 export LIBDIR=${libdir}
61 export MOZILLA_CLIENT=1
62 export NS_USE_GCC=1
63 export NSS_USE_SYSTEM_SQLITE=1
64 export NSS_ENABLE_ECC=1
65
66 export OS_RELEASE=3.4
67 export OS_TARGET=Linux
68 export OS_ARCH=Linux
69
70 if [ "${TARGET_ARCH}" = "powerpc" ]; then
71 OS_TEST=ppc
72 elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
73 OS_TEST=ppc64
74 elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
75 OS_TEST=mips
76 else
77 OS_TEST="${TARGET_ARCH}"
78 fi
79
80 if [ "${SITEINFO_BITS}" = "64" ]; then
81 export USE_64=1
82 fi
83
84 make -C ./nss CCC="${CXX}" \
85 OS_TEST=${OS_TEST} \
86}
87
88
89do_install_prepend_class-nativesdk() {
90 export LDFLAGS=""
91}
92
93do_install() {
94 export CROSS_COMPILE=1
95 export NATIVE_CC="gcc"
96 export BUILD_OPT=1
97
98 export FREEBL_NO_DEPEND=1
99
100 export LIBDIR=${libdir}
101 export MOZILLA_CLIENT=1
102 export NS_USE_GCC=1
103 export NSS_USE_SYSTEM_SQLITE=1
104 export NSS_ENABLE_ECC=1
105
106 export OS_RELEASE=3.4
107 export OS_TARGET=Linux
108 export OS_ARCH=Linux
109
110 if [ "${TARGET_ARCH}" = "powerpc" ]; then
111 OS_TEST=ppc
112 elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
113 OS_TEST=ppc64
114 elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
115 OS_TEST=mips
116 else
117 OS_TEST="${TARGET_ARCH}"
118 fi
119 if [ "${SITEINFO_BITS}" = "64" ]; then
120 export USE_64=1
121 fi
122
123 make -C ./nss \
124 CCC="${CXX}" \
125 OS_TEST=${OS_TEST} \
126 SOURCE_LIB_DIR="${TD}/${libdir}" \
127 SOURCE_BIN_DIR="${TD}/${bindir}" \
128 install
129
130 install -d ${D}/${libdir}/
131 for file in ${S}/dist/*.OBJ/lib/*.so; do
132 echo "Installing `basename $file`..."
133 cp $file ${D}/${libdir}/
134 done
135
136 for shared_lib in ${TD}/${libdir}/*.so.*; do
137 if [ -f $shared_lib ]; then
138 cp $shared_lib ${D}/${libdir}
139 ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
140 fi
141 done
142 for shared_lib in ${TD}/${libdir}/*.so; do
143 if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
144 cp $shared_lib ${D}/${libdir}
145 fi
146 done
147
148 install -d ${D}/${includedir}/nss3
149 install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
150
151 install -d ${D}/${bindir}
152 for binary in ${TD}/${bindir}/*; do
153 install -m 755 -t ${D}/${bindir} $binary
154 done
155}
156
157do_install_append() {
158 # Create empty .chk files for the NSS libraries at build time. They could
159 # be regenerated at target's boot time.
160 for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
161 touch ${D}/${libdir}/$file
162 chmod 755 ${D}/${libdir}/$file
163 done
164 install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
165
166 install -d ${D}${libdir}/pkgconfig/
167 sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
168 sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
169 sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
170 sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
171 sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
172}
173
174do_install_append_class-target() {
175 # Create a blank certificate
176 mkdir -p ${D}${sysconfdir}/pki/nssdb/
177 touch ./empty_password
178 certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
179 chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
180 rm ./empty_password
181}
182
183pkg_postinst_${PN} () {
184 if [ -n "$D" ]; then
185 for I in $D/${libdir}/lib*.chk; do
186 DN=`dirname $I`
187 BN=`basename $I .chk`
188 FN=$DN/$BN.so
189 shlibsign -i $FN
190 if [ $? -ne 0 ]; then
191 exit 1
192 fi
193 done
194 exit 0
195 fi
196 signlibs.sh
197}
198
199FILES_${PN} = "\
200 ${sysconfdir} \
201 ${bindir} \
202 ${libdir}/lib*.chk \
203 ${libdir}/lib*.so \
204 "
205FILES_${PN}-dev = "\
206 ${libdir}/nss \
207 ${libdir}/pkgconfig/* \
208 ${includedir}/* \
209 "
210FILES_${PN}-dbg = "\
211 ${bindir}/.debug/* \
212 ${libdir}/.debug/* \
213 "
214
215BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb
new file mode 100644
index 0000000000..7b06f00cde
--- /dev/null
+++ b/meta/recipes-support/nss/nss_3.15.1.bb
@@ -0,0 +1,9 @@
1require nss.inc
2
3SRC_URI += "\
4 http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \
5"
6
7SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb"
8SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284"
9
diff --git a/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
new file mode 100644
index 0000000000..cb1e2f7341
--- /dev/null
+++ b/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
@@ -0,0 +1,17 @@
1--- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400
2+++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400
3@@ -14,6 +14,14 @@
4 # include <sys/timex.h>
5 #endif
6
7+#if defined(ADJ_NANO) && !defined(MOD_NANO)
8+#define MOD_NANO ADJ_NANO
9+#endif
10+
11+#if defined(ADJ_TAI) && !defined(MOD_TAI)
12+#define MOD_TAI ADJ_TAI
13+#endif
14+
15 #ifndef NTP_SYSCALLS_LIBC
16 #ifdef NTP_SYSCALLS_STD
17 # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/meta/recipes-support/ntp/files/ntp.conf b/meta/recipes-support/ntp/files/ntp.conf
new file mode 100644
index 0000000000..a9cc838450
--- /dev/null
+++ b/meta/recipes-support/ntp/files/ntp.conf
@@ -0,0 +1,14 @@
1# This is the most basic ntp configuration file
2# The driftfile must remain in a place specific to this
3# machine - it records the machine specific clock error
4driftfile /etc/ntp.drift
5# This obtains a random server which will be close
6# (in IP terms) to the machine. Add other servers
7# as required, or change this.
8server time.server.example.com
9# Using local hardware clock as fallback
10# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
11server 127.127.1.0
12fudge 127.127.1.0 stratum 14
13# Defining a default security setting
14restrict default
diff --git a/meta/recipes-support/ntp/files/ntpd b/meta/recipes-support/ntp/files/ntpd
new file mode 100755
index 0000000000..ae50f135d0
--- /dev/null
+++ b/meta/recipes-support/ntp/files/ntpd
@@ -0,0 +1,62 @@
1#! /bin/sh
2#
3# ntpd init.d script for ntpdc from ntp.isc.org
4test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
5# rcS contains TICKADJ
6test -r /etc/default/rcS && . /etc/default/rcS
7
8# Functions to do individual actions
9settick(){
10 # If TICKADJ is set we *must* adjust it before we start, because the
11 # driftfile relies on the correct setting
12 test -n "$TICKADJ" -a -x /usr/bin/tickadj && {
13 echo -n "Setting tick to $TICKADJ: "
14 /usr/bin/tickadj "$TICKADJ"
15 echo "done"
16 }
17}
18startdaemon(){
19 # The -g option allows ntpd to step the time to correct it just
20 # once. The daemon will exit if the clock drifts too much after
21 # this. If ntpd seems to disappear after a while assume TICKADJ
22 # above is set to a totally incorrect value.
23 echo -n "Starting ntpd: "
24 start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@"
25 echo "done"
26}
27stopdaemon(){
28 echo -n "Stopping ntpd: "
29 start-stop-daemon --stop -p /var/run/ntp.pid
30 echo "done"
31}
32
33case "$1" in
34 start)
35 settick
36 startdaemon -g
37 ;;
38 stop)
39 stopdaemon
40 ;;
41 force-reload)
42 stopdaemon
43 settick
44 startdaemon -g
45 ;;
46 restart)
47 # Don't reset the tick here
48 stopdaemon
49 startdaemon -g
50 ;;
51 reload)
52 # Must do this by hand, but don't do -g
53 stopdaemon
54 startdaemon
55 ;;
56 *)
57 echo "Usage: ntpd { start | stop | restart | reload }" >&2
58 exit 1
59 ;;
60esac
61
62exit 0
diff --git a/meta/recipes-support/ntp/files/ntpdate b/meta/recipes-support/ntp/files/ntpdate
new file mode 100755
index 0000000000..ab0551c5a5
--- /dev/null
+++ b/meta/recipes-support/ntp/files/ntpdate
@@ -0,0 +1,54 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/bin
4
5test -x /usr/bin/ntpdate || exit 0
6
7if test -f /etc/default/ntpdate ; then
8. /etc/default/ntpdate
9fi
10
11if [ "$NTPSERVERS" = "" ] ; then
12 if [ "$METHOD" = "" -a "$1" != "silent" ] ; then
13 echo "Please set NTPSERVERS in /etc/default/ntpdate"
14 exit 1
15 else
16 exit 0
17 fi
18fi
19
20# This is a heuristic: The idea is that if a static interface is brought
21# up, that is a major event, and we can put in some extra effort to fix
22# the system time. Feel free to change this, especially if you regularly
23# bring up new network interfaces.
24if [ "$METHOD" = static ]; then
25 OPTS="-b"
26fi
27
28if [ "$METHOD" = loopback ]; then
29 exit 0
30fi
31
32(
33
34LOCKFILE=/var/lock/ntpdate
35
36# Avoid running more than one at a time
37if [ -x /usr/bin/lockfile-create ]; then
38 lockfile-create $LOCKFILE
39 lockfile-touch $LOCKFILE &
40 LOCKTOUCHPID="$!"
41fi
42
43if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
44 if [ "$UPDATE_HWCLOCK" = "yes" ]; then
45 hwclock --systohc || :
46 fi
47fi
48
49if [ -x /usr/bin/lockfile-create ] ; then
50 kill $LOCKTOUCHPID
51 lockfile-remove $LOCKFILE
52fi
53
54) &
diff --git a/meta/recipes-support/ntp/files/ntpdate.default b/meta/recipes-support/ntp/files/ntpdate.default
new file mode 100644
index 0000000000..486b6e07d3
--- /dev/null
+++ b/meta/recipes-support/ntp/files/ntpdate.default
@@ -0,0 +1,7 @@
1# Configuration script used by ntpdate-sync script
2
3NTPSERVERS=""
4
5# Set to "yes" to write time to hardware clock on success
6UPDATE_HWCLOCK="no"
7
diff --git a/meta/recipes-support/ntp/files/openssl-check.patch b/meta/recipes-support/ntp/files/openssl-check.patch
new file mode 100644
index 0000000000..8b4a6733cd
--- /dev/null
+++ b/meta/recipes-support/ntp/files/openssl-check.patch
@@ -0,0 +1,59 @@
1Hack OpenSSL check to work when libssl and libcrypto aren't in same dir
2
3Upstream-Status: Inappropriate [config]
4
5Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
6---
7 configure | 4 ++--
8 m4/ntp_openssl.m4 | 4 ++--
9 sntp/configure | 4 ++--
10 3 files changed, 6 insertions(+), 6 deletions(-)
11
12diff --git a/configure b/configure
13index aae2c01..6a3c15e 100755
14--- a/configure
15+++ b/configure
16@@ -22868,8 +22868,8 @@ case "$ans" in
17 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
18 ;;
19 *)
20- test -f $i/libcrypto.so -a -f $i/libssl.so && break
21- test -f $i/libcrypto.a -a -f $i/libssl.a && break
22+ test -f $i/libssl.so && break
23+ test -f $i/libssl.a && break
24 ;;
25 esac
26 done
27diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4
28index 7d9f477..67bdd55 100644
29--- a/m4/ntp_openssl.m4
30+++ b/m4/ntp_openssl.m4
31@@ -41,8 +41,8 @@ case "$ans" in
32 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
33 ;;
34 *)
35- test -f $i/libcrypto.so -a -f $i/libssl.so && break
36- test -f $i/libcrypto.a -a -f $i/libssl.a && break
37+ test -f $i/libssl.so && break
38+ test -f $i/libssl.a && break
39 ;;
40 esac
41 done
42diff --git a/sntp/configure b/sntp/configure
43index 7782c29..55e82d9 100755
44--- a/sntp/configure
45+++ b/sntp/configure
46@@ -14810,8 +14810,8 @@ case "$ans" in
47 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
48 ;;
49 *)
50- test -f $i/libcrypto.so -a -f $i/libssl.so && break
51- test -f $i/libcrypto.a -a -f $i/libssl.a && break
52+ test -f $i/libssl.so && break
53+ test -f $i/libssl.a && break
54 ;;
55 esac
56 done
57--
581.7.1
59
diff --git a/meta/recipes-support/ntp/files/tickadj.c.patch b/meta/recipes-support/ntp/files/tickadj.c.patch
new file mode 100644
index 0000000000..9ef9de9e1f
--- /dev/null
+++ b/meta/recipes-support/ntp/files/tickadj.c.patch
@@ -0,0 +1,32 @@
1Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c
2===================================================================
3--- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100
4+++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200
5@@ -21,7 +21,8 @@
6 # include <unistd.h>
7 #endif /* HAVE_UNISTD_H */
8
9-#ifdef HAVE___ADJTIMEX /* Linux */
10+/* proper handling here has been moved to upstream ntp bugzilla */
11+#ifdef linux
12
13 #include <sys/timex.h>
14 struct timex txc;
15@@ -91,7 +92,7 @@
16 }
17
18 if (!errflg) {
19- if (__adjtimex(&txc) < 0)
20+ if (adjtimex(&txc) < 0)
21 perror("adjtimex");
22 else if (!quiet)
23 printf("tick = %ld\ntick_adj = %d\n",
24@@ -146,7 +147,7 @@
25 #endif
26 }
27
28- if (__adjtimex(&txc) < 0)
29+ if (adjtimex(&txc) < 0)
30 {
31 perror("adjtimex");
32 }
diff --git a/meta/recipes-support/ntp/ntp.inc b/meta/recipes-support/ntp/ntp.inc
new file mode 100644
index 0000000000..d93f22d473
--- /dev/null
+++ b/meta/recipes-support/ntp/ntp.inc
@@ -0,0 +1,93 @@
1SUMMARY = "Network Time Protocol daemon and utilities"
2DESCRIPTION = "The Network Time Protocol (NTP) is used to \
3synchronize the time of a computer client or server to \
4another server or reference time source, such as a radio \
5or satellite receiver or modem."
6HOMEPAGE = "http://support.ntp.org"
7SECTION = "console/network"
8LICENSE = "NTP"
9LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
10
11INC_PR = "r3"
12
13SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
14 file://tickadj.c.patch \
15 file://ntp-4.2.4_p6-nano.patch \
16 file://openssl-check.patch \
17 file://ntpd \
18 file://ntp.conf \
19 file://ntpdate \
20 file://ntpdate.default \
21 "
22
23inherit autotools update-rc.d
24
25# The ac_cv_header_readline_history is to stop ntpdc depending on either
26# readline or curses
27EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no"
28CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
29
30PACKAGECONFIG ??= ""
31PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
32 --with-openssl-incdir=${STAGING_INCDIR} \
33 --with-crypto, \
34 --without-openssl --without-crypto, \
35 openssl"
36
37do_install_append() {
38 install -d ${D}${sysconfdir}/init.d
39 install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
40 install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
41 install -d ${D}${bindir}
42 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
43
44 # Fix hardcoded paths in scripts
45 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
46 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
47 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
48 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
49 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
50
51 install -d ${D}/${sysconfdir}/default
52 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
53 install -d ${D}/${sysconfdir}/network/if-up.d
54 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
55}
56
57PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils"
58# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
59
60# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
61# with wonky clocks (e.g. OpenSlug)
62RDEPENDS_${PN} = "${PN}-tickadj"
63# Handle move from bin to utils package
64RPROVIDES_${PN}-utils = "${PN}-bin"
65RREPLACES_${PN}-utils = "${PN}-bin"
66RCONFLICTS_${PN}-utils = "${PN}-bin"
67
68RSUGGESTS_${PN} = "iana-etc"
69
70FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}"
71FILES_${PN}-tickadj = "${bindir}/tickadj"
72FILES_${PN}-utils = "${bindir}"
73FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate-sync ${bindir}/ntpdate-sync ${sysconfdir}/default/ntpdate"
74
75CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
76CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
77
78INITSCRIPT_NAME = "ntpd"
79# No dependencies, so just go in at the standard level (20)
80INITSCRIPT_PARAMS = "defaults"
81
82pkg_postinst_ntpdate() {
83if test "x$D" != "x"; then
84 exit 1
85else
86 if ! grep -q -s ntpdate /var/spool/cron/root; then
87 echo "adding crontab"
88 test -d /var/spool/cron || mkdir -p /var/spool/cron
89 echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root
90 fi
91fi
92}
93
diff --git a/meta/recipes-support/ntp/ntp_4.2.6p5.bb b/meta/recipes-support/ntp/ntp_4.2.6p5.bb
new file mode 100644
index 0000000000..f1e9ecd7a8
--- /dev/null
+++ b/meta/recipes-support/ntp/ntp_4.2.6p5.bb
@@ -0,0 +1,7 @@
1require ntp.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc"
6SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c"
7
diff --git a/meta/recipes-support/pinentry/pinentry_0.8.4.bb b/meta/recipes-support/pinentry/pinentry_0.8.4.bb
new file mode 100644
index 0000000000..acc69923ba
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry_0.8.4.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
2DESCRIPTION = "\
3 Pinentry is a collection of simple PIN or passphrase entry dialogs which \
4 utilize the Assuan protocol as described by the aegypten project; see \
5 http://www.gnupg.org/aegypten/ for details."
6
7HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
10
11inherit autotools-brokensep
12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
14 "
15
16SRC_URI[md5sum] = "e2b6f94471ba1e978f6e5bf6b275189b"
17SRC_URI[sha256sum] = "359db3bf46cb743ba0b3aeef259f6107271ca888ba3e22c1cba525c9aca35612"
18
19EXTRA_OECONF = "--disable-rpath \
20 --disable-dependency-tracking \
21 --disable-glibtest \
22 --disable-pinentry-gtk \
23 --disable-pinentry-qt \
24 "
25
26PACKAGECONFIG ??= "ncurses libcap"
27
28PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
29PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
30PACKAGECONFIG[qt4] = "--enable-pinentry-qt4, --disable-pinentry-qt4, qt4-x11"
31PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
diff --git a/meta/recipes-support/popt/popt/disable_tests.patch b/meta/recipes-support/popt/popt/disable_tests.patch
new file mode 100644
index 0000000000..016cf66a27
--- /dev/null
+++ b/meta/recipes-support/popt/popt/disable_tests.patch
@@ -0,0 +1,21 @@
1Use of $(top_srcdir) in TESTS is an error which causes
2automake-1.13 to abort. Just remove tests.
3
4Upstream-Status: Inappropriate [disable feature]
5
6Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
7diff -Nurd popt-1.16/Makefile.am popt-1.16/Makefile.am
8--- popt-1.16/Makefile.am 2010-05-04 23:55:54.000000000 +0300
9+++ popt-1.16/Makefile.am 2013-01-02 13:34:29.540361391 +0200
10@@ -34,11 +34,6 @@
11
12 noinst_SCRIPTS = testit.sh
13
14-TESTS_ENVIRONMENT = \
15-test1="$(top_builddir)/test1"
16-
17-TESTS = $(top_srcdir)/testit.sh
18-
19 include_HEADERS = popt.h
20
21 usrlibdir = $(libdir)
diff --git a/meta/recipes-support/popt/popt/pkgconfig_fix.patch b/meta/recipes-support/popt/popt/pkgconfig_fix.patch
new file mode 100644
index 0000000000..0bddbf8c94
--- /dev/null
+++ b/meta/recipes-support/popt/popt/pkgconfig_fix.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Install the pkgconfig file into libdir.
4
5--- popt-1.16.orig/Makefile.am 2012-04-26 13:42:54.021139813 +0800
6+++ popt-1.16/Makefile.am 2012-04-26 13:36:03.552096912 +0800
7@@ -47,7 +47,7 @@
8 libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
9 libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
10
11-pkgconfigdir = $(prefix)/lib/pkgconfig
12+pkgconfigdir = $(libdir)/pkgconfig
13 pkgconfig_DATA = popt.pc
14
15 if HAVE_LD_VERSION_SCRIPT
diff --git a/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..91bca96a50
--- /dev/null
+++ b/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
@@ -0,0 +1,21 @@
1Upstream-Status: pending
2
3This patch avoids this error with automake 1.12:
4
5| configure.ac:49: error: automatic de-ANSI-fication support has been removed
6
7Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
82012/05/02
9
10Index: popt-1.16/configure.ac
11===================================================================
12--- popt-1.16.orig/configure.ac
13+++ popt-1.16/configure.ac
14@@ -46,7 +46,6 @@ AC_GCC_TRADITIONAL
15 AC_SYS_LARGEFILE
16
17 AC_ISC_POSIX
18-AM_C_PROTOTYPES
19
20 AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h)
21
diff --git a/meta/recipes-support/popt/popt_1.16.bb b/meta/recipes-support/popt/popt_1.16.bb
new file mode 100644
index 0000000000..cb13a815e0
--- /dev/null
+++ b/meta/recipes-support/popt/popt_1.16.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Library for parsing command line options"
2HOMEPAGE = "http://rpm5.org/"
3SECTION = "libs"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
7PR = "r3"
8
9SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz \
10 file://pkgconfig_fix.patch \
11 file://popt_fix_for_automake-1.12.patch \
12 file://disable_tests.patch \
13 "
14
15SRC_URI[md5sum] = "3743beefa3dd6247a73f8f7a32c14c33"
16SRC_URI[sha256sum] = "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8"
17
18inherit autotools gettext
19
20BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 0000000000..c618f1148d
--- /dev/null
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -0,0 +1,27 @@
1#!/bin/sh
2ANYFAILED=no
3echo "START: $0"
4
5for libdir in /usr/lib*
6do
7
8 [ ! -d "$libdir" ] && continue
9
10 for x in `ls -d $libdir/*/ptest 2>/dev/null`
11 do
12 [ ! -f $x/run-ptest ] && continue
13 [ -h `dirname $x` ] && continue
14
15 date "+%Y-%m-%dT%H:%M"
16 echo "BEGIN: $x"
17 cd "$x"
18 ./run-ptest || ANYFAILED=yes
19 echo "END: $x"
20 date "+%Y-%m-%dT%H:%M"
21 done
22done
23echo "STOP: $0"
24if [ "$ANYFAILED" = "yes" ]; then
25 exit 1
26fi
27exit 0
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
new file mode 100644
index 0000000000..7443811d8c
--- /dev/null
+++ b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
@@ -0,0 +1,22 @@
1SUMMARY = "A simple shell script to run all installed ptests"
2DESCRIPTION = "The ptest-runner package installs a ptest-runner \
3shell script which loops through all installed ptest test suites and \
4runs them in sequence."
5HOMEPAGE = "https://wiki.yoctoproject.org/wiki/Ptest"
6SRC_URI += "file://ptest-runner"
7
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
10 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
11
12INHIBIT_DEFAULT_DEPS = "1"
13
14do_install () {
15 mkdir -p ${D}${bindir}
16 install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
17}
18
19do_patch[noexec] = "1"
20do_configure[noexec] = "1"
21do_compile[noexec] = "1"
22do_build[noexec] = "1"
diff --git a/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
new file mode 100644
index 0000000000..67a28ab77a
--- /dev/null
+++ b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
@@ -0,0 +1,105 @@
1Upstream-Status: Pending
2
3Add pkgconfig support to pth.
4
5Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
6
7Index: Makefile.in
8===========================================================
9--- a/Makefile.in
10+++ b/Makefile.in
11@@ -47,6 +47,9 @@ datadir = @datadir@
12
13 DESTDIR =
14
15+pkgconfigdir = ${libdir}/pkgconfig
16+pkgconfig_DATA = pth.pc
17+
18 ##
19 ## ____ TOOL DEFINITIONS ___________________________________________
20 ##
21@@ -216,7 +219,7 @@ test_pthread: test_pthread.o test_common.o libpthread.la
22
23 # install the package
24 install: all-for-install
25- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@
26+ @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
27 @touch .done-install >/dev/null 2>&1 || $(TRUE)
28 @$(MAKE) $(MKFLAGS) what-next
29 install-dirs:
30@@ -227,6 +230,7 @@ install-dirs:
31 $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
32 $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
33 $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal
34+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(pkgconfigdir)
35 install-pth:
36 $(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config
37 $(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1
38@@ -242,12 +246,16 @@ install-pthread:
39 $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3
40 @umask 022; $(LIBTOOL) --mode=install \
41 $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
42+install-pkgconfigDATA: $(pkgconfig_DATA)
43+ $(SHTOOL) install -c -m 644 $(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
44
45 # uninstall the package
46 uninstall:
47- @$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
48+ @$(MAKE) $(MKFLAGS) uninstall-pkgconfigDATA @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
49 @touch .done-uninstall >/dev/null 2>&1 || $(TRUE)
50 @$(MAKE) $(MKFLAGS) what-next
51+uninstall-pkgconfigDATA:
52+ $(RM) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
53 uninstall-pthread:
54 $(RM) $(DESTDIR)$(bindir)/pthread-config
55 $(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1
56@@ -271,6 +279,7 @@ uninstall-dirs:
57 -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
58 -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
59 -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
60+ -$(RMDIR) $(DESTDIR)$(pkgconfigdir) > /dev/null 2>&1 ||$(TRUE)
61
62 # strip down the source tree to its minimum
63 striptease:
64Index: configure.ac
65===========================================================
66--- a/configure.ac
67+++ b/configure.ac
68@@ -656,6 +656,13 @@ pth_acmac.h dnl
69 chmod +rx pthread-config
70 chmod +rx pth-config
71 )dnl
72+
73+PTH_VERSION=`echo $PTH_VERSION_STR | cut -d' ' -f1`
74+AC_SUBST(PTH_VERSION)
75+
76+AC_CONFIG_FILES([pth.pc])
77+AC_OUTPUT
78+
79 if test ".$enable_pthread" = .no; then
80 rm -f pthread-config
81 rm -f pthread.h
82Index: pth.pc.in
83===========================================================
84--- /dev/null
85+++ b/pth.pc.in
86@@ -0,0 +1,16 @@
87+prefix=@prefix@
88+exec_prefix=@exec_prefix@
89+libdir=@libdir@
90+includedir=@includedir@
91+bindir=@bindir@
92+mandir=@mandir@
93+datadir=@datadir@
94+acdir=@datadir@/aclocal
95+
96+Name: pth
97+Description: GNU Portable Threads
98+Requires:
99+Version: @PTH_VERSION@
100+Libs: -L${libdir} -lpth
101+Libs.private:
102+Cflags: -I${includedir}
103--
1041.7.5.4
105
diff --git a/meta/recipes-support/pth/pth_2.0.7.bb b/meta/recipes-support/pth/pth_2.0.7.bb
new file mode 100644
index 0000000000..416e788e5d
--- /dev/null
+++ b/meta/recipes-support/pth/pth_2.0.7.bb
@@ -0,0 +1,31 @@
1SUMMARY = "GNU Portable Threads library"
2HOMEPAGE = "http://www.gnu.org/software/pth/"
3SECTION = "libs"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1"
6PR = "r3"
7
8python __anonymous () {
9 import re
10 uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
11 if uc_os:
12 raise bb.parse.SkipPackage("incompatible with uClibc")
13}
14
15SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \
16 file://pth-add-pkgconfig-support.patch"
17
18SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793"
19SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232"
20
21PARALLEL_MAKE=""
22
23BINCONFIG = "${bindir}/pth-config"
24
25inherit autotools binconfig-disabled pkgconfig
26
27do_configure() {
28 ( cd ${S}; gnu-configize )
29 ( cd ${S}; autoconf )
30 oe_runconf
31}
diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000000..9d073e9abf
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
1'scons' cleans the environment which breaks ccache builds because
2CCACHEDIR can point to an unexpected location:
3
4| ccache arm-linux-gnueabi-gcc ... context.c
5| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
6
7Issue is described in
8
9 http://www.scons.org/wiki/ImportingEnvironmentSettings
10
11and because 'bitbake' cleans environment we can pass it completely
12instead of trying to enumerate needed env.
13
14Upstream-Status: Inappropriate
15
16
17Index: serf-1.3.6/SConstruct
18===================================================================
19--- serf-1.3.6.orig/SConstruct
20+++ serf-1.3.6/SConstruct
21@@ -149,6 +149,7 @@ if sys.platform == 'win32':
22 env = Environment(variables=opts,
23 tools=('default', 'textfile',),
24 CPPPATH=['.', ],
25+ ENV = os.environ,
26 )
27
28 env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch
new file mode 100644
index 0000000000..380f5d00d2
--- /dev/null
+++ b/meta/recipes-support/serf/serf/norpath.patch
@@ -0,0 +1,42 @@
1The RPATH handling in serf is all wrong for us and we don't need it
2anyway so hack around it by removing this for now.
3
4Upstream-Status: Inappropriate
5
6RP 2014/7/17
7
8Index: serf-1.3.6/SConstruct
9===================================================================
10--- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000
11+++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000
12@@ -218,8 +218,7 @@
13 else:
14 LIBNAMESTATIC = 'serf-${MAJOR}'
15
16-env.Append(RPATH=libdir,
17- PDB='${TARGET.filebase}.pdb')
18+env.Append(PDB='${TARGET.filebase}.pdb')
19
20 #for i in env:
21 # print(str(env[i]))
22@@ -371,12 +370,6 @@
23 if sys.platform == 'win32':
24 env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
25
26-# On some systems, the -R values that APR describes never make it into actual
27-# RPATH flags. We'll manually map all directories in LIBPATH into new
28-# flags to set RPATH values.
29-for d in env['LIBPATH']:
30- env.Append(RPATH=':'+d)
31-
32 # Set up the construction of serf-*.pc
33 pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
34 env.File('build/serf.pc.in'),
35@@ -446,7 +439,6 @@
36 ENV={'PATH' : os.environ['PATH']}))
37
38 # Find the (dynamic) library in this directory
39-tenv.Replace(RPATH=thisdir)
40 tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
41 LIBPATH=[thisdir, ])
42
diff --git a/meta/recipes-support/serf/serf_1.3.7.bb b/meta/recipes-support/serf/serf_1.3.7.bb
new file mode 100644
index 0000000000..b87a04ab69
--- /dev/null
+++ b/meta/recipes-support/serf/serf_1.3.7.bb
@@ -0,0 +1,25 @@
1
2SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \
3 file://norpath.patch \
4 file://env.patch"
5SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc"
6SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae"
7
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
10
11DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
12
13do_compile() {
14 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
15 CC="${CC}" \
16 APR=`which apr-1-config` APU=`which apu-1-config` \
17 CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
18 OPENSSL="${STAGING_EXECPREFIXDIR}"
19}
20
21do_install() {
22 ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install
23}
24
25BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
new file mode 100644
index 0000000000..6eedb6d3fd
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -0,0 +1,36 @@
1SUMMARY = "Shared MIME type database and specification"
2HOMEPAGE = "http://freedesktop.org/wiki/Software/shared-mime-info"
3SECTION = "base"
4
5LICENSE = "LGPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8DEPENDS = "libxml2 intltool-native glib-2.0 shared-mime-info-native"
9DEPENDS_class-native = "libxml2-native intltool-native glib-2.0-native"
10
11SRC_URI = "http://freedesktop.org/~hadess/shared-mime-info-${PV}.tar.xz"
12
13inherit autotools pkgconfig gettext
14
15EXTRA_OECONF = "--disable-update-mimedb"
16
17FILES_${PN} += "${datadir}/mime"
18FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
19
20# freedesktop.org.xml is only required when updating the mime database,
21# package it separately
22PACKAGES =+ "shared-mime-info-data"
23FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
24RDEPENDS_shared-mime-info-data = "shared-mime-info"
25
26do_install () {
27 autotools_do_install
28
29 update-mime-database ${D}${datadir}/mime
30}
31
32do_install_class-native () {
33 autotools_do_install
34}
35
36BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
new file mode 100644
index 0000000000..3c9f1ea438
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -0,0 +1,23 @@
1fix shared-mime-info build race condition
2
3The definition of install-data-hook in Makefile.am leads
4to multiple, overlapping, executions of install-binPROGRAMS
5target. We modify the definition to avoid that.
6
7Upstream-Status: Pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11--- a/Makefile.am
12+++ b/Makefile.am
13@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
14 @INTLTOOL_XML_RULE@
15 @INTLTOOL_DESKTOP_RULE@
16
17-install-data-hook: install-binPROGRAMS
18+# do NOT make this dependent on anything!
19+#
20+install-data-hook:
21 if ENABLE_UPDATE_MIMEDB
22 $(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
23 endif
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
new file mode 100644
index 0000000000..84c4d03731
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
@@ -0,0 +1,33 @@
1The Makefile used by shared-mime-info is one big race with the SUBDIRS
2option and the dependency specifically calling make all combining to
3create multiple make instances all of which may try and build targets
4like update-mime-database.
5
6This patch removes those options meaning make can correctly identify
7dependencies and stop itself racing itself.
8
9RP 10/10/2011
10
11Upstream-Status: Pending
12Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
13
14Index: shared-mime-info-1.0/Makefile.am
15===================================================================
16--- shared-mime-info-1.0.orig/Makefile.am
17+++ shared-mime-info-1.0/Makefile.am
18@@ -1,5 +1,3 @@
19-SUBDIRS=. po
20-
21 AM_CPPFLAGS = $(ALL_CFLAGS)
22
23 packagesdir = $(datadir)/mime/packages
24@@ -72,8 +70,7 @@ uninstall-hook:
25
26 all: $(defaultmakedeps)
27
28-create-pot:
29- $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
30+create-pot: po
31
32 check: create-pot freedesktop.org.xml update-mime-database check-translations
33 if test -e $(top_builddir)/freedesktop.org.xml; then \
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
new file mode 100644
index 0000000000..4bd81cd831
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
@@ -0,0 +1,7 @@
1require shared-mime-info.inc
2
3SRC_URI[md5sum] = "743720bc4803dd69f55449013d350f31"
4SRC_URI[sha256sum] = "4fd49c8c7ca9ecb10c59845094a18dbb73b69c72b4bad3db5e864f2111cb323a"
5
6SRC_URI =+ "file://parallelmake.patch \
7 file://install-data-hook.patch"
diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc
new file mode 100644
index 0000000000..2e3791bfc3
--- /dev/null
+++ b/meta/recipes-support/sqlite/sqlite3.inc
@@ -0,0 +1,34 @@
1SUMMARY = "Embeddable SQL database engine"
2HOMEPAGE = "http://www.sqlite.org"
3SECTION = "libs"
4DEPENDS = "readline ncurses"
5DEPENDS_class-native = ""
6LICENSE = "PD"
7
8inherit autotools pkgconfig
9
10EXTRA_OECONF = "--enable-shared --enable-threadsafe"
11EXTRA_OECONF_class-native = "--enable-shared --enable-threadsafe --disable-readline"
12export config_BUILD_CC = "${BUILD_CC}"
13export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
14export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
15export config_TARGET_CC = "${CC}"
16export config_TARGET_LINK = "${CCLD}"
17export config_TARGET_CFLAGS = "${CFLAGS}"
18export config_TARGET_LFLAGS = "${LDFLAGS}"
19
20# pread() is in POSIX.1-2001 so any reasonable system must surely support it
21BUILD_CFLAGS += "-DUSE_PREAD"
22TARGET_CFLAGS += "-DUSE_PREAD"
23
24PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
25
26FILES_${PN} = "${bindir}/*"
27FILES_lib${BPN} = "${libdir}/*.so.*"
28FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
29 ${libdir}/pkgconfig ${includedir}"
30FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
31FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
32AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
33
34BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb b/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb
new file mode 100644
index 0000000000..32f60ebbeb
--- /dev/null
+++ b/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb
@@ -0,0 +1,21 @@
1require sqlite3.inc
2
3LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
4
5def sqlite_download_version(d):
6 pvsplit = d.getVar('PV', True).split('.')
7 return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
8
9PE = "3"
10SQLITE_PV = "${@sqlite_download_version(d)}"
11SRC_URI = "http://www.sqlite.org/2014/sqlite-autoconf-${SQLITE_PV}.tar.gz"
12
13SRC_URI[md5sum] = "f7e4a156b583abeba349629e2364224b"
14SRC_URI[sha256sum] = "53bab14255bc16c3d73fdbe54b364c1764709d68dda167587f8026c98b9f4e95"
15
16S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
17
18# Provide column meta-data API
19BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
20TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
21
diff --git a/meta/recipes-support/taglib/taglib_1.9.1.bb b/meta/recipes-support/taglib/taglib_1.9.1.bb
new file mode 100644
index 0000000000..55e345f1cc
--- /dev/null
+++ b/meta/recipes-support/taglib/taglib_1.9.1.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Library for reading and editing the meta-data of popular audio formats"
2SECTION = "libs/multimedia"
3HOMEPAGE = "http://taglib.github.io/"
4LICENSE = "LGPLv2.1 | MPL-1"
5LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
6 file://COPYING.MPL;md5=bfe1f75d606912a4111c90743d6c7325 \
7 file://taglib/audioproperties.h;beginline=1;endline=24;md5=9df2c7399519b7310568a7c55042ecee"
8
9DEPENDS = "zlib"
10
11SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz"
12SRC_URI[md5sum] = "0d35df96822bbd564c5504cb3c2e4d86"
13SRC_URI[sha256sum] = "72d371cd1419a87ae200447a53bff2be219283071e80fd12337928cc967dc71a"
14
15S = "${WORKDIR}/${BP}"
16
17BINCONFIG = "${bindir}/taglib-config"
18
19inherit cmake pkgconfig binconfig-disabled
20
21PACKAGES =+ "${PN}-c"
22FILES_${PN}-c = "${libdir}/libtag_c.so.*"
23
24EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}"
25
26do_configure_prepend () {
27 rm -f ${S}/admin/ltmain.sh
28 rm -f ${S}/admin/libtool.m4.in
29 # Don't have a floating dependeny on boost
30 sed -i -e "s/atomic.hpp/atomic-not-exist.hpp/" ${S}/ConfigureChecks.cmake
31}
32
diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb
new file mode 100644
index 0000000000..77ba97dbf1
--- /dev/null
+++ b/meta/recipes-support/user-creation/xuser-account_0.1.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Creates an 'xuser' account used for running X11"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5SRC_URI = ""
6
7inherit allarch useradd
8
9do_configure() {
10 :
11}
12
13do_compile() {
14 :
15}
16
17do_install() {
18 :
19}
20
21USERADD_PACKAGES = "${PN}"
22GROUPADD_PARAM_${PN} = "--system shutdown"
23USERADD_PARAM_${PN} = "--create-home \
24 --groups video,tty,audio,input,shutdown,disk \
25 --user-group xuser"
26
27ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch b/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..6763d37540
--- /dev/null
+++ b/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=691545]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd vte-0.28.2/gnome-pty-helper/configure.in vte-0.28.2/gnome-pty-helper/configure.in
5--- vte-0.28.2/gnome-pty-helper/configure.in 2010-07-15 20:08:44.000000000 +0300
6+++ vte-0.28.2/gnome-pty-helper/configure.in 2013-01-11 14:50:34.971027440 +0200
7@@ -8,7 +8,6 @@
8 AC_ISC_POSIX
9 AC_PROG_CC
10 AC_STDC_HEADERS
11-AM_PROG_CC_STDC
12
13 if test -z "$enable_maintainer_mode"; then
14 enable_maintainer_mode=yes
diff --git a/meta/recipes-support/vte/vte.inc b/meta/recipes-support/vte/vte.inc
new file mode 100644
index 0000000000..4081a7fac6
--- /dev/null
+++ b/meta/recipes-support/vte/vte.inc
@@ -0,0 +1,16 @@
1SUMMARY = "Virtual terminal emulator GTK+ widget library"
2BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
3LICENSE = "LGPLv2.1+"
4DEPENDS = " glib-2.0 gtk+ intltool-native ncurses gobject-introspection-stub"
5RDEPENDS_libvte = "vte-termcap"
6
7inherit gnome gtk-doc
8
9EXTRA_OECONF = "--disable-python --disable-introspection"
10
11PACKAGES =+ "libvte vte-termcap"
12FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper"
13FILES_${PN}-dbg =+ "${libexecdir}/.debug ${prefix}/src ${bindir}/.debug \
14 ${libdir}/.debug"
15FILES_vte-termcap = "${datadir}/vte/termcap-0.0"
16
diff --git a/meta/recipes-support/vte/vte_0.28.2.bb b/meta/recipes-support/vte/vte_0.28.2.bb
new file mode 100644
index 0000000000..485187df82
--- /dev/null
+++ b/meta/recipes-support/vte/vte_0.28.2.bb
@@ -0,0 +1,10 @@
1require vte.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
4
5PR = "r6"
6
7SRC_URI += "file://obsolete_automake_macros.patch"
8
9SRC_URI[archive.md5sum] = "f07a4bf943194f94b7f142db8f7f36dc"
10SRC_URI[archive.sha256sum] = "8d04e202b617373dfb47689e5e628febe2c58840b34cccc4af4feb88c48df903"